/* ==========================================================================
   MOBILE-FIRST CSS FOR PRACTICAL REWARDS
   Modern Yellow/Gold Theme - 2025 Design
   ========================================================================== */

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
    background: #f5f5f4 !important;
    background-color: #f5f5f4 !important;
}

/* ==========================================================================
   FOREST FRESH THEME - CSS VARIABLES UPDATE
   Replace the :root section in your existing styles.css
   ========================================================================== */

:root {
    /* Modern Forest Fresh Color Palette */
    --primary-green: #059669;
    --primary-green-dark: #047857;
    --primary-green-light: #10b981;
    --accent-cream: #fef3c7;
    --accent-warm-cream: #fde68a;
    --accent-mint: #f0fdf4;
    --warm-gray-50: #fafaf9;
    --warm-gray-100: #f5f5f4;
    --warm-gray-200: #e7e5e4;
    --warm-gray-300: #d6d3d1;
    --warm-gray-400: #a8a29e;
    --warm-gray-500: #78716c;
    --warm-gray-600: #57534e;
    --warm-gray-700: #44403c;
    --warm-gray-800: #292524;
    --warm-gray-900: #1c1917;
    --white: #ffffff;
    --black: #000000;
    --primary-gold: #f59e0b;
    
    /* Forest theme specific colors */
    --forest-50: #f0fdf4;
    --forest-100: #dcfce7;
    --forest-200: #bbf7d0;
    --forest-300: #86efac;
    --forest-400: #4ade80;
    --forest-500: #22c55e;
    --forest-600: #16a34a;
    --forest-700: #15803d;
    --forest-800: #166534;
    --forest-900: #14532d;
    
    /* Cream theme specific colors */
    --cream-50: #fffbeb;
    --cream-100: #fef3c7;
    --cream-200: #fde68a;
    --cream-300: #fcd34d;
    --cream-400: #fbbf24;
    --cream-500: #f59e0b;
    --cream-600: #d97706;
    --cream-700: #b45309;
    --cream-800: #92400e;
    --cream-900: #78350f;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-light: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    --gradient-dark: linear-gradient(135deg, #047857 0%, #059669 100%);
    --gradient-mint: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    
    /* Shadows - Updated for forest theme */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-green: 0 4px 14px 0 rgba(5, 150, 105, 0.25);
    --shadow-green-lg: 0 10px 25px -3px rgba(5, 150, 105, 0.3);
    --shadow-cream: 0 4px 14px 0 rgba(254, 243, 199, 0.35);
}

/* ==========================================================================
   UPDATE EXISTING CLASSES - Find and replace these in your CSS
   ========================================================================== */

/* Header styles live in header.html; avoid overriding them here */

/* Update hero sections */
.hero, .hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 3rem 0 4rem 0;
    text-align: center;
    width: 100%;
    overflow: hidden;
    position: relative;
    contain: layout style; /* iOS 26 Safari fix: prevent layout overflow */
}

/* Update hero pattern overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-opacity='0.1'%3E%3Cpath d='M50 5L60 35L90 50L60 65L50 95L40 65L10 50L40 35Z' fill='%23ffffff'/%3E%3C/g%3E%3C/svg%3E") center/80px 80px;
    opacity: 0.08;
}

/* Update primary buttons */
.btn-primary, .cta-button {
    background: var(--gradient-light);
    color: var(--primary-green-dark);
    box-shadow: var(--shadow-cream);
    border: 2px solid transparent;
    font-weight: 700;
}

.btn-primary:hover, .cta-button:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-green-lg);
    border-color: var(--accent-cream);
}

/* Update secondary buttons */
.btn-secondary {
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-green);
}

/* Update outline buttons */
.btn-outline {
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-outline:hover {
    background: var(--primary-green);
    color: var(--white);
}

/* Hero CTA styling */
.hero-cta {
    margin-top: 2rem;
    text-align: center;
}

.hero-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
}

/* Force the exact styling from index page for hero CTA buttons */
.hero-cta .btn-primary {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #047857 !important;
    box-shadow: 0 8px 25px rgba(254, 243, 199, 0.3) !important;
    font-weight: 600 !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
}

.hero-cta .btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 35px rgba(254, 243, 199, 0.5) !important;
    color: #047857 !important;
    background: linear-gradient(135deg, #fde68a 0%, #fef3c7 100%) !important;
}

/* Update card hovers */
.option-card:hover, .feature-card:hover, .card-option:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-green-light);
}

/* Update form focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Update callout boxes */
.callout-box {
    background: var(--gradient-light);
    border-left: 4px solid var(--primary-green);
    padding: 1.25rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 1px solid var(--cream-200);
}

.callout-box h4 {
    color: var(--primary-green-dark);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.callout-box p {
    color: var(--forest-800);
    margin: 0;
    line-height: 1.6;
}

/* Update credit item hovers */
.credit-item:hover {
    border-color: var(--primary-green-light);
    background: var(--forest-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Update toggle slider */
input:checked + .toggle-slider {
    background-color: var(--primary-green);
}

/* Update progress fill */
.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 25%;
    transition: width 0.4s ease;
}

/* Update branch card hovers */
.branch-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Update footer link hovers */
.footer-section ul li a:hover {
    color: var(--primary-green-light);
}

/* Update focus visible styles */
button:focus-visible,
.btn:focus-visible,
.nav-btn:focus-visible,
.cta-button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* ==========================================================================
   NEW UTILITY CLASSES - Add these to your CSS
   ========================================================================== */

.bg-forest { background-color: var(--primary-green); }
.bg-forest-light { background-color: var(--primary-green-light); }
.bg-cream { background-color: var(--accent-cream); }
.bg-mint { background-color: var(--accent-mint); }

.text-forest { color: var(--primary-green); }
.text-forest-dark { color: var(--primary-green-dark); }
.text-cream { color: var(--accent-cream); }

.border-forest { border-color: var(--primary-green); }
.border-cream { border-color: var(--accent-cream); }

.gradient-forest { background: var(--gradient-primary); }
.gradient-cream { background: var(--gradient-light); }

/* Special forest-themed button variant */
.btn-forest-special {
    background: var(--gradient-light);
    color: var(--primary-green-dark);
    border: 2px solid var(--primary-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-cream);
    position: relative;
    overflow: hidden;
}

.btn-forest-special::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-forest-special:hover::before {
    left: 0;
}

.btn-forest-special:hover {
    color: var(--white);
    border-color: var(--accent-cream);
    box-shadow: var(--shadow-green-lg);
}

.btn-forest-special span {
    position: relative;
    z-index: 1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--warm-gray-800);
    background-color: var(--warm-gray-100);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Main content should grow to fill available space */
main, .main-content, .content-wrapper, .cards-page-content, .cards-container, .cards-section, .hero, section {
    flex: 1 0 auto;
}

/* Main content sections with warm grey background */
.features-section, .cards-section, .content-section, .calculator-section, .recommendation-section {
    background: var(--warm-gray-100);
    padding: 2rem 0;
}

/* Footer should stick to bottom */
footer, #footer-placeholder {
    flex-shrink: 0;
    margin-top: auto;
}

/* ==========================================================================
   MOBILE-FIRST UTILITY CLASSES
   ========================================================================== */

.container {
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
    max-width: 100vw;
}

/* Spacing utilities */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.mobile-hidden { 
    display: none !important; 
}

/* ==========================================================================
   TYPOGRAPHY - MODERN SCALE
   ========================================================================== */

h1 {
    font-size: 2.25rem; /* 36px */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--warm-gray-900);
    word-wrap: break-word;
    hyphens: auto;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.875rem;
    color: var(--warm-gray-900);
    word-wrap: break-word;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--warm-gray-800);
    word-wrap: break-word;
}

h4 {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--warm-gray-800);
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--warm-gray-600);
    max-width: 100%;
}

/* ==========================================================================
   BUTTONS - MODERN GOLD DESIGN
   ========================================================================== */

button, .btn, .nav-btn, .cta-button {
    min-height: 48px;
    min-width: 48px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0.25rem;
    position: relative;
    overflow: hidden;
}

.btn-primary, .cta-button {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-gold);
    border: 2px solid transparent;
}

.btn-primary:hover, .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-lg);
}

.btn-primary:active, .cta-button:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-gold);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.btn-outline {
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

.btn-outline:hover {
    background: var(--primary-gold);
    color: var(--white);
}

/* Header/nav/mobile menu styles now live in header.html to ensure universality */

/* ==========================================================================
   HERO SECTIONS - MODERN GOLD DESIGN
   ========================================================================== */

.hero, .hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 3rem 0 4rem 0;
    text-align: center;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-opacity='0.1'%3E%3Cpolygon fill='%23ffffff' points='50 0 60 40 100 50 60 60 50 100 40 60 0 50 40 40'/%3E%3C/g%3E%3C/svg%3E") center/60px 60px;
    opacity: 0.1;
}

.hero-content {
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.hero h1, .hero-section h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.1;
    word-wrap: break-word;
    hyphens: auto;
    letter-spacing: -0.025em;
}

.hero p, .hero-section p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 100%;
    color: var(--white);
}

/* ==========================================================================
   CARDS & GRIDS - MODERN DESIGN
   ========================================================================== */

.options-grid, .features-grid, .cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    width: 100%;
}

.option-card, .feature-card, .card-option {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    width: 100%;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.option-card::before, .feature-card::before, .card-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.option-card:hover, .feature-card:hover, .card-option:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-gold-light);
}

.option-card:hover::before, .feature-card:hover::before, .card-option:hover::before {
    transform: scaleX(1);
}

.option-icon, .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.option-card h3, .feature-card h3, .card-option h3 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: var(--warm-gray-900);
    line-height: 1.3;
    font-weight: 600;
}

.option-card p, .feature-card p {
    color: var(--warm-gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ==========================================================================
   FORMS - MODERN STYLING
   ========================================================================== */

input, textarea, select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--warm-gray-300);
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    font-size: max(1rem, 16px);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--white);
    color: var(--warm-gray-800);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--warm-gray-700);
    font-size: 0.9rem;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.content-section, .calculator-section {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
    width: 100%;
    border: 1px solid var(--warm-gray-200);
}

.content-section h2, .calculator-section h2 {
    color: var(--warm-gray-900);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    line-height: 1.3;
}

.content-section h3 {
    color: var(--warm-gray-800);
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.375rem;
    line-height: 1.3;
}

/* ==========================================================================
   NAVIGATION BUTTONS
   ========================================================================== */

.navigation-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    width: 100%;
}

.navigation-buttons .nav-btn {
    width: 100%;
    text-align: center;
    margin: 0;
    min-height: 52px;
    font-size: 1rem;
}

/* ==========================================================================
   CALLOUT BOXES - MODERN GOLD THEME
   ========================================================================== */

.callout-box {
    background: var(--gradient-light);
    border-left: 4px solid var(--primary-gold);
    padding: 1.25rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 1px solid var(--warm-gray-200);
}

.callout-box h4 {
    color: var(--warm-gray-800);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.callout-box p {
    color: var(--warm-gray-700);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   CALCULATOR SPECIFIC
   ========================================================================== */

.calculator-container {
    width: 100%;
    padding: 1rem;
    margin: 0 auto;
}

.credit-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--warm-gray-200);
    border-radius: 16px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--white);
}

.credit-item:hover {
    border-color: var(--primary-gold-light);
    background: var(--warm-gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.credit-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    margin: 0 auto;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--warm-gray-300);
    transition: .3s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: var(--white);
    transition: .3s;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

input:checked + .toggle-slider {
    background-color: var(--primary-gold);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

/* ==========================================================================
   LEARNING PAGE SPECIFIC
   ========================================================================== */

.progress-indicator, .clean-progress-nav {
    background: var(--white);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--warm-gray-200);
}

.progress-track {
    position: relative;
    background: var(--warm-gray-200);
    height: 8px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 25%;
    transition: width 0.4s ease;
}

.topic-branches {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.branch-card {
    background: var(--white);
    border: 2px solid var(--warm-gray-200);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.branch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.branch-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.branch-card:hover::before {
    transform: scaleX(1);
}

.branch-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   SECTIONS - MODERN STYLING
   ========================================================================== */

.features {
    padding: 4rem 0;
    background: var(--warm-gray-100);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--warm-gray-900);
}

.how-it-works {
    padding: 4rem 0;
    background: var(--warm-gray-100);
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--warm-gray-900);
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--warm-gray-200);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 0.75rem;
    color: var(--warm-gray-900);
}

.step p {
    color: var(--warm-gray-600);
    line-height: 1.6;
}

/* ==========================================================================
   FOOTER - MODERN DESIGN
   ========================================================================== */

footer {
    background: var(--warm-gray-900);
    color: var(--warm-gray-400);
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--warm-gray-400);
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    padding: 0.25rem 0;
}

.footer-section ul li a:hover {
    color: var(--primary-gold-light);
}

.footer-bottom {
    border-top: 1px solid var(--warm-gray-700);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

/* ==========================================================================
   TABLET BREAKPOINT (768px and up)
   ========================================================================== */

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
        max-width: 768px;
    }
    
    body {
        font-size: 16px;
    }
    
    .hero h1, .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero p, .hero-section p {
        font-size: 1.25rem;
    }
    
    .options-grid, .features-grid, .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .navigation-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .navigation-buttons .nav-btn {
        width: auto;
        min-width: 200px;
    }
    
    .credit-item {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        align-items: center;
    }
    
    .credit-toggle {
        margin: 0;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topic-branches {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   DETAIL ITEM STYLING - For special formatted blocks (Priority Pass style)
   ========================================================================== */

.priority-pass-details {
    margin: 1.5rem 0;
}

.detail-item {
    background: #f8fafc;
    border-left: 3px solid #059669;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    color: #059669;
    font-weight: 600;
}

/* Mobile responsiveness for detail-item */
@media (max-width: 768px) {
    .priority-pass-details {
        margin: 1rem 0 !important;
        display: block !important;
        flex-direction: unset !important;
        gap: unset !important;
    }
    
    .detail-item {
        background: #f8fafc !important;
        border-left: 3px solid #059669 !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
        border-radius: 0 6px 6px 0 !important;
        color: #374151 !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .detail-item:last-child {
        margin-bottom: 0 !important;
    }
    
    .detail-item strong {
        color: #059669 !important;
        font-weight: 600 !important;
    }
}

/* ==========================================================================
   CREDIT TABLE RESPONSIVE STYLING
   ========================================================================== */

/* Perks and Protections description styling */
.recommendation-list li strong {
    color: #1e293b; /* Black for bold benefit names */
    font-weight: 600;
}

.recommendation-list li {
    color: #64748b; /* Lighter grey for descriptions */
    font-size: 0.9rem; /* Smaller font size */
    line-height: 1.5;
}

.recommendation-list li a {
    color: #059669; /* Green color for links */
    text-decoration: none;
}

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

/* AGGRESSIVE OVERRIDE - Force light grey background everywhere */
.calculator-table,
.calculator-table .table-row,
.table-row,
.table-row .credit-info,
.table-row .credit-info .credit-description,
.credit-info,
.credit-description {
    background: #f8fafc !important; /* Force light grey background matching Practical Advice */
    background-color: #f8fafc !important; /* Double override */
}

/* SUPER AGGRESSIVE OVERRIDE for table-row specifically */
.table-row,
.table-row:hover,
.table-row[aria-expanded="true"],
.table-row[aria-expanded="false"],
.table-row.active,
.table-row .active {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

/* Override any expanded or active states */
.calculator-table .table-row[aria-expanded="true"],
.calculator-table .table-row[aria-expanded="false"],
.calculator-table .table-row.active,
.calculator-table .table-row .active,
.calculator-table .table-row .value-input.active {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

/* Target specific elements that need light grey background instead of wildcard */
.calculator-table .table-row,
.calculator-table .credit-info,
.calculator-table .credit-description,
.calculator-table .credit-breakdown {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

/* Completely exclude toggle elements from our overrides */
.calculator-table .toggle-container,
.calculator-table .credit-toggle,
.calculator-table .toggle-slider,
.calculator-table .toggle-slider::before {
    background: unset !important;
    background-color: unset !important;
}

/* Restore default toggle styling */
.calculator-table .toggle-slider {
    background-color: #cbd5e1 !important;
}

.calculator-table input:checked + .toggle-slider {
    background-color: #059669 !important;
}

.calculator-table .toggle-slider::before {
    background-color: white !important;
}

/* Force override for any dynamically added classes or states */
.calculator-table .table-row[class*="active"],
.calculator-table .table-row[class*="expanded"],
.calculator-table .table-row[class*="toggled"],
.calculator-table .table-row[class*="on"] {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

/* SUPER SPECIFIC OVERRIDE - Target table-row when it contains active elements */
.calculator-table .table-row:has(.value-input.active),
.calculator-table .table-row:has(.active),
.calculator-table .table-row:has([class*="active"]) {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

/* Alternative approach - Target table-row when any child is active */
.calculator-table .table-row .value-input.active ~ *,
.calculator-table .table-row .value-input.active + *,
.calculator-table .table-row .value-input.active {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

/* Credit section background styling to match page background */
.table-row {
    background: #f8fafc !important; /* Light grey background matching Practical Advice */
    border-radius: 0 !important; /* Remove rounded corners for straight separator lines */
    margin: 0.5rem 0 !important;
    padding: 1rem !important;
    border-bottom: 2px solid #059669 !important; /* Dark green border between credit sections */
}

/* Remove border from the last credit section */
.table-row:last-child {
    border-bottom: none !important;
}

/* Credit table background styling to match page background */
.credit-description {
    background: transparent !important; /* Transparent background since parent has the grey */
    border-left: none !important; /* Remove the green left border */
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* More specific selector to override card-styles.css */
.table-row .credit-info .credit-description {
    background: transparent !important;
    border-left: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* Mobile-first responsive design for credit tables */
@media (max-width: 768px) {
    /* SUPER AGGRESSIVE MOBILE OVERRIDE */
    .calculator-table,
    .calculator-table *,
    .table-row,
    .table-row *,
    .credit-info,
    .credit-info *,
    .credit-description,
    .credit-description * {
        background: #f8fafc !important;
        background-color: #f8fafc !important;
    }
    
    /* Target specific elements that need light grey background on mobile */
    .calculator-table .table-row,
    .calculator-table .credit-info,
    .calculator-table .credit-description,
    .calculator-table .credit-breakdown {
        background: #f8fafc !important;
        background-color: #f8fafc !important;
    }
    
    /* Completely exclude toggle elements from our overrides on mobile */
    .calculator-table .toggle-container,
    .calculator-table .credit-toggle,
    .calculator-table .toggle-slider,
    .calculator-table .toggle-slider::before {
        background: unset !important;
        background-color: unset !important;
    }
    
    /* Restore default toggle styling on mobile */
    .calculator-table .toggle-slider {
        background-color: #cbd5e1 !important;
    }
    
    .calculator-table input:checked + .toggle-slider {
        background-color: #059669 !important;
    }
    
    .calculator-table .toggle-slider::before {
        background-color: white !important;
    }
    
    /* Force override for any dynamically added classes or states on mobile */
    .calculator-table .table-row[class*="active"],
    .calculator-table .table-row[class*="expanded"],
    .calculator-table .table-row[class*="toggled"],
    .calculator-table .table-row[class*="on"] {
        background: #f8fafc !important;
        background-color: #f8fafc !important;
    }
    
    /* Force override for table-row hover states on mobile */
    .table-row:hover,
    .table-row:focus,
    .table-row:active,
    .table-row[aria-expanded="true"],
    .table-row[aria-expanded="false"],
    .table-row.active,
    .table-row .active,
    .table-row .value-input.active {
        background: #f8fafc !important;
        background-color: #f8fafc !important;
    }
    
    /* Override tan background on mobile for entire credit sections */
    .table-row {
        background: #f8fafc !important; /* Light grey background matching Practical Advice */
        border-radius: 0 !important; /* Remove rounded corners for straight separator lines */
        margin: 0.5rem 0 !important;
        padding: 1rem !important;
        display: block !important;
        width: 100% !important;
        border-bottom: 2px solid #059669 !important; /* Dark green border between credit sections */
    }
    
    /* Remove border from the last credit section on mobile */
    .table-row:last-child {
        border-bottom: none !important;
    }
    
    /* Ensure credit info container also has light grey background */
    .credit-info {
        background: #f8fafc !important;
        width: 100% !important;
    }
    
    /* Override any existing background colors */
    .credit-description {
        background: transparent !important;
        border-left: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .credit-breakdown {
        display: block !important;
        width: 100% !important;
        background: transparent !important;
    }
    
    .credit-breakdown .credit-row {
        display: block !important;
        margin-bottom: 1rem !important;
        border-bottom: 1px solid rgba(5, 150, 105, 0.2) !important; /* Light green separator lines with 80% transparency */
        padding-bottom: 1rem !important;
        background: transparent !important;
    }
    
    .credit-breakdown .credit-row:last-child {
        border-bottom: none !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .credit-breakdown .credit-label {
        display: block !important;
        width: 100% !important;
        font-weight: bold !important;
        font-size: 0.9em !important;
        color: inherit !important;
        padding: 0 0 0.5rem 0 !important;
        margin: 0 !important;
        border-bottom: none !important;
        vertical-align: top !important;
        background: transparent !important;
    }
    
    .credit-breakdown .credit-detail {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border-bottom: none !important;
        vertical-align: top !important;
        line-height: 1.4 !important;
        background: transparent !important;
    }
}

/* Tablet and larger screens - keep table layout */
@media (min-width: 769px) {
    .credit-breakdown {
        display: table !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    .credit-breakdown .credit-row {
        display: table-row !important;
    }
    
    .credit-breakdown .credit-label {
        display: table-cell !important;
        width: 120px !important;
        vertical-align: middle !important;
        padding: 2px 8px 2px 0 !important;
        font-weight: bold !important;
        font-size: 0.9em !important;
        color: inherit !important;
        border-bottom: 1px solid rgba(5, 150, 105, 0.2) !important; /* Light green separator lines with 80% transparency */
    }
    
    .credit-breakdown .credit-detail {
        display: table-cell !important;
        vertical-align: middle !important;
        padding: 2px 0 !important;
        color: inherit !important;
        border-bottom: 1px solid rgba(5, 150, 105, 0.2) !important; /* Light green separator lines with 80% transparency */
    }
    
    /* Remove border from last row */
    .credit-breakdown .credit-row:last-child .credit-label,
    .credit-breakdown .credit-row:last-child .credit-detail {
        border-bottom: none !important;
    }
}

/* ==========================================================================
   iOS 26 SAFARI COMPREHENSIVE FIXES
   ========================================================================== */

/* iOS Safari Detection and Global Fixes */
@supports (-webkit-touch-callout: none) {
    /* Global iOS Safari layout fixes */
    html {
        /* Fix viewport units on iOS Safari - use dynamic viewport height */
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for iOS Safari */
        height: 100svh; /* Small viewport height fallback */
    }
    
    body {
        /* Create proper flex container for iOS Safari */
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        contain: layout;
        position: relative;
        overflow-x: hidden;
    }
    
    /* Main content should grow to fill space */
    main, .main-content, .content-wrapper, .cards-page-content {
        flex: 1 0 auto;
        min-height: 0; /* Allow flex shrinking */
        contain: layout;
        position: relative;
        width: 100%;
        max-width: 100vw;
        max-width: 100dvw;
    }
    
    /* Footer should stick to bottom without overlay */
    footer, #footer-placeholder {
        flex-shrink: 0;
        margin-top: auto;
        position: relative !important;
        z-index: 100;
        clear: both;
        contain: layout;
        width: 100%;
        max-width: 100vw;
        max-width: 100dvw;
    }
    
    /* Container fixes for all pages */
    .container {
        contain: layout;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        width: 100%;
        max-width: 100%;
    }
    
    /* Hero section fixes across all pages */
    .hero, .hero-section {
        contain: layout style paint;
        /* Ensure proper viewport calculation */
        width: 100%;
        max-width: 100vw;
        max-width: 100dvw;
        overflow-x: hidden;
    }
    
    /* Content section fixes */
    .content-section, .calculator-section {
        contain: layout;
        position: relative;
        margin-bottom: 2rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* Card and grid fixes */
    .options-grid, .features-grid, .cards-grid,
    .option-card, .feature-card, .card-option {
        contain: layout;
        width: 100%;
        max-width: 100%;
    }
    
    /* Navigation and button fixes */
    .navigation-buttons {
        contain: layout;
        margin-bottom: 2rem;
        width: 100%;
    }
    
    /* Fix for cards page specifically */
    .cards-container, .filter-section, .cards-section {
        position: relative;
        width: 100%;
        max-width: 100%;
        contain: layout;
    }
    
    /* iOS Safari mobile-specific fixes */
    @media (max-width: 768px) {
        /* More aggressive mobile fixes */
        html {
            overflow-x: hidden;
            width: 100%;
            max-width: 100vw;
            max-width: 100dvw;
        }
        
        body {
            overflow-x: hidden;
            position: relative;
            width: 100%;
            max-width: 100vw;
            max-width: 100dvw;
            /* Force body to use flex layout on mobile */
            display: flex !important;
            flex-direction: column !important;
        }
        
        /* Add extra safe area padding on mobile */
        .container {
            padding-bottom: calc(2rem + env(safe-area-inset-bottom, 20px));
            width: 100%;
            max-width: 100%;
        }
        
        /* Prevent any content from escaping */
        .hero, .hero-section {
            max-width: 100vw;
            max-width: 100dvw;
            overflow-x: hidden;
            width: 100%;
        }
        
        /* Fix footer positioning on mobile iOS */
        footer, #footer-placeholder {
            width: 100% !important;
            max-width: 100vw !important;
            max-width: 100dvw !important;
            position: relative !important;
            z-index: 1000;
            margin-top: auto !important;
            flex-shrink: 0 !important;
        }
        
        /* Ensure main content areas grow properly */
        main, .main-content, .content-wrapper, .cards-page-content {
            flex: 1 0 auto !important;
            width: 100%;
            max-width: 100%;
        }
        
        /* Ensure proper stacking context for all content */
        .content-section, .calculator-section,
        .recommendation-section, .features, .how-it-works,
        .cards-container, .filter-section, .cards-section {
            position: relative;
            z-index: 1;
            contain: layout;
            width: 100%;
            max-width: 100%;
        }
        
        /* Specific fixes for cards page mobile layout */
        .cards-grid, .card-grid {
            width: 100%;
            max-width: 100%;
            margin-bottom: 2rem;
        }
        
        /* Mobile filter fixes */
        .mobile-filters, .mobile-filters-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 2000;
            width: 100vw;
            width: 100dvw;
            height: 100vh;
            height: 100dvh;
            height: 100svh;
        }
        
        /* Mobile filter footer should not overlap */
        .mobile-filters-footer {
            position: sticky;
            bottom: env(safe-area-inset-bottom, 0px);
            background: white;
            z-index: 2001;
        }
    }
    
    /* iPhone specific fixes for notch and home indicator */
    @media (max-width: 480px) {
        body {
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }
        
        /* Ensure content doesn't get hidden behind home indicator */
        .navigation-buttons, .button-container {
            margin-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        }
        
        /* Extra bottom padding for footer on iPhone */
        footer, #footer-placeholder {
            padding-bottom: calc(1rem + env(safe-area-inset-bottom, 20px)) !important;
        }
    }
    
    /* iOS 26 specific viewport stability fixes */
    @media screen and (max-width: 768px) {
        /* Use the most stable viewport units */
        html {
            height: 100vh;
            height: 100svh; /* Small viewport height - most stable on iOS */
        }
        
        body {
            min-height: 100vh;
            min-height: 100svh;
        }
        
        /* Prevent dynamic viewport changes from causing layout shifts */
        .hero, .hero-section {
            height: auto;
            min-height: 40vh;
            min-height: 40svh;
        }
    }
}