/* CSS for index_brand_owners_and_private_label_newww.html */

* { font-family: 'Inter', system-ui, sans-serif; }
    html { scroll-behavior: smooth; }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { transition: none !important; } }

    :focus-visible { outline: 3px solid #046bfc; outline-offset: 2px; border-radius: 4px; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

    /* ============================================
        READING PROGRESS BAR
    ============================================ */
    .reading-progress { position: fixed; top: 0; left: 0; width: 0%; height: 4px; background: linear-gradient(90deg, #046bfc, #ff9900, #10b981); z-index: 9999; transition: width 0.1s ease; }

    /* ============================================
        SECTION INDICATOR
    ============================================ */
    .section-indicator {
        position: fixed; top: 72px; left: 0; right: 0;
        background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
        border-bottom: 1px solid #e2e8f0; padding: 6px 24px;
        z-index: 40; transform: translateY(-100%); transition: transform 0.3s ease;
        text-align: center; font-size: 0.75rem; font-weight: 600;
        color: #046bfc; letter-spacing: 1px; text-transform: uppercase;
    }
    .section-indicator.visible { transform: translateY(0); }

    /* ============================================
        SCROLL REVEAL ANIMATIONS
    ============================================ */
    .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
    .reveal.revealed { opacity: 1; transform: translateY(0); }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }

    /* ============================================
        HERO
    ============================================ */
    .hero-section { position: relative; overflow: hidden; }
    .hero-blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.7; pointer-events: none; z-index: 0; }
    .hero-blob-1 { width: 500px; height: 500px; background: rgba(4, 107, 252, 0.3); top: -180px; left: -120px; }
    .hero-blob-2 { width: 400px; height: 400px; background: rgba(255, 153, 0, 0.2); top: 40px; right: -80px; }
    .hero-blob-3 { width: 350px; height: 350px; background: rgba(16, 185, 129, 0.15); bottom: -80px; left: 30%; }
    @media (max-width: 768px) {
        .hero-blob { opacity: 0.35; filter: blur(120px); }
        .hero-blob-1 { width: 300px; height: 300px; }
        .hero-blob-2 { width: 250px; height: 250px; }
        .hero-blob-3 { width: 220px; height: 220px; }
    }
    .hero-grid { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(4,107,252,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(4,107,252,0.03) 1px, transparent 1px); background-size: 60px 60px; z-index: 1; }

    /* ============================================
        PROMO BANNER
    ============================================ */
    .promo-banner { background: linear-gradient(90deg, #046bfc 0%, #04143d 30%, #04143d 70%, #046bfc 100%); }
    .hot-badge { animation: pulse 2s ease-in-out 3; }
    @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

    /* ============================================
        TOC SIDEBAR
    ============================================ */
    .toc-link { color: #64748b; transition: all 0.2s ease; display: block; padding: 0.5rem 0; border-left: 2px solid transparent; padding-left: 1rem; font-size: 0.875rem; }
    .toc-link:hover { color: #046bfc; border-left-color: #046bfc; background: rgba(4,107,252,0.05); }
    .toc-link.active { color: #046bfc !important; border-left-color: #046bfc !important; background: rgba(4,107,252,0.08); font-weight: 600; }
    @media (max-width: 1024px) { .toc-link { min-height: 48px; display: flex; align-items: center; } }
    .mobile-toc-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
    .mobile-toc-content.open { max-height: 600px; }

    /* ============================================
        ARTICLE CONTENT STYLES
    ============================================ */
    .article-content section { scroll-margin-top: 100px; }
    .article-content h2 { display: block !important; color: #04143d !important; font-weight: 700 !important; font-size: 1.75rem !important; line-height: 1.3 !important; margin-top: 3rem !important; margin-bottom: 1.25rem !important; padding-bottom: 0.5rem !important; border-bottom: 3px solid #046bfc !important; }
    .article-content > section:first-child h2:first-child { margin-top: 0 !important; }
    @media (max-width: 768px) { .article-content h2 { font-size: 1.5rem !important; } }
    .article-content h3 { color: #04143d; font-weight: 600; font-size: 1.25rem; line-height: 1.4; margin-top: 2rem; margin-bottom: 0.75rem; }
    .article-content p { color: #475569; line-height: 1.8; margin-bottom: 1.25rem; }
    /* Allow Tailwind color utilities to work inside dark-bg containers */
    .article-content .bg-gradient-to-br p,
    .article-content .bg-gradient-to-br div,
    .article-content .bg-gradient-to-r p,
    .article-content .bg-gradient-to-r div { color: inherit; margin-bottom: 0; }
    .article-content .bg-gradient-to-br h3,
    .article-content .bg-gradient-to-r h3 { color: inherit; }
    .article-content .bg-gradient-to-br strong,
    .article-content .bg-gradient-to-r strong { color: inherit; }
    .article-content ul, .article-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
    .article-content li { color: #475569; line-height: 1.8; margin-bottom: 0.75rem; }
    .article-content strong { color: #04143d; font-weight: 600; }
    .article-content a:not([class]), .faq-answer-content a:not([class]) { color: #046bfc; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
    .article-content a:not([class]):hover, .faq-answer-content a:not([class]):hover { text-decoration-style: solid; }
    .article-content section + section { padding-top: 2.5rem; margin-top: 2.5rem; border-top: 1px solid #e2e8f0; }

    /* ============================================
        VISUAL CARDS (hybrid elements)
    ============================================ */
    .highlight-box { background: linear-gradient(135deg, rgba(4,107,252,0.08) 0%, rgba(4,107,252,0.03) 100%); border-left: 4px solid #046bfc; padding: 1.5rem; border-radius: 0 1rem 1rem 0; margin: 1.75rem 0; }
    .highlight-box p { margin-bottom: 0 !important; }
    .highlight-box.warning { background: linear-gradient(135deg, rgba(255,153,0,0.1) 0%, rgba(255,153,0,0.03) 100%); border-left-color: #ff9900; }
    .highlight-box.success { background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.03) 100%); border-left-color: #10b981; }
    .highlight-box.danger { background: linear-gradient(135deg, rgba(220,38,38,0.1) 0%, rgba(220,38,38,0.03) 100%); border-left-color: #dc2626; }

    .ps-card { background: white; border-radius: 1.5rem; padding: 2rem; box-shadow: 0 4px 20px rgba(4,20,61,0.06); border: 1px solid rgba(4,107,252,0.1); transition: all 0.3s ease; margin-bottom: 1.5rem; }
    .ps-card:hover { box-shadow: 0 12px 30px rgba(4,107,252,0.12); }

    .benefit-card { background: white; border-radius: 1.5rem; padding: 1.75rem; box-shadow: 0 4px 15px rgba(4,20,61,0.06); border: 1px solid #e2e8f0; transition: all 0.3s ease; }
    .benefit-card:hover { border-color: #046bfc; box-shadow: 0 8px 25px rgba(4,107,252,0.12); transform: translateY(-4px); }

    .diff-card { background: linear-gradient(135deg, rgba(4,107,252,0.04) 0%, rgba(255,153,0,0.04) 100%); border-radius: 1.5rem; padding: 2rem; border: 1px solid rgba(4,107,252,0.12); transition: all 0.3s ease; }
    .diff-card:hover { box-shadow: 0 8px 25px rgba(4,107,252,0.08); }

    .metric-card { background: white; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.5rem 1rem; text-align: center; transition: all 0.3s ease; }
    .metric-card:hover { background: #f8fafc; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(4,107,252,0.08); }

    .step-card { background: white; border-radius: 1rem; padding: 1.5rem; border: 1px solid #e2e8f0; text-align: center; transition: all 0.3s ease; flex: 1; position: relative; }
    .step-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(4,107,252,0.1); border-color: #046bfc; }
    .steps-grid { position: relative; }
    .steps-grid::before { content: ''; position: absolute; top: 24px; left: calc(12.5% + 24px); right: calc(12.5% + 24px); height: 3px; background: linear-gradient(90deg, #046bfc, #ff9900, #10b981, #046bfc); border-radius: 2px; z-index: 0; }
    @media (max-width: 640px) { .steps-grid::before { display: none; } }

    /* Inline CTA */
    .inline-cta { background: linear-gradient(135deg, #04143d 0%, #0a2a5e 40%, #0d3b7a 70%, #04143d 100%); border-radius: 1.5rem; padding: 3rem 2.5rem; margin: 2.5rem 0; color: white; text-align: center; position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid rgba(4,107,252,0.2); }
    .inline-cta:hover { transform: scale(1.02); box-shadow: 0 20px 50px rgba(4,20,61,0.3); }
    .inline-cta::before { content: ''; position: absolute; top: -60%; right: -30%; width: 80%; height: 160%; background: radial-gradient(ellipse, rgba(4,107,252,0.25) 0%, rgba(4,107,252,0.08) 40%, transparent 70%); pointer-events: none; }
    .inline-cta::after { content: ''; position: absolute; bottom: -40%; left: -20%; width: 70%; height: 120%; background: radial-gradient(ellipse, rgba(255,153,0,0.15) 0%, rgba(16,185,129,0.06) 50%, transparent 70%); pointer-events: none; }
    .inline-cta .cta-title { font-size: 1.5rem; font-weight: 800; color: #ffffff; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
    .inline-cta .cta-subtitle { font-size: 0.95rem; color: rgba(255,255,255,0.75); margin-bottom: 1.5rem; max-width: 28rem; margin-left: auto; margin-right: auto; line-height: 1.6; }
    @keyframes ctaPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
    .inline-cta .cta-icon { animation: ctaPulse 2.5s ease-in-out infinite; }

    /* ============================================
        FAQ ACCORDION
    ============================================ */
    .faq-item { background: white; border: 1px solid #e2e8f0; border-radius: 1rem; margin-bottom: 0.75rem; overflow: hidden; transition: all 0.3s ease; }
    .faq-item:hover { border-color: #046bfc; box-shadow: 0 4px 15px rgba(4,107,252,0.1); }
    .faq-item.active { border-color: #046bfc; box-shadow: 0 4px 20px rgba(4,107,252,0.15); }
    .faq-question { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; cursor: pointer; font-weight: 600; color: #04143d; background: white; transition: all 0.2s ease; width: 100%; text-align: left; border: none; font-family: inherit; font-size: 1rem; }
    .faq-question span { flex: 1; padding-right: 1rem; }
    .faq-question:hover { background: rgba(4,107,252,0.03); }
    .faq-item.active .faq-question { background: rgba(4,107,252,0.05); color: #046bfc; }
    .faq-icon { width: 24px; height: 24px; transition: transform 0.3s ease; flex-shrink: 0; }
    .faq-item.active .faq-icon { transform: rotate(180deg); }
    .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
    .faq-item.active .faq-answer { max-height: 800px; }
    .faq-answer-content { padding: 0 1.5rem 1.5rem; color: #475569; line-height: 1.7; font-size: 0.938rem; }

    /* ============================================
        FINAL CTA SECTION
    ============================================ */
    .cta-section { background: linear-gradient(135deg, #04143d 0%, #0a2a5e 50%, #04143d 100%); position: relative; overflow: hidden; }
    .cta-section::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 30% 40%, rgba(4,107,252,0.15) 0%, transparent 40%), radial-gradient(circle at 70% 60%, rgba(255,153,0,0.12) 0%, transparent 40%); animation: ctaRotate 25s linear infinite; animation-play-state: paused; }
    .cta-section.in-view::before { animation-play-state: running; }
    @keyframes ctaRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

    /* ============================================
        RELATED CARDS
    ============================================ */
    .related-card { background: white; border-radius: 1rem; overflow: hidden; box-shadow: 0 4px 15px rgba(4,20,61,0.06); border: 1px solid #e2e8f0; transition: all 0.3s ease; }
    .related-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(4,107,252,0.12); border-color: #046bfc; }
    .related-card-image { height: 120px; display: flex; align-items: center; justify-content: center; }
    .related-card .card-arrow { opacity: 0; transform: translateX(-4px); transition: all 0.3s ease; }
    .related-card:hover .card-arrow { opacity: 1; transform: translateX(0); }

    /* ============================================
        STICKY CTA + BACK TO TOP
    ============================================ */
    .sticky-cta { transform: translateY(100%); transition: transform 0.3s ease; }
    .sticky-cta.visible { transform: translateY(0); }
    .back-to-top { position: fixed; bottom: 100px; right: 24px; width: 48px; height: 48px; background: #046bfc; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(4,107,252,0.3); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; z-index: 50; cursor: pointer; border: none; }
    .back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
    .back-to-top.visible { animation: bttRing 2s ease-out 1; }
    .back-to-top:hover { background: #0356c9; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(4,107,252,0.2); }
    @keyframes bttRing { 0% { box-shadow: 0 0 0 0 rgba(4,107,252,0.4); } 100% { box-shadow: 0 0 0 12px rgba(4,107,252,0); } }

    /* Glossary Link */
    .glossary-link { color: #046bfc; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
    .glossary-link:hover { text-decoration-style: solid; }

    /* Utility */
    .clean-list { list-style: none; padding-left: 0; }
    .aspect-video { aspect-ratio: 16 / 9; }

    /* ============================================
        RESPONSIVE
    ============================================ */
    @media (max-width: 768px) {
        .faq-question { min-height: 56px; padding: 1rem 1.25rem; }
        body { padding-bottom: 80px; }
        .back-to-top { bottom: 90px; right: 16px; }
        .section-indicator { font-size: 0.688rem; }
        .article-content section { scroll-margin-top: 80px; }
        .inline-cta { padding: 2.5rem 1.5rem; }
        .metric-card { padding: 1rem 0.75rem; }
        footer ul li a { min-height: 44px; display: inline-flex; align-items: center; }
    }
    /* Testimonial carousel on mobile */
    @media (max-width: 767px) {
        .testimonial-carousel { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 1rem; scrollbar-width: none; }
        .testimonial-carousel::-webkit-scrollbar { display: none; }
        .testimonial-carousel > * { scroll-snap-align: center; min-width: 85vw; flex-shrink: 0; }
        .testimonial-dots { display: flex; justify-content: center; gap: 6px; margin-top: 0.75rem; }
        .testimonial-dots span { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; transition: all 0.3s ease; }
        .testimonial-dots span.active { background: #046bfc; transform: scale(1.3); }
    }
    @media (min-width: 768px) {
        .testimonial-dots { display: none; }
    }
    /* Hero text on very small screens */
    @media (max-width: 374px) {
        .hero-h1 { font-size: 1.625rem !important; }
        .hero-subtitle { font-size: 0.938rem !important; }
    }
    /* Related cards: horizontal scroll on mobile */
    @media (max-width: 640px) {
        .related-cards-grid { display: flex; overflow-x: auto; gap: 1rem; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 0.5rem; }
        .related-cards-grid > a { min-width: 260px; flex-shrink: 0; scroll-snap-align: start; }
        .related-cards-grid::-webkit-scrollbar { height: 4px; }
        .related-cards-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
        .related-cards-grid::after { content: ''; position: sticky; right: 0; min-width: 1.5rem; background: linear-gradient(90deg, transparent, white); flex-shrink: 0; align-self: stretch; pointer-events: none; }
    }

    /* Touch device: disable transform hovers (M3) */
    @media (hover: none) {
        .ps-card:hover, .benefit-card:hover, .diff-card:hover,
        .metric-card:hover, .step-card:hover, .related-card:hover { transform: none !important; }
        .back-to-top:hover { transform: none !important; }
    }

    /* Promo banner dismiss */
    .promo-banner-close { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; padding: 4px; line-height: 0; transition: color 0.2s; }
    .promo-banner-close:hover { color: white; }

    /* Content-visibility for below-fold sections (P8) */
    #benefits, #why-sellermagnet, #takeaways, #faq { content-visibility: auto; contain-intrinsic-size: auto 600px; }
    .reveal { will-change: transform, opacity; }

    /* Mobile TOC active state */
    #mobileTocContent a.active { color: #046bfc; font-weight: 600; background: rgba(4,107,252,0.08); border-radius: 0.5rem; }

    /* Sticky CTA dismissed */
    .sticky-cta-dismissed { padding-bottom: 0 !important; }

    /* Print styles (U6) */
    @media print {
        .reading-progress, .section-indicator, .promo-banner, .sticky-cta,
        .back-to-top, .inline-cta, nav[role="navigation"], .mobile-toc-content,
        #mobileTocToggle { display: none !important; }
        .reveal { opacity: 1 !important; transform: none !important; }
        .hero-blob, .hero-grid { display: none; }
        body { padding-bottom: 0 !important; }
        .article-content h2 { break-after: avoid; }
        .ps-card, .benefit-card, .diff-card, .step-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
    }

    /* iOS safe area */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .sticky-cta { padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); }
    }
