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

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #e9e9e9;
    color: #0f172a;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Header ── */
.public-header {
    background: #fff;
    border-bottom: 1px solid #dde3ed;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(11,60,93,.07);
}

.header-inner {
    height: 68px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.brand img {
    height: 52px;
}

.brand strong {
    display: block;
    font-size: 20px;
    color: #0b3c5d;
}

.brand span {
    font-size: 13px;
    color: #64748b;
}

/* ── Nav collapse wrapper (desktop: flex row) ── */
.pub-nav-collapse {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
}

/* ── Desktop nav — pill group ── */
#pubNav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    flex-wrap: nowrap;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}

#pubNav > a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
    font-size: 13.5px;
    padding: 6px 13px;
    border-radius: 7px;
    transition: background .15s, color .15s, box-shadow .15s;
}

#pubNav > a:hover {
    background: #fff;
    color: #0b3c5d;
    box-shadow: 0 1px 4px rgba(0,0,0,.09);
}

/* ── Auth + language (always right) ── */
.pub-auth-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.login-btn {
    color: #0b3c5d !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.register-btn {
    background: #0b3c5d;
    color: white !important;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

/* ── Language switcher ── */
.pub-lang {
    position: relative;
}

.pub-lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.pub-lang-toggle:hover {
    background: #f1f5f9;
}

.pub-lang-toggle img {
    border-radius: 2px;
    object-fit: cover;
    display: block;
}

.pub-lang-chevron {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s;
}

.pub-lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 4px;
    min-width: 100px;
    z-index: 200;
}

.pub-lang-menu.open {
    display: block;
}

.pub-lang-menu form {
    margin: 0;
}

.pub-lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-align: left;
    white-space: nowrap;
}

.pub-lang-item:hover {
    background: #f1f5f9;
}

.pub-lang-item.active {
    background: rgba(11,60,93,0.08);
    color: #0b3c5d;
}

.pub-lang-item img {
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ── Hamburger button ── */
.pub-toggler {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.pub-toggler span {
    display: block;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: all 0.25s;
}

.pub-toggler.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.pub-toggler.open span:nth-child(2) {
    opacity: 0;
}

.pub-toggler.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #002b5c, #005bbb);
    color: white;
    padding: 80px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.badge {
    background: rgba(255,255,255,0.16);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
}

.hero h1 {
    font-size: 54px;
    line-height: 1.08;
    margin: 24px 0 18px;
}

.hero p {
    font-size: 19px;
    line-height: 1.6;
    max-width: 720px;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    padding: 14px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

.primary-btn {
    background: white;
    color: #003b73;
}

.secondary-btn {
    border: 1px solid rgba(255,255,255,0.45);
    color: white;
}

.hero-card {
    background: white;
    color: #0f172a;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.22);
}

.hero-card h3 {
    margin-top: 0;
    color: #0b3c5d;
}

.hero-card ul {
    list-style: none;
    padding: 0;
    line-height: 2;
    margin: 0;
}

/* ── Mission ── */
.mission {
    background: white;
    padding: 48px 0;
    text-align: center;
}

.mission h2,
.content-section h2 {
    color: #0b3c5d;
}

.mission p {
    max-width: 820px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.7;
}

/* ── Content section ── */
.content-section {
    padding: 50px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}

.news-card,
.documents-box {
    background: white;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.08);
    overflow: hidden;
}

.news-card {
    display: grid;
    grid-template-columns: 320px 1fr;
}

.news-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.news-card > div {
    padding: 24px;
}

.news-card span {
    color: #64748b;
    font-size: 14px;
}

.news-card a,
.documents-box a {
    color: #005bbb;
    font-weight: bold;
    text-decoration: none;
}

.documents-box {
    padding: 24px;
}

.documents-box h3 {
    margin-top: 0;
    color: #0b3c5d;
}

.documents-box a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* ── Footer ── */
.public-footer {
    background: #002b5c;
    color: white;
    padding: 32px 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-grid a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .container { padding: 0 16px; }

    .pub-toggler {
        display: flex;
    }

    /* Collapse wrapper becomes dropdown */
    .pub-nav-collapse {
        display: none;
        position: absolute;
        top: 68px;
        left: 0; right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 8px 24px rgba(0,0,0,0.10);
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px 20px;
        gap: 0;
        z-index: 99;
    }

    .pub-nav-collapse.open {
        display: flex;
    }

    /* Nav links inside collapse — reset pill-group */
    #pubNav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 2px;
        flex: unset;
        margin-left: 0;
        background: none;
        border-radius: 0;
        padding: 0;
    }

    #pubNav > a {
        padding: 9px 10px;
        width: 100%;
        border-radius: 8px;
        font-size: 14px;
        box-shadow: none;
    }

    #pubNav > a:hover {
        background: #f1f5f9;
        box-shadow: none;
    }

    /* Auth right inside collapse */
    .pub-auth-right {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
        gap: 8px;
        align-items: center;
    }

    .register-btn {
        padding: 9px 16px;
    }

    /* Lang dropdown on mobile */
    .pub-lang-menu {
        top: calc(100% + 6px);
        right: 0;
        left: auto;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        padding: 4px;
        min-width: 110px;
    }

    .pub-lang-menu.open {
        display: block;
    }

    .pub-lang-item {
        width: 100%;
        padding: 7px 10px;
        border: none;
        border-radius: 6px;
    }

    .hero-grid,
    .content-grid,
    .news-card {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .brand strong {
        font-size: 15px;
    }

    .brand span {
        font-size: 11px;
    }

    .footer-grid {
        flex-direction: column;
        text-align: center;
    }

    .footer-grid a {
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        text-align: center;
    }
}
