/* California Safe Driver - Main Stylesheet */
/* Matches homepage PNG mockup exactly */

:root {
    --csd-navy: #38458E;
    --csd-dark: #2c3e50;
    --csd-gold: #E26B15;
    --csd-green: #3a5a3a;
    --csd-cream: #f2eee8;
    --csd-graybar: #e8e6e1;
    --csd-white: #ffffff;
    --csd-text: #1a2d52;
    --csd-text-light: #555555;
}

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

/* Registered trademark and trademark symbols as superscript */
.content-section, .hero-content, .badges-section, .site-footer {
    /* No CSS-only way to target &reg; entity. Using font-size reduction via template markup. */
}
sup, .reg-mark { font-size: 0.6em; vertical-align: super; }

/* Playfair Display italic glyphs read poorly at display sizes. Heading-level
 * <em> (used to emphasize product names like "Alive at 25") stays semantic
 * but renders upright so the display font looks clean. Body <em> stays italic. */
h1 em, h2 em, h3 em, h4 em, h5 em, h6 em,
.nav-brand-text em,
[style*="Playfair"] em {
    font-style: normal;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--csd-text);
    line-height: 1.6;
    background: var(--csd-cream);
}

/* Page wrapper - constrains content width on wide monitors */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--csd-cream);
}

/* ========== NAVIGATION ========== */
.site-nav {
    background: var(--csd-cream);
    padding: 1rem 0.75rem 1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--csd-navy);
}

.nav-brand img {
    height: 112px;
    width: 112px;
    border-radius: 50%;
    position: relative;
    z-index: 11;
    margin-bottom: -28px;
}

.nav-brand-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.85rem;
    font-weight: 700;
    color: #38458E;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--csd-text);
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-size: 1.15rem;
}

.nav-links a:hover {
    color: var(--csd-navy);
}

.btn-enroll-nav {
    background: var(--csd-gold) !important;
    color: white !important;
    padding: 0.45rem 1.2rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem !important;
    line-height: 1.4;
}

.btn-enroll-nav:hover {
    background: #C05A11 !important;
}

.btn-login {
    border: 1.5px solid var(--csd-text);
    padding: 0.45rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem !important;
    line-height: 1.4;
}

.nav-links .btn-login:hover {
    background: var(--csd-text);
    color: white;
}

.lang-selector {
    position: relative;
}

.btn-lang {
    background: transparent;
    color: var(--csd-text);
    padding: 0.45rem 1rem;
    border: 1.5px solid var(--csd-text);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-lang:hover {
    background: var(--csd-text);
    color: white;
}

.btn-lang-open {
    border-radius: 4px 4px 0 0;
}

.lang-caret {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.btn-lang-open .lang-caret {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 100%;
    z-index: 1000;
}

.lang-dropdown-open {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1.1rem;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--csd-text);
    cursor: pointer;
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--csd-cream);
}

.lang-active {
    font-weight: 700;
    color: var(--csd-green);
}

.lang-check {
    flex-shrink: 0;
    stroke: var(--csd-green);
}

/* ========== AUTH SPLIT LAYOUT ========== */
.auth-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
}

.auth-panel {
    background: var(--csd-white);
    border: 1px solid #e2dfd9;
    border-radius: 10px;
    padding: 2rem 2rem 1.75rem;
}

.auth-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--csd-navy);
    margin-bottom: 0.35rem;
}

.auth-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 4rem;
}

.auth-divider-line {
    width: 1px;
    height: 80px;
    background: #ddd;
}

.auth-divider-text {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
}

@media (max-width: 768px) {
    .auth-split {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-divider {
        flex-direction: row;
        padding-top: 0;
        margin: 1.5rem 0;
    }

    .auth-divider-line {
        width: 80px;
        height: 1px;
    }
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    overflow: hidden;
    /* Crop top ~25% of photo (sky area) */
}

.hero-img {
    display: block;
    width: 100%;
    height: auto;
    /* Pull image up to crop sky (~30% off top) */
    margin-top: -16%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.45) 30%, rgba(255,255,255,0.15) 45%, transparent 60%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    max-width: 1400px;
    width: 100%;
    padding: 3rem 3.5rem;
}

.hero-content h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--csd-navy);
    margin-bottom: 1.25rem;
    max-width: 700px;
}

.hero-h1-line2 {
    white-space: nowrap;
}

.hero-content p {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.65;
    color: var(--csd-text);
    max-width: 620px;
}

/* ========== BADGES SECTION ========== */
.badges-section {
    background: var(--csd-cream);
    text-align: center;
    padding: 0.75rem 2rem 1.5rem;
}

.badges-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--csd-navy);
    margin-bottom: 1rem;
}

.badges-section h2 span {
    font-style: italic;
}

.badge-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.badge-item {
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.badge-item img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

a.badge-item {
    text-decoration: none;
    transition: transform 0.15s ease;
}

a.badge-item:hover {
    transform: scale(1.05);
}

.badge-item-alive img {
    height: 200px;
    max-height: 200px;
    width: auto;
}

.badge-item-adod img {
    max-height: 200px;
}

.badge-item-ddc4 {
    width: 250px;
}
.badge-item-ddc4 img {
    max-height: 210px;
    max-width: 250px;
}

.badge-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--csd-text);
    text-align: center;
    line-height: 1.3;
}

.badges-tagline {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    color: var(--csd-text-light);
    margin-top: 0.75rem;
}

/* ========== CONTENT SECTIONS ========== */
.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-section h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    color: var(--csd-navy);
    margin-bottom: 1.25rem;
}

.content-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    color: var(--csd-navy);
    margin-bottom: 1rem;
}

.content-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--csd-text);
}

/* Indent bulleted / numbered lists so the bullets sit inside the content column
   rather than out in the left margin. Lists with their own class (.course-list,
   nav lists, etc.) opt out by defining their own padding. */
.content-section ul:not([class]),
.content-section ol:not([class]) {
    padding-left: 2.5rem;
    margin: 0.75rem 0 1.25rem;
}

.content-section ul:not([class]) li,
.content-section ol:not([class]) li {
    margin-bottom: 0.35rem;
    line-height: 1.6;
}

.content-section h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    color: var(--csd-navy);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.disclaimer-text {
    font-size: 0.85rem;
    color: var(--csd-text-light);
    margin-top: 2rem;
    line-height: 1.6;
}

/* ========== COURSE LIST ========== */
.course-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 2rem;
    margin: 1rem 0 0 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.course-list li {
    font-size: 1.05rem;
}

@media (max-width: 480px) {
    .course-list {
        grid-template-columns: 1fr;
    }
}

.course-list li a {
    color: var(--csd-navy);
    text-decoration: none;
    font-weight: 600;
}

.course-list li a:hover {
    text-decoration: underline;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--csd-cream);
    color: var(--csd-text);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #d5d0c8;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-logos img {
    height: 50px;
    opacity: 0.9;
}

.site-footer p {
    font-size: 0.9rem;
    color: var(--csd-text-light);
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: var(--csd-navy);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ========== MESSAGES ========== */
.message, .csd-message {
    max-width: 1100px;
    margin: 0 auto 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Inter', system-ui, sans-serif;
}
.message.success, .csd-message-success { background: #e8f4ed; color: #1a5632; border-left: 4px solid #198754; }
.message.error, .csd-message-error { background: #fde8e8; color: #991b1b; border-left: 4px solid #dc3545; }
.message.warning, .csd-message-warning { background: #fef8e8; color: #856404; border-left: 4px solid #E26B15; }
.message.info, .csd-message-info { background: #e8f0fe; color: #1a4e8a; border-left: 4px solid #38458E; }

/* ========== HAMBURGER MENU ========== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--csd-navy);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-line + .hamburger-line {
    margin-top: 5px;
}

.hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========== RESPONSIVE TABLE WRAPPER ========== */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========== RESPONSIVE ========== */

/* Tablets */
@media (max-width: 768px) {
    /* Hamburger visible on mobile */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .site-nav {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        position: relative;
    }

    .nav-brand img {
        height: 64px;
        width: 64px;
        margin-bottom: -12px;
    }

    .nav-brand-text {
        font-size: 1.6rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        background: var(--csd-cream);
        border-top: 1px solid var(--csd-graybar);
        padding: 0.5rem 0;
    }

    .nav-links.nav-open {
        display: flex;
    }

    /* Touch targets: minimum 44px height for nav links */
    .nav-links a {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        min-height: 44px;
        width: 100%;
    }

    .btn-login {
        justify-content: center;
        padding: 0.75rem 1.4rem;
        min-height: 44px;
    }

    .lang-selector {
        width: 100%;
    }

    .btn-lang {
        justify-content: center;
        padding: 0.75rem 1.3rem;
        min-height: 44px;
        width: 100%;
    }

    .lang-dropdown {
        position: static;
        border-radius: 0 0 4px 4px;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    /* Touch targets: footer links */
    .site-footer a {
        display: inline-block;
        padding: 0.5rem 0.25rem;
        min-height: 44px;
        line-height: 2;
    }

    /* Payment page: stack float on mobile */
    .content-section div[style*="float: right"] {
        float: none !important;
        max-width: 100% !important;
        margin: 1.5rem 0 !important;
    }

    /* Enrollment form: button rows stack on mobile */
    .content-section div[style*="display: flex"][style*="gap: 1rem"] {
        flex-direction: column !important;
    }

    .content-section div[style*="display: flex"][style*="gap: 1rem"] > * {
        width: 100%;
        text-align: center;
    }

    /* Enrollment form: full-width on mobile */
    .content-section form[style*="max-width: 500px"] {
        max-width: 100% !important;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.1rem;
    }

    .hero-h1-line2 {
        white-space: normal;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .hero-overlay {
        background: linear-gradient(to right, rgba(255,255,255,0.6), rgba(255,255,255,0.2) 60%, transparent);
    }

    .badge-row {
        gap: 2rem;
    }

    .badge-item {
        width: 150px;
    }

    .badge-item img {
        max-height: 100px;
    }

    .badges-tagline {
        font-size: 0.85rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.7rem; }
    .hero-content p { font-size: 0.9rem; }
    .badge-item { width: 120px; }
    .badge-item img { max-height: 80px; }
    .badge-row { gap: 1.25rem; }
}

/* ========== TESTIMONIALS ========== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 0 auto;
    justify-content: center;
}

.testimonial-card {
    background: var(--csd-white);
    border: 1px solid #e2dfd9;
    border-radius: 8px;
    padding: 2.25rem 1.4rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before,
.testimonial-card::after {
    position: absolute;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.25rem;
    line-height: 1;
    color: var(--csd-gold);
    opacity: 0.22;
    pointer-events: none;
    font-style: normal;
}

.testimonial-card::before {
    content: "\201C";
    top: 0.35rem;
    left: 0.6rem;
}

.testimonial-card::after {
    content: "\201D";
    bottom: 0.9rem;
    right: 0.7rem;
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--csd-text);
    font-style: italic;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    font-size: 0.8rem;
    color: var(--csd-text-light);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ========== FAQ ACCORDION ========== */
.faq-list {
    max-width: 800px;
}

.faq-item {
    border-bottom: 1px solid #e2dfd9;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--csd-navy);
    text-align: left;
    gap: 1rem;
}

.faq-question:hover {
    color: var(--csd-gold);
}

.faq-arrow {
    font-size: 0.75rem;
    color: var(--csd-gold);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 0 0 0.5rem;
    color: var(--csd-text);
    line-height: 1.7;
}

.faq-open .faq-answer {
    padding-bottom: 1rem;
}

.faq-answer ul {
    margin: 0.5rem 0 0.5rem 1.25rem;
}

.faq-answer li {
    margin-bottom: 0.4rem;
}

/* ========== COURSE CARDS ========== */
.course-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: var(--csd-white);
    border: 1px solid #e2dfd9;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    border-color: var(--csd-gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.course-card-body {
    flex: 1;
    min-width: 0;
    padding-right: 1.5rem;
}

.course-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    color: var(--csd-navy);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.course-card-meta {
    font-size: 0.85rem;
    color: var(--csd-text-light);
    margin-bottom: 0.4rem;
}

.course-card-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--csd-text);
    margin: 0;
}

.course-card-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    gap: 0.4rem;
    min-width: 120px;
}

.course-card-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--csd-navy);
}

.course-card-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--csd-gold);
}

.course-card:hover .course-card-btn {
    color: #b8920a;
}

@media (max-width: 600px) {
    .course-card {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }

    .course-card-body {
        padding-right: 0;
    }

    .course-card-action {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        width: 100%;
        padding-top: 0.5rem;
        border-top: 1px solid #f0ede8;
    }
}

/* ========== ENROLLMENT FLOW ========== */

/* Container */
.enroll-container {
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Step Progress Bar */
.step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-bar li {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--csd-text-light);
    white-space: nowrap;
}

.step-bar li::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: var(--csd-white);
    color: #999;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.step-bar li.step-active::before {
    background: var(--csd-gold);
    border-color: var(--csd-gold);
    color: var(--csd-white);
}

.step-bar li.step-active {
    color: var(--csd-navy);
    font-weight: 600;
}

.step-bar li.step-done::before {
    content: "✓";
    background: var(--csd-navy);
    border-color: var(--csd-navy);
    color: var(--csd-white);
}

.step-bar li.step-done {
    color: var(--csd-navy);
}

.step-bar li + li::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: #ddd;
    margin: 0 0.75rem;
    order: -1;
}

.step-bar li.step-done + li::after,
.step-bar li.step-active + li::after {
    background: var(--csd-navy);
}

/* Mobile step indicator */
.step-mobile {
    display: none;
    text-align: center;
    font-size: 0.9rem;
    color: var(--csd-text-light);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.step-mobile strong {
    color: var(--csd-navy);
}

/* Course Header Card */
.enroll-course-header {
    background: var(--csd-white);
    border: 1px solid #e2dfd9;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.enroll-course-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    color: var(--csd-navy);
    margin: 0;
}

.enroll-course-header .course-meta {
    font-size: 0.9rem;
    color: var(--csd-text-light);
}

.enroll-course-header .course-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--csd-navy);
}

/* Form Styling */
.enroll-card {
    background: var(--csd-white);
    border: 1px solid #e2dfd9;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.enroll-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    color: var(--csd-navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--csd-navy);
    margin-bottom: 0.35rem;
}

.form-group .help-text {
    font-size: 0.8rem;
    color: var(--csd-text-light);
    margin-top: 0.25rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid #d1cdc5;
    border-radius: 6px;
    background: var(--csd-white);
    color: var(--csd-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--csd-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.form-input::placeholder {
    color: #aaa;
}

.form-input.is-invalid,
.form-select.is-invalid {
    border-color: #c0392b;
}

.form-error {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

/* Checkbox field */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--csd-gold);
}

.form-check label {
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--csd-text);
}

/* Order Summary */
.order-summary {
    background: var(--csd-white);
    border: 1px solid #e2dfd9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.order-summary h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    color: var(--csd-navy);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.order-line {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.order-line.order-total {
    border-top: 2px solid var(--csd-navy);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--csd-navy);
}

/* Terms Box */
.terms-box {
    background: #fefcf3;
    border: 1px solid #e8dfc0;
    border-left: 4px solid var(--csd-gold);
    border-radius: 0 6px 6px 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.terms-box p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: var(--csd-text);
}

.terms-box ul,
.terms-box ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.terms-box li {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

/* Countdown Timer */
.countdown-bar {
    background: #fff8e1;
    border: 1px solid #f0e0a0;
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.countdown-bar .timer {
    font-weight: 700;
    color: #b8860b;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--csd-gold);
    color: var(--csd-white);
    border: none;
    border-radius: 6px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background: #c49a35;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--csd-navy);
    border: 2px solid var(--csd-navy);
    border-radius: 6px;
    padding: 0.7rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--csd-navy);
    color: var(--csd-white);
}

.btn-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
}

.btn-row-right {
    justify-content: flex-end;
}

.btn-row-between {
    justify-content: space-between;
    flex-direction: row-reverse;
}

/* Payment Container (for Authorize.net iframe) */
.payment-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.payment-iframe-container {
    padding: 0;
}

.payment-iframe-container iframe {
    width: 100%;
    border: none;
    min-height: 700px;
}

@media (max-width: 768px) {
    .payment-iframe-container iframe {
        min-height: 800px;
    }
}

.payment-secure-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--csd-text-light);
    margin-top: 0.75rem;
}

.payment-secure-note svg {
    flex-shrink: 0;
}

/* Confirmation Card */
.confirmation-card {
    background: var(--csd-white);
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.confirmation-card .check-icon {
    width: 64px;
    height: 64px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.confirmation-card .check-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
    stroke-width: 3;
    fill: none;
}

.confirmation-card h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    color: var(--csd-navy);
    margin-bottom: 0.75rem;
}

.confirmation-card p {
    font-size: 1rem;
    color: var(--csd-text-light);
    margin-bottom: 0.5rem;
}

.confirmation-details {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem auto;
    max-width: 500px;
    text-align: left;
}

.confirmation-details dt {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--csd-text-light);
    margin-top: 0.75rem;
}

.confirmation-details dt:first-child {
    margin-top: 0;
}

.confirmation-details dd {
    font-size: 1rem;
    color: var(--csd-text);
    margin: 0.15rem 0 0 0;
}

/* ========== ENROLLMENT RESPONSIVE ========== */
@media (max-width: 768px) {
    .step-bar {
        display: none;
    }
    .step-mobile {
        display: block;
    }
    .payment-layout {
        grid-template-columns: 1fr;
    }
    .enroll-course-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    .btn-row {
        flex-direction: column-reverse;
    }
    .btn-row > * {
        width: 100%;
        text-align: center;
    }
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .enroll-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    .enroll-card {
        padding: 1.25rem;
    }
    .order-summary {
        padding: 1rem;
    }
}

/* ========== STUDENT PORTAL ========== */

.portal-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.portal-welcome {
    margin-bottom: 2rem;
}

.portal-welcome h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: var(--csd-navy);
    margin-bottom: 0.75rem;
}

.portal-stats {
    display: flex;
    gap: 1.5rem;
}

.portal-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--csd-text-light);
    font-weight: 500;
}

.portal-stat-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--csd-navy);
    color: var(--csd-white);
    font-weight: 700;
    font-size: 0.85rem;
}

.portal-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.portal-main {
    min-width: 0;
}

.portal-card {
    background: var(--csd-white);
    border: 1px solid #e2dfd9;
    border-radius: 8px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.portal-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    color: var(--csd-navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.portal-enrollment {
    padding: 1rem 0;
    border-bottom: 1px solid #f0ede8;
}

.portal-enrollment:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.portal-enrollment:first-child {
    padding-top: 0;
}

.portal-enrollment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.portal-enrollment-header h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--csd-navy);
    margin: 0;
}

.portal-enrollment-header h3 a {
    color: var(--csd-navy);
    text-decoration: none;
}

.portal-enrollment-header h3 a:hover {
    text-decoration: underline;
}

.portal-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}

/* Logistics pill buttons */
.logistics-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.logistics-done {
    background: #198754;
    color: white;
}
.logistics-done:hover {
    background: #146c43;
}
.logistics-pending {
    background: #fde2e2;
    color: #991b1b;
}
.logistics-pending:hover {
    background: #f5c6c6;
}

/* Rich text editor */
.rich-editor-wrapper {
    border: 1px solid #d0cdc6;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}
.rich-toolbar {
    display: flex;
    gap: 4px;
    padding: 0.4rem 0.5rem;
    background: linear-gradient(180deg, #fafafa 0%, #f0eee8 100%);
    border-bottom: 1px solid #d0cdc6;
}
.rich-btn {
    width: 32px;
    height: 30px;
    border: 1px solid #d0cdc6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    color: var(--csd-navy);
    transition: all 0.1s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.rich-btn:hover {
    background: var(--csd-navy);
    color: white;
    border-color: var(--csd-navy);
}
.rich-btn:active {
    transform: scale(0.95);
}
.rich-editable {
    padding: 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    min-height: 8em;
}

.portal-badge-enrolled {
    background: #dbeafe;
    color: #1e40af;
}

.portal-badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.portal-badge-failed {
    background: #fde2e2;
    color: #991b1b;
}

.portal-badge-noshow {
    background: #fef3c7;
    color: #92400e;
}

.portal-enrollment-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.portal-detail {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.portal-detail-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--csd-text-light);
    min-width: 80px;
    flex-shrink: 0;
}

.portal-zoom-btn {
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
}

.portal-empty {
    font-size: 0.95rem;
    color: var(--csd-text-light);
    padding: 0.5rem 0;
}

.portal-empty a {
    color: var(--csd-navy);
    font-weight: 600;
    text-decoration: none;
}

.portal-empty a:hover {
    text-decoration: underline;
}

/* Countdown badges */
.portal-countdown {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}
.portal-countdown-days {
    background: #ede9fe;
    color: #5b21b6;
}
.portal-countdown-tomorrow {
    background: #fef3c7;
    color: #92400e;
}
.portal-countdown-today {
    background: #d1fae5;
    color: #065f46;
}
.portal-countdown-soon {
    background: #ffedd5;
    color: #c2410c;
}

.portal-header-badges {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

.portal-zoom-pending {
    font-size: 0.85rem;
    color: var(--csd-text-light);
    font-style: italic;
}

.portal-txn-id {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.portal-receipt-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--csd-navy);
    text-decoration: none;
    white-space: nowrap;
}
.portal-receipt-link:hover {
    text-decoration: underline;
}

/* Payment Table */
.portal-payment-table {
    width: 100%;
    border-collapse: collapse;
}

.portal-payment-table thead th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--csd-text-light);
    border-bottom: 2px solid #e2dfd9;
    white-space: nowrap;
}

.portal-payment-table tbody td {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0ede8;
}

.portal-payment-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sidebar */
.portal-sidebar {
    min-width: 0;
}

.portal-profile-readonly {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0ede8;
}

.portal-profile-readonly .portal-detail {
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.75rem;
}

.portal-profile-readonly .portal-detail:last-child {
    margin-bottom: 0;
}

.portal-profile-readonly .portal-detail-label {
    min-width: unset;
}

.portal-help-text {
    font-size: 0.75rem;
    color: #999;
    display: block;
    margin-top: 0.15rem;
}

.portal-profile-form {
    margin-bottom: 1rem;
}

.portal-profile-form .form-group {
    margin-bottom: 1rem;
}

.portal-profile-form .form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--csd-navy);
    margin-bottom: 0.3rem;
}

.portal-save-btn {
    width: 100%;
    margin-top: 0.5rem;
}
.portal-edit-btn {
    font-size: 0.75rem;
    color: var(--csd-navy);
    text-decoration: none;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border: 1px solid #d0cdc6;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.1s;
}
.portal-edit-btn:hover {
    background: var(--csd-navy);
    color: white;
    border-color: var(--csd-navy);
}

.portal-profile-links {
    padding-top: 1rem;
    border-top: 1px solid #f0ede8;
}

.portal-profile-links .btn-secondary {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.portal-actions-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    text-align: center;
}

.portal-browse-btn {
    width: 100%;
}

.portal-logout-link {
    display: block;
    text-align: center;
    color: var(--csd-text-light);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.portal-logout-link:hover {
    color: var(--csd-navy);
}

/* Portal: Cancel + Credits */
.portal-enrollment-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0ede8;
}

.portal-cancel-btn {
    display: inline-block;
    font-size: 0.8rem;
    color: #b91c1c;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    transition: all 0.15s;
}
.portal-cancel-btn:hover {
    background: #b91c1c;
    color: white;
    border-color: #b91c1c;
}

.portal-cancel-contact {
    font-size: 0.78rem;
    color: var(--csd-text-light);
    margin: 0;
    line-height: 1.4;
}

.portal-cancel-page {
    max-width: 640px;
    margin: 0 auto;
}
.portal-cancel-page h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    color: var(--csd-navy);
    margin-bottom: 0.5rem;
}
.portal-cancel-subtitle {
    color: var(--csd-text-light);
    margin-bottom: 1.5rem;
}

.portal-cancel-details {
    margin-bottom: 1.5rem;
}

.portal-cancel-credit-notice {
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.portal-cancel-credit-notice p {
    margin: 0;
    font-weight: 600;
    color: #92400e;
}
.portal-cancel-credit-note {
    font-weight: 400 !important;
    font-size: 0.9rem;
    margin-top: 0.4rem !important;
}

.portal-cancel-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-danger {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: #b91c1c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s;
}
.btn-danger:hover {
    background: #991b1b;
}

/* Portal Responsive */
@media (max-width: 768px) {
    .portal-layout {
        grid-template-columns: 1fr;
    }

    .portal-welcome h1 {
        font-size: 1.6rem;
    }

    .portal-card {
        padding: 1.25rem;
    }

    .portal-enrollment-header {
        flex-direction: column;
        gap: 0.4rem;
    }

    .portal-header-badges {
        flex-wrap: wrap;
    }

    .portal-detail {
        flex-direction: column;
        gap: 0.1rem;
    }

    .portal-detail-label {
        min-width: unset;
    }

    .portal-payment-table {
        font-size: 0.85rem;
    }

    .portal-payment-table thead th,
    .portal-payment-table tbody td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .portal-container {
        padding: 1rem;
    }

    .portal-welcome h1 {
        font-size: 1.4rem;
    }

    .portal-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========== COOKIE CONSENT BANNER ========== */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--csd-navy);
    color: var(--csd-white);
    padding: 1rem 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.cookie-consent-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-consent-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    color: var(--csd-white);
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.cookie-btn-accept {
    background: var(--csd-gold);
    color: var(--csd-navy);
}

.cookie-btn-accept:hover {
    background: #c49a35;
}

.cookie-btn-decline {
    background: transparent;
    color: var(--csd-white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-btn-decline:hover {
    border-color: var(--csd-white);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
}
