:root {
    --blue: #173a7a;
    --blue-2: #234f9e;
    --gold: #d7b44a;
    --green: #16984c;
    --red: #c2272d;
    --ink: #172235;
    --muted: #647089;
    --bg: #f7f8fb;
    --card: #ffffff;
    --line: #e5e9f2;
    --radius: 24px;
    --shadow: 0 18px 40px rgba(23, 58, 122, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}



img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.flag-band {
    display: grid;
    grid-template-columns: 25% 25% 25% 12% 13%;
    height: 12px;
}

.flag-band span:nth-child(1) { background: var(--blue); }
.flag-band span:nth-child(2) { background: #ffffff; }
.flag-band span:nth-child(3) { background: var(--green); }
.flag-band span:nth-child(4) { background: #f0d74f; }
.flag-band span:nth-child(5) { background: var(--red); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(229, 233, 242, .95);
    backdrop-filter: blur(16px);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

.brand {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
}

.brand img {
    width: 64px;
    height: 56px;
    object-fit: contain;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.brand strong {
    display: block;
    color: var(--blue);
    font-size: 21px;
    line-height: 1.15;
}

.menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px 14px;
    flex-wrap: wrap;
    max-width: none;
}

.menu a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.menu a:hover {
    color: var(--blue-2);
}

.menu .menu-intranet {
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
}

main section[id] {
    scroll-margin-top: 120px;
}

.hero {
    padding: 72px 0 42px;
    background:
        radial-gradient(circle at top right, rgba(215,180,74,.18), transparent 34%),
        linear-gradient(180deg, #f9fbff 0%, #eef3fb 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 34px;
    align-items: center;
}

.kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue);
    font-weight: 800;
}

.kicker::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--gold);
}

h1,
h2,
h3 {
    color: #102656;
}

h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 5vw, 62px);
    line-height: 1.03;
    margin: 16px 0 18px;
}

.hero-copy .lead {
    max-width: 720px;
    font-size: 20px;
    color: #34425e;
    margin: 0 0 16px;
}

.hero-copy .sublead {
    margin: 0 0 28px;
    color: #55627b;
    font-size: 16px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 21px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--blue);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: #ffffff;
    color: var(--blue);
    border-color: #cfd7e7;
}

section {
    padding: 42px 0;
}

.section-head {
    margin-bottom: 24px;
}

.section-head h2 {
    margin: 10px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    max-width: 900px;
    color: var(--muted);
    font-size: 17px;
}

.media-card,
.about article,
.president-copy,
.contact-card,
.contact-form,
.empty-card,
.intranet-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 24px rgba(19, 29, 58, .04);
}

.media-card {
    padding: 18px;
}

.media-card img {
    border-radius: 18px;
}

.caption {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.about {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.about article {
    padding: 26px 24px;
}

.about article b {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #eef3fb;
    color: var(--blue);
    font-size: 20px;
    margin-bottom: 16px;
}

.about h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.about p {
    margin: 0;
    color: #55627b;
}

.president {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 28px;
    align-items: stretch;
}

.president-copy {
    padding: 34px;
}

.quote-mark {
    font-family: Georgia, serif;
    font-size: 72px;
    color: var(--gold);
    line-height: .7;
}

.president-copy p {
    color: #4f5e79;
    font-size: 19px;
}

.signature {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.signature strong {
    display: block;
    color: var(--blue);
    font-size: 20px;
}

.signature span {
    color: var(--muted);
}

.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.news-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.news-content {
    padding: 22px;
}

.tag {
    display: inline-flex;
    background: #eef3fb;
    color: var(--blue);
    padding: 8px 13px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}

.news-content h3 {
    margin: 14px 0 10px;
    font-family: Georgia, serif;
    font-size: 24px;
    line-height: 1.15;
}

.news-content p {
    color: #4f5e79;
    margin: 0 0 16px;
}

.news-content a {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-grid figure {
    margin: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(19, 29, 58, .04);
}

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

.intranet-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 32px;
    background: linear-gradient(135deg, #102656 0%, #173a7a 100%);
    color: #ffffff;
}

.intranet-card h2,
.intranet-card .eyebrow {
    color: #ffffff;
}

.intranet-card p {
    margin: 0;
    color: rgba(255,255,255,.86);
    max-width: 740px;
}

.contact-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 24px;
    align-items: start;
}

.contact-card,
.contact-form {
    padding: 28px;
}

.contact-card h3 {
    margin-top: 0;
    font-size: 26px;
}

.contact-list {
    display: grid;
    gap: 18px;
}

.contact-list strong {
    display: block;
    color: var(--blue);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 4px;
}

.contact-list span {
    display: block;
    color: #1f2b43;
    font-size: 17px;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-form label {
    display: grid;
    gap: 7px;
    color: var(--blue);
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid #cfd7e7;
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    color: var(--ink);
    background: #ffffff;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.form-success,
.form-error {
    border-radius: 14px;
    padding: 14px 16px;
    font-weight: 700;
}

.form-success {
    background: #eaf8ef;
    color: #176b35;
    border: 1px solid #bce5c8;
}

.form-error {
    background: #fff1f1;
    color: #9d1d25;
    border: 1px solid #f3c1c5;
}

.form-error p {
    margin: 0;
}

.empty-card {
    padding: 24px;
}

.public-site .site-footer {
    margin-top: 34px;
    padding: 28px 0 36px;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

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

.public-site .footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.public-site .footer-brand img {
    width: 56px;
    height: 48px;
    object-fit: contain;
}

.public-site .footer-brand strong {
    display: block;
    color: var(--blue);
    font-size: 18px;
}

.public-site .footer-brand span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.public-site .footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
}

.public-site .footer-links a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 980px) {
    .header-main,
    .hero-grid,
    .president,
    .contact-grid,
    .intranet-card {
        grid-template-columns: 1fr;
    }

    .header-main,
    .intranet-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu {
        justify-content: flex-start;
        max-width: none;
    }

    .about,
    .news-list,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(1180px, calc(100% - 28px));
    }

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

    .brand img {
        width: 52px;
        height: 48px;
    }

    .menu {
        gap: 9px 12px;
    }

    .menu a {
        font-size: 13px;
    }

    section {
        padding: 32px 0;
    }
}

/* Application shell shared by login and intranet */
body.login-page,
body.intranet-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f8fb;
}

.login-page .site-footer,
.intranet-page .site-footer {
    margin-top: auto;
    padding: 22px 24px;
    background: #ffffff;
    border-top: 1px solid #e5e9f2;
    color: #10285c;
    font-size: 0.88rem;
}

.login-page .site-footer small,
.intranet-page .site-footer small {
    display: block;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.login-page .site-footer,
.intranet-page .site-footer {
    text-align: center;
}

.login-page .site-footer small,
.intranet-page .site-footer small {
    text-align: center;
}

.login-page .site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-page .site-footer small {
    width: auto;
    margin: 0;
    text-align: center;
}

/* Default footer for generated public/intranet pages using includes/footer.php */
body:not(.public-site) .site-footer {
    margin-top: auto;
    padding: 22px 24px;
    background: #ffffff;
    border-top: 1px solid #e5e9f2;
    color: #10285c;
    font-size: 0.88rem;
    text-align: center;
}

body:not(.public-site) .site-footer small {
    display: block;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.partners-grid a {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(19, 29, 58, .04);
}

.partners-grid a:hover {
    background: #eef3fb;
}

@media (max-width: 980px) {
    .partners-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.intranet-card .partners-grid {
    min-width: min(620px, 100%);
}

.intranet-card .partners-grid a {
    min-height: 86px;
    background: rgba(255, 255, 255, .96);
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, .82);
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox img {
    max-width: min(1100px, 95vw);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 16px;
    background: #ffffff;
}

.gallery-lightbox button {
    position: fixed;
    top: 18px;
    right: 24px;
    border: 0;
    background: #ffffff;
    color: #10285c;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: #ffffff;
    color: #10285c;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10000;
}

.gallery-lightbox-prev {
    left: 24px;
}

.gallery-lightbox-next {
    right: 24px;
}

.gallery-lightbox-close {
    z-index: 10000;
}

.gallery-lightbox .gallery-lightbox-prev {
    top: 50% !important;
    left: 24px !important;
    right: auto !important;
    transform: translateY(-50%) !important;
}

.gallery-lightbox .gallery-lightbox-next {
    top: 50% !important;
    right: 24px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
}

.gallery-lightbox .gallery-lightbox-close {
    top: 18px !important;
    right: 24px !important;
    left: auto !important;
    transform: none !important;
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 720px) {

    .header-main {
        align-items: stretch;
    }

    .menu-toggle {
        display: inline-flex;
        align-self: flex-end;
        margin-top: 10px;
    }

    .menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 14px;
    }

    .menu.is-open {
        display: flex;
    }

    .menu a {
        padding: 14px 0;
        border-bottom: 1px solid #e5e9f2;
    }

    .menu .menu-intranet {
        text-align: center;
        margin-top: 12px;
    }
}

@media (min-width: 981px) {
    .header-main {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 16px;
    }

    .brand {
        min-width: 0;
    }

    .menu {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 7px;
        width: 100%;
    }

    .menu a {
        font-size: 14px;
    }
}
