/* ======================================================= */
/* ==   1. BASE (DARK) THEME STYLES FOR VALUE SECTION   == */
/* ======================================================= */

#value-section {
    padding: 6rem 0;
}

.value-prop {
    background: linear-gradient(145deg, rgba(58, 80, 107, 0.15) 0%, rgba(11, 19, 43, 0.9) 100%);
    border: 1px solid rgba(0, 245, 212, 0.15); border-radius: 24px; padding: 3rem;
    margin-bottom: 4rem; backdrop-filter: blur(20px); text-align: center;
}
.value-title { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 600; color: var(--kinetic-teal); margin-bottom: 2rem; }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.value-item { text-align: center; }
.value-number { font-family: 'Orbitron', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--signal-green); display: block; margin-bottom: 0.5rem; }
.value-label { font-size: 0.9rem; color: var(--starlight); opacity: 0.8; text-transform: uppercase; letter-spacing: 0.05em; }

.format-comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.format-card { background: linear-gradient(145deg, rgba(58, 80, 107, 0.2) 0%, rgba(11, 19, 43, 0.8) 100%); border: 1px solid rgba(226, 232, 240, 0.1); border-radius: 20px; padding: 2.5rem; position: relative; overflow: hidden; backdrop-filter: blur(15px); transition: all 0.4s ease; }
.format-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); border-color: var(--kinetic-teal); }
.format-card.featured { border: 2px solid var(--kinetic-teal); background: linear-gradient(145deg, rgba(0, 245, 212, 0.08) 0%, rgba(11, 19, 43, 0.9) 100%); transform: scale(1.02); }
.format-card.featured::before { content: 'MODULAR ACCESS'; position: absolute; top: 45px; right: -90px; background: linear-gradient(135deg, var(--kinetic-teal) 0%, var(--hyper-blue) 100%); color: var(--pure-white); padding: 0.3rem 5rem; font-size: 0.8rem; font-weight: 700; font-family: 'Orbitron', sans-serif; letter-spacing: 0.05em; transform: rotate(45deg); }
.card-header { text-align: center; margin-bottom: 2rem; }
.format-title { font-family: 'Orbitron', sans-serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; }
.apx-title { color: var(--kinetic-teal); }
.competitor-title { color: var(--starlight); opacity: 0.8; }
.format-subtitle { font-size: 0.9rem; opacity: 0.7; margin-bottom: 1.5rem; }
.pricing-section { text-align: center; margin-bottom: 2rem; padding: 1.5rem; background: rgba(255, 255, 255, 0.03); border-radius: 12px; }
.price-label { font-size: 0.9rem; opacity: 0.7; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.price-amount { font-family: 'Orbitron', sans-serif; font-size: 2.2rem; font-weight: 700; color: var(--pure-white); display: block; margin-bottom: 0.3rem; }
.apx-price { color: var(--kinetic-teal); }
.price-details { font-size: 0.85rem; opacity: 0.7; }
.features-list { list-style-type: none; margin-bottom: 2rem; padding-left: 0; }
.feature-item { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; padding: 0.8rem; background: rgba(255, 255, 255, 0.03); border-radius: 8px; border-left: 3px solid transparent; }
.featured .feature-item { border-left-color: var(--kinetic-teal); }
.feature-icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--pure-white); font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.feature-icon.excellent { background: var(--signal-green); } .feature-icon.good { background: var(--neural-gold); } .feature-icon.limited { background: var(--ignition-orange); } .feature-icon.none { background: var(--fusion-coral); }
.feature-text { font-size: 0.9rem; color: var(--starlight); }

.roi-chart { background: linear-gradient(145deg, rgba(58, 80, 107, 0.15) 0%, rgba(11, 19, 43, 0.9) 100%); border: 1px solid rgba(0, 245, 212, 0.15); border-radius: 24px; padding: 3rem; margin-bottom: 4rem; backdrop-filter: blur(20px); }
.chart-title { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 600; color: var(--pure-white); text-align: center; margin-bottom: 3rem; }
.roi-grid { display: flex; flex-direction: column; border: 1px solid rgba(226, 232, 240, 0.1); border-radius: 12px; overflow: hidden; }
.roi-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; border-top: 1px solid rgba(226, 232, 240, 0.1); }
.roi-grid .roi-row:first-child { border-top: none; }
.roi-header, .roi-cell { padding: 1.2rem; text-align: center; border-right: 1px solid rgba(226, 232, 240, 0.05); }
.roi-header { background: linear-gradient(135deg, var(--quantum-blue) 0%, rgba(58, 80, 107, 0.8) 100%); font-weight: 600; }
.roi-cell { background: rgba(58, 80, 107, 0.03); }
.roi-header:last-child, .roi-cell:last-child { border-right: none; }
.roi-header.metric, .roi-cell.metric { text-align: left; }
.roi-header.metric { font-family: 'Orbitron', sans-serif; color: var(--kinetic-teal); }
.roi-cell.metric { font-weight: 500; background: rgba(0, 245, 212, 0.02); }
.roi-cell.apx { background: linear-gradient(135deg, rgba(0, 245, 212, 0.08) 0%, rgba(0, 245, 212, 0.03) 100%); }
.roi-value { font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 700; }
.value-excellent { color: var(--signal-green); } .value-good { color: var(--neural-gold); } .value-fair { color: var(--ignition-orange); } .value-poor { color: var(--fusion-coral); }

/* ======================================================= */
/* ==   2. LIGHT THEME OVERRIDES FOR VALUE SECTION      == */
/* ======================================================= */

.theme-light .value-prop,
.theme-light .format-card,
.theme-light .roi-chart {
    background: var(--pure-white);
    border-color: #e9ecef;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: none;
}

.theme-light .value-prop:hover,
.theme-light .format-card:hover,
.theme-light .roi-chart:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.theme-light .value-title,
.theme-light .apx-title,
.theme-light .roi-header.metric {
    color: var(--kinetic-teal);
}

.theme-light .value-label,
.theme-light .competitor-title,
.theme-light .format-subtitle,
.theme-light .price-label,
.theme-light .price-details,
.theme-light .feature-text {
    color: var(--graphite);
    opacity: 0.9;
}

.theme-light .value-number {
    color: var(--signal-green);
}

.theme-light .format-card.featured {
    border-color: var(--kinetic-teal);
    background: #f0fcf9; /* A very light teal */
}

.theme-light .pricing-section {
    background: #f8f9fa; /* Light grey background */
}

.theme-light .price-amount,
.theme-light .chart-title {
    color: var(--graphite);
}

.theme-light .apx-price {
    color: var(--kinetic-teal);
}

.theme-light .feature-item {
    background: #f8f9fa;
}

.theme-light .roi-header {
    background: #f1f3f5;
    color: var(--graphite);
    font-weight: 700;
}

.theme-light .roi-grid,
.theme-light .roi-row,
.theme-light .roi-header,
.theme-light .roi-cell {
    border-color: #e9ecef;
}

.theme-light .roi-cell {
    background: var(--pure-white);
}

.theme-light .roi-cell.metric {
    background: #f8f9fa;
    color: var(--graphite); /* ADD THIS - metric text color */
}

.theme-light .roi-cell.apx {
    background: #f0fcf9;
}

/* ======================================================= */
/* ==   3. BULLETPROOF RESPONSIVE FIX FOR ROI TABLE     == */
/* ======================================================= */

@media (max-width: 768px) {

    /* --- ROI TABLE CONTAINER --- */
    .roi-chart {
        padding: 1.5rem;
    }
    .roi-grid {
        border: none;
    }

    /* Hide the original desktop header row */
    .roi-grid .roi-header-row {
        display: none;
    }

    /* --- INDIVIDUAL CATEGORY BLOCKS --- */
    /* Using a more specific selector to ensure it overrides desktop styles */
    .roi-grid > .roi-row {
        display: block; /* Override 'display: grid' */
        border: 1px solid rgba(226, 232, 240, 0.1);
        border-radius: 12px;
        margin-bottom: 1.5rem;
        overflow: hidden;
    }
    .theme-light .roi-grid > .roi-row { border-color: #e9ecef; }
    .roi-grid .roi-row:last-child { margin-bottom: 0; }


    /* --- THE CATEGORY TITLE (e.g., "Cost Per Hour") --- */
    /* This rule is now more specific */
    .roi-grid .roi-cell.metric {
        display: block; 
        text-align: center;
        background: rgba(0, 245, 212, 0.1);
        font-weight: 700;
        font-size: 1.1rem;
        padding: 1rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.1);
    }
    .theme-light .roi-grid .roi-cell.metric {
        background: #f1f3f5;
        border-bottom-color: #e9ecef;
    }


    /* --- THE DATA ROWS (e.g., "APX Instinct: $148/hr") --- */
    /* Targeting data cells directly under a row */
    .roi-row > .roi-cell:not(.metric) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 1rem;
        text-align: right;
        border-top: 1px solid rgba(226, 232, 240, 0.05);
        background: none !important;
    }
    .theme-light .roi-row > .roi-cell:not(.metric) { 
        border-top-color: #f1f3f5;
    }
    
    /* The first data row doesn't need a top border */
    .roi-cell.metric + .roi-cell {
        border-top: none;
    }


    /* --- GENERATE THE LABELS --- */
    .roi-cell:not(.metric)::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        color: var(--starlight);
        opacity: 0.8;
    }
    .theme-light .roi-cell:not(.metric)::before { 
        color: var(--graphite); 
    }
}
