/* =========================================================
   Grant Foundation — public site styles
   ========================================================= */

:root {
    --teal: #17a3a5;
    --teal-dark: #118789;
    --navy: #06263f;
    --dark: #1c1c1c;
    --darker: #141414;
    --text: #3a3a3a;
    --muted: #7a7a7a;
    --line: #e6e6e6;
    --bg-soft: #f6f7f9;
    --gold: #f5b301;
    --radius: 4px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .08);
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: #fff;
    line-height: 1.7;
    font-size: 15px;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    width: min(1240px, 92%);
    margin-inline: auto;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: .25s ease;
    text-align: center;
    background: none;
}

.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-dark); transform: translateY(-2px); }

.btn--outline { border-color: #cfcfcf; color: #444; background: #fff; }
.btn--outline:hover { border-color: var(--teal); color: var(--teal); }

.btn--ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn--ghost:hover { background: #fff; color: #111; }

.btn--wide { width: 100%; }
.btn--apply { padding: 14px 34px; font-size: 14px; }

/* ---------- top bar ---------- */
.topbar {
    background: var(--teal);
    color: #fff;
    font-size: 13px;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    gap: 18px;
    flex-wrap: wrap;
}

.topbar__social,
.topbar__info { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.topbar__social a {
    width: 24px; height: 24px;
    display: grid; place-items: center;
    border-radius: 50%;
    transition: .25s;
    font-size: 13px;
}

.topbar__social a:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }

.topbar__info i { margin-right: 6px; }

/* ---------- language dropdown (topbar) ---------- */
.topbar__translate { position: relative; display: inline-flex; align-items: center; }

/* Google's own gadget stays in the DOM — its machinery applies the
   translation cookie on page load — but sits offscreen so our custom
   vertical dropdown can replace its horizontal menu. */
#google_translate_element {
    position: absolute;
    left: -99999px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.lang-select { position: relative; }

.lang-select__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 4px;
    padding: 6px 12px;
    color: #fff;
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: .25s;
    white-space: nowrap;
}

.lang-select__btn:hover,
.lang-select__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .22); }

.lang-select__caret { font-size: 11px; transition: transform .25s; }
.lang-select__btn[aria-expanded="true"] .lang-select__caret { transform: rotate(180deg); }

.lang-select__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 90;
    width: 220px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(4, 24, 44, .08);
    border-radius: 6px;
    box-shadow: 0 14px 30px rgba(4, 24, 44, .18);
}

.lang-select__menu[hidden] { display: none; }

.lang-select__menu li {
    padding: 9px 16px;
    font-size: 13.5px;
    color: #12233a;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}

.lang-select__menu li:hover { background: #eef7f7; color: var(--teal); }
.lang-select__menu li.is-active { color: var(--teal); font-weight: 600; }

.lang-select__menu::-webkit-scrollbar { width: 8px; }
.lang-select__menu::-webkit-scrollbar-thumb { background: #cfd9e2; border-radius: 8px; }

/* Google injects a top banner iframe — hide it so the layout doesn't shift.
   Do NOT hide body > .skiptranslate here: Google's language menu iframe
   matches that selector too and hiding it breaks translation. */
.goog-te-banner-frame { display: none !important; }

body { top: 0 !important; }

/* ---------- header ---------- */
.site-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 60;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 96px;
    gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 27px; color: #1f1f1f; letter-spacing: .02em; font-weight: 700; }
.brand__text em { font-style: normal; color: var(--teal); font-size: 16px; font-weight: 500; }

.main-nav { display: flex; align-items: center; gap: 34px; }

.main-nav ul { display: flex; gap: 34px; }

.main-nav ul a {
    font-size: 15px;
    color: #4a4a4a;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
    transition: color .25s;
}

.main-nav ul a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--teal);
    transition: width .3s;
}

.main-nav ul a:hover,
.main-nav ul a.active { color: var(--teal); }
.main-nav ul a:hover::after,
.main-nav ul a.active::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span { width: 26px; height: 3px; background: #222; border-radius: 3px; transition: .3s; }

/* ---------- hero slider ---------- */
.hero {
    position: relative;
    min-height: 560px;
    background: #04182c;
    overflow: hidden;
}

.hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-image:
        radial-gradient(circle at 78% 50%, rgba(31, 111, 235, .35), transparent 55%),
        linear-gradient(120deg, #062b52 0%, #062140 45%, #04182c 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.03);
    transition: opacity .8s ease, transform .8s ease, visibility .8s;
    padding: 90px 0;
}

.hero__slide.is-active { opacity: 1; visibility: visible; transform: scale(1); position: relative; }

.hero__content { max-width: 780px; color: #fff; text-align: center; }

.hero__content h1 {
    font-size: clamp(32px, 4.6vw, 56px);
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 22px;
}

.hero__content p {
    font-size: 16px;
    color: rgba(255, 255, 255, .84);
    margin: 0 auto 30px;
    max-width: 660px;
}

.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    transition: .25s;
    display: grid; place-items: center;
}

.hero__arrow:hover { background: var(--teal); }
.hero__arrow--prev { left: 26px; }
.hero__arrow--next { right: 26px; }

.hero__dots {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero__dots button {
    width: 13px; height: 13px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: .25s;
}

.hero__dots button.is-active { background: var(--teal); border-color: var(--teal); }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section--muted { background: var(--bg-soft); }

.section-title {
    text-align: center;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: .01em;
    color: #1c1c1c;
    text-transform: uppercase;
}

.section-title span { color: var(--teal); }
.section-title--light { color: #fff; }
.section-title--light span { color: var(--teal); }
.section-title--left { text-align: left; }

.section-divider {
    display: block;
    width: 190px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cfcfcf, transparent);
    margin: 20px auto 46px;
}

.section-title--left + .section-divider,
.section-title--left ~ .section-divider { margin-left: 0; }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}

/* ---------- grant cards ---------- */
.grant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 30px;
}

.grant-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .3s, box-shadow .3s;
}

.grant-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .13); }

.grant-card__image { aspect-ratio: 4 / 4.1; overflow: hidden; background: #e9edf1; }
.grant-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.grant-card:hover .grant-card__image img { transform: scale(1.06); }

.grant-card__body {
    background: #f3f4f6;
    padding: 22px 20px;
    text-align: center;
    flex: 1;
}

.grant-card__body h3 { font-size: 19px; font-weight: 600; color: #1f1f1f; }

.grant-card__slots { font-size: 13px; color: var(--muted); margin-top: 6px; }
.grant-card__desc { font-size: 13px; color: var(--muted); margin-top: 8px; }

.grant-card__footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: #fff;
    border-top: 1px solid var(--line);
}

.grant-card__footer .btn { padding: 10px 22px; }

.grant-card__amount { display: flex; flex-direction: column; line-height: 1.25; }
.grant-card__amount small { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.grant-card__amount strong { font-size: 16px; color: #1f1f1f; font-weight: 600; }

/* ---------- support (dark) section ---------- */
.support {
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 84px 0;
    text-align: center;
}

.support__sub {
    color: rgba(255, 255, 255, .8);
    max-width: 760px;
    margin: 16px auto 54px;
    font-size: 15px;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.support-card__icon {
    width: 74px; height: 74px;
    border: 1px solid rgba(255, 255, 255, .45);
    display: grid; place-items: center;
    margin: 0 auto 26px;
    font-size: 26px;
    color: #fff;
    transition: .3s;
}

.support-card:hover .support-card__icon { background: var(--teal); border-color: var(--teal); }

.support-card h3 { font-size: 19px; font-weight: 600; letter-spacing: .03em; margin-bottom: 14px; }
.support-card p { color: rgba(255, 255, 255, .78); margin-bottom: 26px; min-height: 54px; }

/* ---------- winners ---------- */
.winner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 30px;
}

.winner-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .3s;
}

.winner-card:hover { transform: translateY(-6px); }

.winner-card__image { aspect-ratio: 16 / 11; background: #e9edf1; }
.winner-card__image img { width: 100%; height: 100%; object-fit: cover; }

.winner-card__body { padding: 22px 20px 26px; text-align: center; }
.winner-card__body h3 { font-size: 18px; color: #1f1f1f; }
.winner-card__grant { color: var(--teal); font-size: 14px; margin-top: 4px; font-weight: 500; }
.winner-card__amount { font-size: 22px; font-weight: 700; margin-top: 10px; color: #1f1f1f; }
.winner-card__date { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- testimonials ---------- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 30px 26px;
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial-card::before {
    content: "\201D";
    position: absolute;
    top: 6px; right: 20px;
    font-size: 72px;
    color: rgba(23, 163, 165, .14);
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card__stars { color: var(--gold); margin-bottom: 14px; font-size: 14px; }
.testimonial-card p { color: #555; font-size: 14.5px; }
.testimonial-card footer { margin-top: 18px; display: flex; flex-direction: column; }
.testimonial-card footer strong { color: #1f1f1f; }
.testimonial-card footer span { font-size: 13px; color: var(--teal); }

/* ---------- sponsors ---------- */
.sponsors { padding: 74px 0 84px; }

.sponsors__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 46px;
}

.sponsor-logo {
    font-size: 22px;
    font-weight: 700;
    color: #b9b9b9;
    letter-spacing: .02em;
    filter: grayscale(1);
    transition: .3s;
}

.sponsor-logo:hover { color: var(--teal); filter: none; }

/* ---------- page banner ---------- */
.page-banner {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 92px 0;
    text-align: center;
}

.page-banner h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; margin-bottom: 12px; }
.page-banner p { color: rgba(255, 255, 255, .85); font-size: 16px; }

/* ---------- forms (public) ---------- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 34px;
}

.apply-form h2 { font-size: 22px; color: #1f1f1f; margin-bottom: 6px; }
.form-note { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field--full { grid-column: 1 / -1; }

.form-field label { font-size: 13.5px; font-weight: 500; color: #444; }

.form-field input,
.form-field select,
.form-field textarea {
    font-family: var(--font);
    font-size: 14.5px;
    padding: 12px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    background: #fff;
    color: #222;
    transition: border-color .2s, box-shadow .2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(23, 163, 165, .16);
}

.form-field small { color: var(--muted); font-size: 12px; }

.apply-form .btn { margin-top: 22px; }

.apply-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

.apply-summary {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.apply-summary img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.apply-summary__body { padding: 26px; }
.apply-summary__body h2 { font-size: 24px; color: #1f1f1f; }
.apply-summary__amount { margin: 10px 0 16px; font-size: 24px; font-weight: 700; color: var(--teal); }
.apply-summary__amount span { display: block; font-size: 12px; color: var(--muted); letter-spacing: .1em; font-weight: 500; }
.apply-summary__meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-size: 14px; color: #555; }
.apply-summary__meta i { color: var(--teal); width: 20px; }
.apply-summary__body p { color: #666; font-size: 14.5px; }

/* ---------- contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 44px;
    align-items: start;
}

.contact-info p { color: #666; margin-bottom: 26px; }

.contact-list { display: flex; flex-direction: column; gap: 20px; }

.contact-list li { display: flex; gap: 16px; align-items: flex-start; }

.contact-list i {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(23, 163, 165, .12);
    color: var(--teal);
    display: grid; place-items: center;
    flex-shrink: 0;
}

.contact-list strong { display: block; color: #1f1f1f; font-size: 15px; }
.contact-list span { color: var(--muted); font-size: 14px; }

/* ---------- about ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
    align-items: center;
}

.about-copy p { color: #666; margin-bottom: 16px; }

.about-list { margin: 22px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.about-list i { color: var(--teal); margin-right: 10px; }

.about-panel img { border-radius: 6px; box-shadow: var(--shadow); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; }

.stat-card {
    background: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 34px 18px;
    box-shadow: var(--shadow);
}

.stat-card strong { display: block; font-size: 34px; color: var(--teal); font-weight: 700; }
.stat-card span { color: var(--muted); font-size: 14px; }

/* ---------- flash messages ---------- */
.flash { padding: 14px 0; font-size: 14.5px; }
.flash--success { background: #e7f7ee; color: #14713f; border-bottom: 1px solid #c7ebd6; }
.flash--error { background: #fdeeee; color: #a12626; border-bottom: 1px solid #f6d3d3; }
.flash ul { margin-left: 18px; list-style: disc; }

/* ---------- footer ---------- */
.site-footer {
    background: var(--dark);
    color: #d7d7d7;
    padding-top: 72px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 44px;
    padding-bottom: 56px;
}

.site-footer h4 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 12px;
}

.footer-underline {
    display: block;
    width: 44px;
    height: 3px;
    background: var(--teal);
    margin-bottom: 24px;
}

.footer-sub { margin-top: 26px; font-size: 17px !important; }

.site-footer p { font-size: 14.5px; color: #c4c4c4; }

.footer-contact { margin-bottom: 12px; }
.footer-contact i { color: var(--teal); width: 18px; }

.footer-links { display: flex; flex-direction: column; gap: 14px; }
.footer-links a { font-size: 14.5px; color: #c9c9c9; transition: .25s; }
.footer-links i { color: var(--teal); margin-right: 9px; font-size: 12px; }
.footer-links a:hover { color: var(--teal); padding-left: 4px; }

.newsletter { display: flex; margin-top: 20px; max-width: 320px; }

.newsletter input {
    flex: 1;
    font-family: var(--font);
    padding: 13px 16px;
    border: 0;
    border-radius: 3px 0 0 3px;
    font-size: 14px;
    min-width: 0;
}

.newsletter input:focus { outline: 2px solid var(--teal); outline-offset: -2px; }

.newsletter button {
    width: 56px;
    background: var(--teal);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 16px;
    border-radius: 0 3px 3px 0;
    transition: background .25s;
}

.newsletter button:hover { background: var(--teal-dark); }

.footer-bottom { background: var(--darker); padding: 20px 0; }

.footer-bottom__inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: #a9a9a9;
}

.footer-bottom i { color: #e04b4b; }

/* ---------- back to top ---------- */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: 44px; height: 44px;
    background: var(--teal);
    color: #fff;
    display: grid; place-items: center;
    border-radius: 3px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: .3s;
    z-index: 70;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--teal-dark); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
    .main-nav ul { gap: 22px; }
    .main-nav { gap: 22px; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .apply-layout,
    .contact-grid,
    .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 22px;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease, padding .35s ease;
        box-shadow: 0 14px 26px rgba(0, 0, 0, .12);
    }

    .main-nav.is-open { max-height: 520px; padding: 14px 22px 26px; }

    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav ul a { display: block; padding: 12px 0; }
    .btn--apply { text-align: center; margin-top: 12px; }

    .hero { min-height: 480px; }
    .hero__arrow--prev { left: 10px; }
    .hero__arrow--next { right: 10px; }

    .form-grid { grid-template-columns: 1fr; }
    /* keep the Google Translate widget visible — hide only email/phone text */
    .topbar__info > span { display: none; }
}

@media (max-width: 620px) {
    .section { padding: 60px 0; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 34px; }
    .card { padding: 24px 20px; }
    .grant-card__footer { flex-direction: column; align-items: flex-start; }
}

/* ---------- apply form custom checkbox field ---------- */
.apply-form .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    cursor: pointer;
}

.apply-form .checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #0e8f7c;
}
