/* 2027 homepage refinement — intentionally loaded after the legacy stylesheets. */
:root {
    --cca-navy: #132b4f;
    --cca-navy-deep: #091a30;
    --cca-orange: #f56a0a;
    --cca-orange-bright: #ff7a1a;
    --cca-cream: #fffaf4;
}

body {
    background: #fff;
}

/* Shared page containment: keep public content away from viewport edges. */
.section > .container,
.page-header > .container,
.footer > .container {
    width: min(1200px, calc(100% - 48px));
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 0;
}

.footer {
    width: 100%;
    overflow: hidden;
}

.footer-content {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    width: 100%;
    min-width: 0;
    gap: clamp(24px, 4vw, 48px);
}

.footer-section,
.footer-section ul,
.footer-section li,
.footer-section p,
.footer-bottom,
.footer-info,
.footer-links {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.footer-section img {
    max-width: 100%;
    height: auto;
}

.header {
    border: 0;
    border-bottom: 1px solid rgba(19, 43, 79, .09);
    border-radius: 0;
    box-shadow: 0 8px 30px rgba(9, 26, 48, .09);
}

/* Desktop navigation: dark links remain legible on the white header. */
@media (min-width: 769px) {
    .header .nav-menu > li > a:not(.btn),
    .header .nav-menu .dropdown-trigger {
        color: var(--cca-navy) !important;
    }

    .header .nav-menu > li > a:not(.btn):hover,
    .header .nav-menu .dropdown-trigger:hover,
    .header .nav-menu .dropdown-trigger.active,
    .header .nav-menu > li > a.active {
        color: var(--cca-orange) !important;
    }

    .header .nav-menu > li > a:not(.btn)::after {
        background: var(--cca-orange) !important;
    }
}

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background-position: center 28%;
}

.hero > .container {
    width: min(1200px, calc(100% - 80px));
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 0;
}

.hero::before {
    background: linear-gradient(90deg, rgba(7, 22, 40, .93) 0%, rgba(13, 35, 61, .82) 47%, rgba(13, 35, 61, .32) 100%);
}

.hero-content {
    max-width: 760px;
    text-align: left;
    padding: 72px 0 64px;
}

.admissions-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 9px 15px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: .84rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.admissions-pill span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #5ce08b;
    box-shadow: 0 0 0 5px rgba(92,224,139,.14);
}

.hero h1 {
    max-width: 720px;
    margin-bottom: 20px;
    font-size: clamp(2.6rem, 5.6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.hero p {
    max-width: 650px;
    margin-bottom: 30px;
    color: rgba(255,255,255,.86);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
}

.hero .btn {
    min-height: 54px;
    padding: 15px 25px;
    border-radius: 8px;
    justify-content: center;
    font-weight: 650;
}

.hero .btn-secondary {
    border-color: rgba(255,255,255,.72);
    color: #fff;
    background: rgba(255,255,255,.08);
}

.hero .btn-secondary:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,.16);
}

.hero-primary-cta {
    background: var(--cca-orange) !important;
    border-color: var(--cca-orange) !important;
    box-shadow: 0 12px 28px rgba(245,106,10,.32);
}

.hero-primary-cta:hover {
    background: var(--cca-orange-bright) !important;
    transform: translateY(-2px);
}

.hero-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    margin-top: 30px;
    color: rgba(255,255,255,.82);
    font-size: .88rem;
}

.hero-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-trust-row i {
    color: #ff984e;
}

/* Robertson-sponsored one-week baking campaign */
.campaign-section {
    background: linear-gradient(180deg, #fff 0%, var(--cca-cream) 100%);
}

.campaign-card {
    overflow: hidden;
    border: 1px solid rgba(19, 43, 79, .1);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(9, 26, 48, .13);
}

.campaign-visual {
    overflow: hidden;
    background: var(--cca-navy-deep);
}

.campaign-visual img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1983 / 793;
    object-fit: cover;
}

.campaign-content {
    padding: clamp(28px, 5vw, 58px);
}

.campaign-sponsor {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.campaign-sponsor span,
.campaign-label {
    color: #8a661f;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.campaign-sponsor img {
    width: min(190px, 48vw);
    max-height: 68px;
    object-fit: contain;
}

.campaign-label {
    display: inline-block;
    margin-bottom: 12px;
}

.campaign-content h2 {
    max-width: 880px;
    margin-bottom: 18px;
    color: var(--cca-navy-deep);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.campaign-content > p {
    max-width: 860px;
    color: #596579;
    font-size: 1.04rem;
    line-height: 1.75;
}

.campaign-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0;
}

.campaign-benefits span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(19,43,79,.1);
    border-radius: 999px;
    background: #f7f9fc;
    color: var(--cca-navy);
    font-size: .88rem;
    font-weight: 600;
}

.campaign-benefits i {
    color: var(--cca-orange);
}

.campaign-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.campaign-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    border-radius: 9px;
}

.campaign-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #178b46;
    font-weight: 650;
}

.campaign-whatsapp:hover {
    color: #106e36;
}

.card,
.feature-course-card,
.course-card {
    border: 1px solid rgba(19,43,79,.09);
    box-shadow: 0 12px 38px rgba(9,26,48,.08);
}

.enrollment-banner {
    padding: 58px clamp(22px, 6vw, 72px);
    border-radius: 20px;
    background: linear-gradient(125deg, var(--cca-navy-deep), var(--cca-navy) 62%, #214b79);
    box-shadow: 0 24px 60px rgba(9,26,48,.18);
}

.enrollment-banner::before {
    background: radial-gradient(circle, rgba(245,106,10,.2) 0%, transparent 62%);
}

.enrollment-kicker {
    display: block;
    margin-bottom: 10px;
    color: #ff984e;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.enrollment-banner h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -.025em;
}

.enrollment-banner p {
    max-width: 760px;
    margin: 0 auto 28px;
    color: rgba(255,255,255,.82);
    line-height: 1.75;
}

.btn-enroll-2027 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 8px;
    background: var(--cca-orange);
    color: #fff;
    font-size: 1rem;
    font-weight: 650;
    box-shadow: 0 10px 24px rgba(245,106,10,.3);
}

.btn-enroll-2027:hover {
    color: #fff;
    background: var(--cca-orange-bright);
    transform: translateY(-2px);
}

.enrollment-banner .btn-whatsapp-info {
    border-radius: 8px;
    box-shadow: none;
}

/* Contact preview: avoid the legacy row's negative margins clipping desktop content. */
#contact > .container {
    width: min(1200px, calc(100% - 40px));
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 0;
}

#contact > .container > .row {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(32px, 5vw, 72px);
    width: 100%;
    margin-inline: 0;
}

#contact > .container > .row > .col-2 {
    width: auto;
    min-width: 0;
    max-width: none;
    padding-inline: 0;
}

#contact .contact-form {
    width: 100%;
    max-width: 100%;
}

#contact .contact-item,
#contact .contact-item > div,
#contact .contact-item p {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Gallery: one contained card per image, with captions in normal document flow. */
.gallery-masonry {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    align-items: start;
    gap: 24px;
}

.gallery-masonry .gallery-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: auto;
    border: 1px solid rgba(19,43,79,.1);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 32px rgba(9,26,48,.09);
}

.gallery-masonry .gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-masonry .gallery-item > img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    flex: 0 0 auto;
}

.gallery-masonry .gallery-item:hover > img {
    transform: scale(1.025);
}

.gallery-masonry .gallery-overlay {
    position: relative;
    inset: auto;
    z-index: 2;
    display: block;
    width: 100%;
    min-height: 132px;
    padding: 20px;
    opacity: 1;
    background: #fff;
}

.gallery-masonry .gallery-info,
.gallery-masonry .gallery-info h4 {
    color: var(--cca-navy-deep);
}

.gallery-masonry .gallery-info h4 {
    margin-bottom: 7px;
    font-size: 1.08rem;
}

.gallery-masonry .gallery-info p {
    color: #647083;
    line-height: 1.55;
}

@media (max-width: 768px) {
    body { padding-top: 72px; }

    .section > .container,
    .page-header > .container,
    .footer > .container {
        width: calc(100% - 30px);
    }

    .header { min-height: 72px; }

    .hero {
        min-height: calc(100svh - 72px);
        background-position: 61% center;
    }

    .hero > .container {
        width: calc(100% - 30px);
    }

    .hero::before {
        background: linear-gradient(180deg, rgba(8,24,43,.78), rgba(8,24,43,.94));
    }

    .hero-content {
        padding: 58px 0 48px;
        text-align: left;
    }

    .hero h1 { font-size: clamp(2.35rem, 11vw, 3.45rem); }

    .hero-buttons { flex-direction: column; }
    .hero .hero-buttons .btn {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .hero-trust-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .campaign-card { border-radius: 16px; }

    .campaign-visual img {
        height: auto;
        aspect-ratio: 1983 / 793;
        object-fit: contain;
        object-position: center;
    }

    .campaign-sponsor {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .campaign-benefits {
        align-items: stretch;
        flex-direction: column;
    }

    .campaign-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .campaign-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .enrollment-banner { margin: 16px 0; }

    #contact > .container {
        width: calc(100% - 30px);
    }

    #contact > .container > .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .btn-enroll-2027,
    .enrollment-banner .btn-whatsapp-info {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .admissions-pill { font-size: .72rem; }
    .hero-trust-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .enrollment-banner::before { animation: none; }
}

@media print {
    .site-header[data-print-ignore] {
        display: none !important;
    }
}
