:root {
    --bg-a: #061124;
    --bg-b: #0f1f44;
    --bg-c: #1a3a75;
    --line: rgba(255, 255, 255, 0.14);
    --text: #eaf0ff;
    --muted: #b8c5e8;
    --glass: rgba(255, 255, 255, 0.11);
    --glass-strong: rgba(255, 255, 255, 0.16);
    --primary: #7dd3fc;
    --accent: #f97316;
    --radius-xl: 28px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(1200px 900px at 20% 0%, #173772 0%, transparent 70%), linear-gradient(135deg, var(--bg-a), var(--bg-b) 45%, var(--bg-c));
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, .brand strong { font-family: 'Clash Display', 'Space Grotesk', sans-serif; letter-spacing: 0.2px; }

.bg-layer {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
    pointer-events: none;
    z-index: -3;
}

.bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(64px);
    opacity: 0.42;
    pointer-events: none;
    z-index: -2;
    animation: float 14s ease-in-out infinite;
}

.bg-orb-a { width: 360px; height: 360px; top: -80px; right: -60px; background: #38bdf8; }
.bg-orb-b { width: 300px; height: 300px; bottom: 18%; left: -70px; background: #f97316; animation-delay: 2s; }
.bg-orb-c { width: 280px; height: 280px; top: 44%; right: 28%; background: #22d3ee; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
}

.container { width: min(1180px, 92%); margin: 0 auto; }

.glass {
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 46px rgba(0,0,0,0.25);
}

.site-header {
    position: sticky;
    top: 16px;
    z-index: 20;
    margin: 16px auto 0;
    width: min(1220px, 95%);
}
.site-header + main {
    margin-top: 26px;
}

.nav-wrap {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text);
}

.brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.22);
}

.brand strong { font-size: 1rem; display: block; }
.brand small { color: var(--muted); font-size: 0.78rem; }

nav { display: flex; gap: 0.9rem; flex-wrap: wrap; }
nav a {
    color: #d8e4ff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.45rem 0.68rem;
    border-radius: 10px;
}
nav a:hover { background: rgba(255,255,255,0.1); }

.site-header.header-collapsed .nav-wrap {
    min-height: 78px;
    justify-content: flex-start;
    pointer-events: none;
}
.site-header.header-collapsed .brand span {
    display: none;
}
.site-header.header-collapsed nav {
    display: none;
}
.site-header.header-collapsed {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.site-header.header-collapsed .brand {
    pointer-events: auto;
    padding: 8px;
    border-radius: 999px;
    background:
        radial-gradient(120% 120% at 18% 18%, rgba(125, 211, 252, 0.26), rgba(125, 211, 252, 0) 58%),
        rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(180, 228, 255, 0.42);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 18px rgba(34, 211, 238, 0.24);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: heroFloat 3.2s ease-in-out infinite;
}
.site-header.header-collapsed .brand img {
    width: 40px;
    height: 40px;
    border-radius: 999px;
}


@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.hero { padding: 6rem 0 2.2rem; }
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
    align-items: stretch;
}

.hero-main, .hero-side { padding: 1.6rem; }
.tag {
    display: inline-block;
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9bdcff;
    font-weight: 700;
}

h1 {
    margin: 0.7rem 0 0.9rem;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1.02;
}

.hero-main p { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.cert-hero {
    padding: 2.4rem 0 0.6rem;
}
.cert-hero-box {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cert-hero-copy {
    min-width: 0;
}
.cert-hero-copy .tag {
    margin-bottom: 0.3rem;
    font-size: 0.68rem;
}
.cert-hero-copy h1 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.05rem, 2.2vw, 1.55rem);
    line-height: 1.18;
}
.cert-hero-copy p {
    margin: 0;
    font-size: clamp(0.82rem, 1.1vw, 0.92rem);
    line-height: 1.45;
    max-width: 64ch;
}
.cert-hero-actions {
    margin-top: 0;
    flex-shrink: 0;
}

.hero-actions {
    margin-top: 1.1rem;
    display: flex;
    gap: 0.72rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.75rem 1.15rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform .2s ease, filter .2s ease;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-solid {
    background: linear-gradient(130deg, var(--primary), #22d3ee);
    color: #06213f;
}

.btn-ghost {
    background: rgba(255,255,255,0.08);
    color: #ebf2ff;
    border-color: rgba(255,255,255,0.2);
}

.hero-side h2 { margin-top: 0; margin-bottom: 0.7rem; }
.hero-side ul { margin: 0; padding-left: 1.1rem; color: var(--muted); line-height: 1.78; }

.section { padding: 1.2rem 0 2.4rem; }
.section-head {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.section-head span { color: var(--muted); }
.cert-list-head h2 {
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.program-grid {
    display: grid;
    gap: 0.95rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.program-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.program-card:hover {
    transform: translateY(-8px);
    border-color: rgba(125, 211, 252, 0.45);
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(125, 211, 252, 0.22) inset;
}

.course-head {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(140deg, #3049ad, var(--course-bg));
    overflow: hidden;
}
.course-bg-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform .35s ease, filter .35s ease;
}
.program-card:hover .course-bg-image {
    transform: scale(1.05);
    filter: saturate(1.12) brightness(1.06);
}
.course-head-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 10, 26, 0.1), rgba(3, 10, 26, 0.62));
    pointer-events: none;
}
.course-level-badge {
    position: absolute;
    top: 16px;
    right: 14px;
    z-index: 2;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ecf4ff;
    background: rgba(173, 221, 255, 0.26);
    border: 1px solid rgba(173, 221, 255, 0.38);
    backdrop-filter: blur(6px);
}
.course-logo-center {
    position: absolute;
    top: 34%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
}
.course-logo-shell {
    width: 94px;
    height: 94px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.2), rgba(132, 220, 255, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(3, 10, 26, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}
.course-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}
.course-head-content {
    position: absolute;
    inset: auto 16px 12px 16px;
    z-index: 1;
}
.program-card > div { padding: 1rem; }
.course-head-content h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(1.15rem, 1.7vw, 1.42rem);
    line-height: 1.14;
    max-width: 88%;
}
.course-subtitle {
    margin: 0;
    color: rgba(235, 243, 255, 0.92) !important;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    line-height: 1.4;
    max-width: 90%;
}
.program-card p { margin: 0; color: var(--muted); line-height: 1.65; }

.pill {
    margin-top: .9rem;
    display: inline-block;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.16);
    border: 1px solid rgba(125, 211, 252, 0.38);
    padding: 0.35rem 0.7rem;
    font-weight: 700;
    color: #ccf4ff;
    font-size: .84rem;
}

.cert-grid {
    display: grid;
    gap: 0.95rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.cert-card {
    border-radius: var(--radius-lg);
    padding: 0.85rem;
    align-self: start;
}

.cert-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    margin-bottom: 0.72rem;
}

.cert-card h3 { margin: 0 0 .5rem; }
.cert-card p { margin: 0.1rem 0; color: var(--muted); line-height: 1.55; }
.cert-card a { color: #86ecff; text-decoration: none; font-weight: 700; display: inline-block; margin-top: .6rem; }
.cert-details {
    margin-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 0.55rem;
}
.cert-details summary {
    cursor: pointer;
    color: #d9e7ff;
    font-weight: 700;
    list-style: none;
}
.cert-details summary::-webkit-details-marker {
    display: none;
}
.cert-details summary::after {
    content: "▾";
    margin-left: 8px;
    font-size: 0.9rem;
}
.cert-details[open] summary::after {
    content: "▴";
}
.cert-details-body {
    margin-top: 0.45rem;
}

.contact-box {
    padding: 1.4rem;
    text-align: center;
}

.contact-box h2 { margin: 0 0 .4rem; }
.contact-box p { margin: 0 0 .85rem; color: var(--muted); }

.empty { padding: 1.1rem; color: var(--muted); }

@media (max-width: 1020px) {
    .hero-grid,
    .program-grid,
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 5.2rem;
    }
    .cert-hero {
        padding-top: 4.8rem;
    }
    .cert-hero-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .cert-hero-actions {
        width: 100%;
    }
    .cert-hero-actions .btn {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .site-header {
        top: 8px;
    }

    .nav-wrap {
        min-height: 70px;
    }

    nav { display: none; }

}

.btn-accent {
    background: linear-gradient(130deg, #fb7185, #f97316);
    color: #fff;
}

.mini-enroll {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #8be9ff;
    text-decoration: none;
    font-weight: 700;
    font: inherit;
}

.contact-form {
    margin-top: 0.9rem;
    text-align: left;
}
.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field-label {
    font-size: 0.88rem;
    color: #d9e7ff;
    font-weight: 700;
}
.field-label span {
    color: #fb7185;
}

.contact-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.7rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    font: inherit;
    line-height: 1.4;
    color: #eaf0ff;
    background: rgba(255, 255, 255, 0.07);
}
.contact-form select {
    min-height: 46px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 16px;
}
.contact-form .is-invalid {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.18);
}
.field-error {
    margin: 0;
    color: #fca5a5;
    font-size: 0.82rem;
    line-height: 1.3;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #b6c5e9;
}

.contact-success {
    margin-top: 0.8rem;
    color: #86efac;
    font-weight: 700;
}

@media (max-width: 1020px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.enroll-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.enroll-modal[hidden] {
    display: none !important;
}

.enroll-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 10, 25, 0.72);
}

.enroll-modal-card {
    position: relative;
    width: min(880px, 96%);
    max-height: 90vh;
    overflow: auto;
    padding: 1.2rem;
    z-index: 1;
}
.enroll-modal-card .contact-form {
    padding-bottom: 0.2rem;
}
.enroll-actions {
    position: sticky;
    bottom: -1px;
    margin-top: 0.9rem;
    margin-bottom: 0;
    padding: 0.75rem 0 0.35rem;
    background: transparent;
}
.enroll-actions .btn {
    width: 100%;
}

.enroll-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #d6e4ff;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}
