/* ========================================
   COMPACT GOOGLE-STYLE COMPARISON PAGE
   Tight, scannable, professional
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ======================
   ROOT VARIABLES
   ====================== */
:root {
    --primary-dark: #0f1419;
    --primary-navy: #1a2332;
    --primary-green: #8B9A5B;
    --primary-green-light: #a8b87c;
    --accent-gold: #D4AF37;

    --text-primary: #0f1419;
    --text-secondary: #525f7f;
    --text-muted: #8898aa;

    --bg-white: #ffffff;
    --bg-cream: #fafaf8;
    --bg-light: #f7f9fc;
    --bg-dark: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);

    --border-light: #e3e8ef;
    --shadow-sm: 0 1px 3px rgba(15, 20, 25, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 20, 25, 0.08);
    --shadow-lg: 0 8px 24px rgba(15, 20, 25, 0.12);

    /* REAL HEADER HEIGHTS FROM main.css */
    --nav-height-desktop: 88px;
    --nav-height-mobile: 60px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    background: var(--bg-dark);
    padding: calc(5rem + var(--nav-height-desktop)) 2rem 4rem;
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    padding: 0.625rem 1.5rem;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50px;
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.hero-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ========================================
   TOP 3 PICKS SECTION
   ======================================== */

.top-picks-section {
    background: white;
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.top-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.pick-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.pick-card:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.pick-card.preferred-pick {
    border-color: var(--primary-green);
    border-width: 3px;
}

.pick-badge {
    display: inline-flex;
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.pick-badge.best-overall {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
}

.pick-badge.best-budget {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
}

.pick-badge.best-install {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
}

.pick-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pick-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pick-rating .stars {
    color: #fbbf24;
}

.pick-rating .rating-number {
    color: var(--text-secondary);
    font-weight: 700;
}

.pick-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.pick-features {
    list-style: none;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.pick-features li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.pick-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: 800;
}

.pick-pricing {
    background: var(--bg-light);
    padding: 0.875rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

.price-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pick-cta {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.btn-pick {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.btn-pick.primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
}

.btn-pick.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 154, 91, 0.3);
}

.btn-pick.secondary {
    background: white;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

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

/* ========================================
   COMPANIES SECTION - COMPACT GOOGLE STYLE
   ======================================== */

.companies-section {
    background: var(--bg-light);
    padding: 3rem 0;
}

.company-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    overflow: hidden;
}

.company-card:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-sm);
}

.company-card.preferred {
    border-color: var(--primary-green);
    border-width: 2px;
    box-shadow: var(--shadow-sm);
}

/* ULTRA-COMPACT HEADER - Real Google Style */
.company-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    transition: background 0.2s;
    min-height: 60px;
}

.company-card.collapsed .company-header {
    padding: 0.625rem 1rem;
    min-height: 50px;
}

.company-card.collapsed .company-header:hover {
    background: var(--bg-light);
}

.company-rank {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-dark));
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.company-card.preferred .company-rank {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
}

.company-main-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.company-title-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.company-badge {
    display: inline-flex;
    padding: 0.1875rem 0.625rem;
    border-radius: 50px;
    font-size: 0.5625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.preferred-badge {
    background: var(--primary-green);
    color: white;
}

.budget-badge {
    background: #3b82f6;
    color: white;
}

.install-badge {
    background: #8b5cf6;
    color: white;
}

/* ULTRA-COMPACT META ROW - Single Line */
.company-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.company-rating {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.company-rating .stars {
    color: #fbbf24;
    font-size: 0.875rem;
}

.meta-divider {
    color: var(--text-muted);
    font-weight: 400;
}

.company-year,
.company-price,
.company-specialty {
    font-weight: 500;
}

.expand-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.125rem;
}

.company-card.collapsed .expand-hint::after {
    content: ' ▼';
}

.company-card:not(.collapsed) .expand-hint {
    display: none;
}

/* COLLAPSIBLE CONTENT */
.company-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.25rem 1.25rem;
}

.company-card.collapsed .company-content {
    max-height: 0;
    padding: 0 1.25rem;
}

.company-card.preferred .company-content {
    border-top: 1px solid var(--border-light);
    padding-top: 1.25rem;
}

/* QUICK FACTS - Compact Grid */
.company-quick-facts {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: grid;
    gap: 0.625rem;
}

.fact-item {
    display: flex;
    font-size: 0.875rem;
}

.fact-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 100px;
}

.fact-value {
    color: var(--text-primary);
    font-weight: 500;
}

.company-section {
    margin-bottom: 1.25rem;
}

.company-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
}

.company-section ul {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.company-section li {
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.company-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: 800;
}

.company-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.testimonial-box {
    background: var(--bg-light);
    border-left: 3px solid var(--accent-gold);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.25rem 0;
}

.testimonial-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.testimonial-author {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
}

.company-cta {
    display: flex;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.btn-company {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.btn-company.primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
}

.btn-company.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 154, 91, 0.3);
}

.btn-company.secondary {
    background: white;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

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

.company-card:not(.preferred) .company-cta {
    display: none;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.pros-section, .cons-section {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
}

.pros-section h4 {
    color: #10b981;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.cons-section h4 {
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.pros-section ul, .cons-section ul {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.pros-section li, .cons-section li {
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pros-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 800;
}

.cons-section li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: 800;
}

/* ========================================
   FAQ SECTION
   ======================================== */

.faq-section {
    background: white;
    padding: 3rem 0;
}

.faq-list {
    max-width: 900px;
    margin: 2rem auto 0;
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-green);
}

.faq-item.active {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-question:hover {
    color: var(--primary-green);
}

.faq-icon {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-green);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-content {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ========================================
   FINAL CTA
   ======================================== */

.final-cta-section {
    background: var(--bg-dark);
    padding: 3rem 0;
    text-align: center;
}

.final-cta-content h2 {
    font-size: 2.25rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 800;
}

.final-cta-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.final-cta-btn.primary {
    background: linear-gradient(135deg, var(--accent-gold), #fbbf24);
    color: var(--primary-dark);
}

.final-cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.final-cta-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.final-cta-btn.secondary:hover {
    background: white;
    color: var(--primary-dark);
}

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

@media (max-width: 768px) {
    .hero-section {
        padding-top: calc(5rem + var(--nav-height-mobile));
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.875rem;
    }

    .top-picks-grid {
        grid-template-columns: 1fr;
    }

    .company-header {
        flex-direction: row;
    }

    .company-rank {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .company-name {
        font-size: 1.125rem;
    }

    .pros-cons-grid {
        grid-template-columns: 1fr;
    }

    .final-cta-buttons {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }
}