/* ==========================================================================
   Bursa "Prof. Emerit Dr. Anton Ionescu" – Lions Transilvania
   Palette sampled from the original assets:
     navy  #14284f  (logo field)
     blue  #00529b  (Lions International emblem)
     gold  #ffcf06  (Lions International emblem)
   ========================================================================== */

:root {
    --navy: #14284f;
    --navy-700: #1b3566;
    --navy-300: #4a5f8a;
    --blue: #00529b;
    --blue-600: #00417c;
    --blue-100: #e6eff7;
    --gold: #ffcf06;
    --gold-600: #e0b400;
    --gold-100: #fff8dd;

    --ink: #1a2233;
    --ink-muted: #5a6779;
    --line: #dfe4ec;
    --bg: #f4f6fa;
    --surface: #ffffff;

    --ok: #1a7f4b;
    --err: #b42318;

    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(20, 40, 79, .06), 0 2px 8px rgba(20, 40, 79, .05);
    --shadow-md: 0 4px 16px rgba(20, 40, 79, .10);
    --shadow-lg: 0 12px 40px rgba(20, 40, 79, .16);

    --wrap: 1160px;
    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); font-weight: 700; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.85rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.2rem, 1rem + .7vw, 1.45rem); }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-600); }

/* Visible focus everywhere: keyboard users must always know where they are. */
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--gold); color: var(--navy); font-weight: 700;
    padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
    background: var(--navy);
    color: #fff;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 14px rgba(20, 40, 79, .28);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { height: 46px; width: auto; border-radius: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; }
.brand-sub { font-size: .74rem; opacity: .72; letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
    padding: 10px 14px; border-radius: 8px; white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: background .18s, border-color .18s;
}
.nav a:hover { background: rgba(255, 255, 255, .10); color: #fff; }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); background: rgba(255, 255, 255, .07); }

.nav-toggle {
    display: none; background: transparent; border: 2px solid rgba(255, 255, 255, .3);
    color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer;
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--navy); padding: 8px 16px 18px;
        box-shadow: 0 14px 30px rgba(20, 40, 79, .35);
    }
    .nav.is-open { display: flex; }
    .nav a { padding: 14px 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 0; }
    .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 10px; border: 2px solid transparent;
    font-weight: 700; font-size: .97rem; text-decoration: none; cursor: pointer;
    transition: transform .12s, box-shadow .18s, background .18s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-600); color: var(--navy); box-shadow: var(--shadow-md); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-600); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-outline:hover { background: var(--blue-100); color: var(--blue-600); }

/* ---------- hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    color: #fff; padding: 72px 0 80px; position: relative; overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; right: -120px; top: -120px;
    width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 207, 6, .16) 0%, rgba(255, 207, 6, 0) 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 44px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 52px 0 56px; } }

.hero h1 { color: #fff; margin-bottom: .35em; }
.hero p.lead { font-size: 1.15rem; opacity: .93; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-image img { border-radius: var(--radius-lg); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 207, 6, .16); border: 1px solid rgba(255, 207, 6, .45);
    color: var(--gold); font-weight: 700; font-size: .8rem; letter-spacing: .06em;
    text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}

/* ---------- sections & cards ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--ink-muted); font-size: 1.05rem; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 28px; box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.card-icon {
    width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
    background: var(--blue-100); color: var(--blue); font-size: 1.5rem; font-weight: 800;
    margin-bottom: 16px;
}

/* criteria numbers (media / venit / purtare) */
.stat { text-align: center; }
.stat .stat-value {
    font-size: 2.6rem; font-weight: 800; color: var(--blue); line-height: 1.1;
    display: block; margin-bottom: 6px;
}
.stat .stat-label { color: var(--ink-muted); font-size: .95rem; }

/* ---------- document cards ---------- */
.doc-card {
    display: flex; align-items: center; gap: 18px;
    background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--gold);
    border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm);
    transition: transform .16s, box-shadow .16s;
}
.doc-card:hover { transform: translateX(3px); box-shadow: var(--shadow-md); }
.doc-ext {
    flex: 0 0 auto; width: 54px; height: 62px; border-radius: 8px;
    background: var(--navy); color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: .72rem; letter-spacing: .04em;
}
.doc-body { flex: 1 1 auto; min-width: 0; }
.doc-body h3 { font-size: 1.05rem; margin-bottom: 2px; }
.doc-meta { color: var(--ink-muted); font-size: .84rem; }
.doc-card .btn { flex: 0 0 auto; padding: 10px 18px; }
@media (max-width: 620px) {
    .doc-card { flex-wrap: wrap; }
    .doc-card .btn { width: 100%; }
}

/* ---------- news ---------- */
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card .post-thumb { aspect-ratio: 16 / 9; background: var(--blue-100); overflow: hidden; }
.post-card .post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.15rem; }
.post-card .post-excerpt { color: var(--ink-muted); font-size: .95rem; flex: 1; }

.tag {
    display: inline-block; background: var(--blue-100); color: var(--blue-600);
    font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.post-date { color: var(--ink-muted); font-size: .85rem; margin-top: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 32px; }
.filters .field { flex: 1 1 180px; }

/* ---------- recipients ---------- */
.recipients-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.recipients-table th, .recipients-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.recipients-table th { background: var(--navy); color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.recipients-table tbody tr:hover { background: var(--blue-100); }
.recipients-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge-admis { background: #dcf5e7; color: var(--ok); }
.badge-respins { background: #fde8e6; color: var(--err); }
.badge-rezerva { background: var(--gold-100); color: #8a6d00; }

.year-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.year-badge {
    background: var(--navy); color: var(--gold); font-weight: 800; font-size: 1.05rem;
    padding: 10px 18px; border-radius: 10px; white-space: nowrap;
}

/* ---------- prose (admin-authored rich text) ---------- */
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .5em; }
.prose blockquote {
    margin: 1.5rem 0; padding: 4px 0 4px 20px;
    border-left: 4px solid var(--gold); color: var(--ink-muted); font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--blue-100); }
.prose img { border-radius: var(--radius); margin: 1.2rem 0; }

/* ---------- forms ---------- */
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 7px; color: var(--navy); }
.field .req { color: var(--err); }
.field .hint { font-size: .85rem; color: var(--ink-muted); margin-top: 5px; }

.input, .textarea, .select {
    width: 100%; padding: 12px 14px; font: inherit; font-size: .97rem;
    color: var(--ink); background: #fff;
    border: 1.5px solid var(--line); border-radius: 10px;
    transition: border-color .16s, box-shadow .16s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0, 82, 155, .12);
}
.textarea { min-height: 160px; resize: vertical; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--err); }

.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: .93rem; }
.checkbox input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--blue); }

.error-text { color: var(--err); font-size: .87rem; margin-top: 5px; font-weight: 600; }

.alert { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; font-weight: 600; }
.alert-ok { background: #dcf5e7; color: #12603a; border: 1px solid #a8e2c4; }
.alert-err { background: #fde8e6; color: #8c1a12; border: 1px solid #f5b7b1; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .78); padding: 56px 0 0; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: #fff; font-size: .92rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
/* width:auto is load-bearing: the <img> carries width="281", which would otherwise
   win over the intrinsic ratio and stretch the logo to 281x54. */
.footer-brand img { height: 54px; width: auto; margin-bottom: 14px; border-radius: 4px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .09); font-size: .8rem; font-weight: 700;
}
.footer-social a:hover { background: var(--gold); color: var(--navy); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 20px 0; display: flex; flex-wrap: wrap; gap: 14px;
    align-items: center; justify-content: space-between; font-size: .87rem;
}
.visit-counter {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
    padding: 6px 14px; border-radius: 999px; font-size: .85rem;
    font-variant-numeric: tabular-nums;
}
.visit-counter strong { color: var(--gold); font-weight: 800; }

/* ---------- breadcrumbs ---------- */
.breadcrumb { font-size: .87rem; color: var(--ink-muted); padding: 18px 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li::after { content: "/"; margin-left: 8px; color: var(--line); }
.breadcrumb li:last-child::after { content: ""; }

/* ---------- page header ---------- */
.page-header { background: linear-gradient(135deg, var(--navy) 0%, var(--blue-600) 100%); color: #fff; padding: 52px 0; }
.page-header h1 { color: #fff; margin: 0; }
.page-header p { opacity: .9; margin: 10px 0 0; max-width: 65ch; }

/* ---------- cookie banner ---------- */
.cookie-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 22px 24px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
    max-width: 900px; margin: 0 auto;
}
.cookie-banner p { flex: 1 1 320px; margin: 0; font-size: .93rem; color: var(--ink-muted); }
.cookie-banner .btn { padding: 10px 20px; }
.cookie-banner[hidden] { display: none; }

/* ---------- pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 44px; list-style: none; padding: 0; }
.pagination a, .pagination span {
    display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
    border-radius: 10px; border: 1px solid var(--line); background: #fff;
    text-decoration: none; font-weight: 600; color: var(--ink);
}
.pagination a:hover { background: var(--blue-100); border-color: var(--blue); }
.pagination .active span { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .disabled span { opacity: .45; }

/* ---------- error pages ---------- */
.error-page { text-align: center; padding: 96px 0; }
.error-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--blue-100); line-height: 1; }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-muted); }
