/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography general */
h1, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background-color: var(--surface);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(43, 43, 43, 0.05);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.hero-image {
    flex-shrink: 0;
}

.hero-portrait {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 50%;
    background-color: var(--bg-main);
    padding: 10px;
    border: 1px solid rgba(47, 93, 98, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.hero-divider {
    width: 60px;
    height: 2px;
    background: var(--secondary);
    margin: var(--spacing-xl) auto 0;
}

/* ========================================
   PROGRAMS SECTION
   ======================================== */
.programs-section {
    padding: var(--spacing-2xl) 0 calc(var(--spacing-2xl) * 1.5);
    background-color: var(--bg-main);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: var(--spacing-xl);
    align-items: start;
}

/* ========================================
   PROGRAM CARDS
   ======================================== */
.program-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 24px rgba(47,93,98,0.06);
    display: flex;
    flex-direction: column;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.07), 0 16px 40px rgba(47,93,98,0.10);
}

/* Featured Cards */
.program-card.featured {
    border-color: rgba(184, 107, 94, 0.35);
}

.program-card.featured::before {
    background: var(--secondary);
}

.program-card.pinnacle {
    background: linear-gradient(160deg, var(--surface) 0%, #fff 100%);
    border-color: rgba(47, 93, 98, 0.35);
}

.program-card.pinnacle::before {
    background: var(--primary);
}

.featured-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: var(--white);
    padding: 4px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 10;
    white-space: nowrap;
}

.featured-badge.gold {
    background: var(--primary);
}

/* ========================================
   CARD HEADER
   ======================================== */
.card-header {
    margin-bottom: 18px;
}

.featured .card-header {
    padding-top: 14px;
}

.program-title {
    font-size: 1.45rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 6px;
    line-height: 1.25;
}

.program-subtitle {
    font-size: 0.88rem;
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    font-family: var(--font-heading);
}

.program-description {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.75;
    font-size: 0.9rem;
    flex-grow: 1;
}

/* ========================================
   PAYMENT OPTIONS
   ======================================== */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.payment-option {
    position: relative;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
    gap: 8px;
}

.payment-option label:hover {
    border-color: rgba(47, 93, 98, 0.35);
    background: rgba(244,239,232,0.6);
}

.payment-option input[type="radio"]:checked + label {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(47, 93, 98, 0.08);
}

.payment-option input[type="radio"]:checked + label::before {
    content: '';
    position: absolute;
    left: -1.5px;
    top: -1.5px;
    bottom: -1.5px;
    width: 4px;
    background: var(--primary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.option-label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.88rem;
    flex: 1;
}

.option-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    white-space: nowrap;
}

.savings-badge {
    position: absolute;
    top: -10px;
    right: var(--spacing-md);
    background: var(--accent);
    color: var(--white);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* ========================================
   CHECKOUT BUTTON
   ======================================== */
.checkout-btn {
    width: 100%;
    padding: 13px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(47,93,98,0.25);
    margin-top: auto;
}

.checkout-btn:hover {
    background: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(47,93,98,0.30);
}

.checkout-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.checkout-btn:disabled {
    opacity: 0.65;
    cursor: default;
    transform: none;
}

/* ========================================
   ACCESS GATE OVERLAY
   ======================================== */
.checkout-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 40, 50, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
}

.checkout-gate-overlay.hidden {
    display: none;
}

.checkout-gate-card {
    background: var(--bg-main);
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    animation: gate-appear 0.3s ease;
}

@keyframes gate-appear {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.checkout-gate-card .gate-logo {
    height: 56px;
    width: auto;
    margin-bottom: 28px;
    object-fit: contain;
}

.checkout-gate-card h2 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.checkout-gate-card .gate-subtext {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.checkout-gate-card .gate-no-code {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.checkout-gate-card .gate-no-code a {
    color: var(--secondary);
    text-decoration: underline;
}

.gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 16px;
}

.gate-form input {
    padding: 14px 18px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: var(--font-body);
    text-align: center;
    letter-spacing: 4px;
    text-transform: uppercase;
    outline: none;
    background: var(--white);
    color: var(--text-main);
    transition: border-color 0.2s;
}

.gate-form input:focus {
    border-color: var(--primary);
}

.gate-form input.gate-shake {
    animation: gate-shake 0.4s ease;
    border-color: #c0392b;
}

@keyframes gate-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.gate-error {
    color: #c0392b;
    font-size: 0.88rem;
    margin: 0;
}

.gate-error a {
    color: #c0392b;
    text-decoration: underline;
}

/* Test mode banner */
.stripe-test-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stripe-test-banner a {
    color: #856404;
    text-decoration: underline;
    font-weight: 600;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: var(--surface);
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-top: 1px solid rgba(47, 93, 98, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1100px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 680px) {
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .program-card {
        padding: 24px 20px;
    }
}

@media (max-width: 400px) {
    .payment-option label {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
