/* CSS for index_free_tools_title_checker_newww.html */

/* ============================================
        CUSTOM STYLES (complement Tailwind)
    ============================================ */

    /* Hero Background */
    .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-content {
        position: relative;
        z-index: 10;
    }

    .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;
        pointer-events: none;
        z-index: 1;
    }

    /* Section blobs */
    .section-blob {
        position: absolute;
        border-radius: 50%;
        filter: blur(120px);
        pointer-events: none;
        z-index: 0;
    }
    .section-blob-blue  { background: rgba(4, 107, 252, 0.15); }
    .section-blob-orange { background: rgba(255, 153, 0, 0.12); }

    /* Macrobox dark */
    .macrobox-dark {
        background: #04143d;
        position: relative;
        overflow: hidden;
    }
    .macrobox-dark::before {
        content: '';
        position: absolute;
        top: -30%; right: -15%;
        width: 500px; height: 500px;
        background: radial-gradient(circle, rgba(4, 107, 252, 0.4) 0%, transparent 60%);
        pointer-events: none;
    }
    .macrobox-dark::after {
        content: '';
        position: absolute;
        bottom: -25%; left: -10%;
        width: 400px; height: 400px;
        background: radial-gradient(circle, rgba(255, 153, 0, 0.25) 0%, transparent 60%);
        pointer-events: none;
    }

    /* Buttons */
    .btn-pill { border-radius: 50px; }

    /* FAQ Accordion */
    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .faq-item.active .faq-answer {
        max-height: 400px;
    }
    .faq-item.active .faq-icon {
        transform: rotate(45deg);
        background: #046bfc;
        color: white;
    }

    /* FAQ Tab System */
    .faq-tab {
        padding: 10px 20px;
        border: 2px solid #e2e8f0;
        border-radius: 30px;
        background: white;
        font-size: 14px;
        font-weight: 600;
        color: #64748b;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .faq-tab:hover {
        border-color: #046bfc;
        color: #046bfc;
    }
    .faq-tab.active {
        background: #046bfc;
        border-color: #046bfc;
        color: white;
    }
    .faq-tab:focus-visible {
        outline-offset: 3px;
        border-radius: 50px;
    }
    .faq-category {
        display: none;
    }
    .faq-category.active {
        display: block;
    }

    /* Submenu */
    .submenu {
        position: fixed;
        top: 72px; left: 0; right: 0;
        z-index: 40;
        background: rgba(4, 20, 61, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transform: translateY(calc(-100% - 80px));
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .submenu.visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .submenu-link {
        color: rgba(255,255,255,0.85);
        font-size: 13px; font-weight: 500;
        padding: 12px 16px;
        transition: all 0.2s;
        white-space: nowrap;
        position: relative;
    }
    .submenu-link:hover, .submenu-link.active { color: white; }
    .submenu-link.active::after {
        content: '';
        position: absolute;
        bottom: 0; left: 16px; right: 16px;
        height: 2px;
        background: #046bfc;
        border-radius: 2px;
    }
    .progress-bar {
        position: absolute;
        bottom: 0; left: 0;
        height: 2px;
        background: linear-gradient(90deg, #046bfc, #3d8bfd);
        width: 0%;
        transition: width 0.1s linear;
    }

    /* Bridge cards hover */
    .bridge-card {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .bridge-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 10px 30px -8px rgba(4, 107, 252, 0.12);
    }

    /* Dashboard floating animation */
    @keyframes dashboardFloat {
        0%, 100% { transform: perspective(1200px) rotateY(-3deg) rotateX(1deg) translateY(0); }
        50%      { transform: perspective(1200px) rotateY(-3deg) rotateX(1deg) translateY(-8px); }
    }
    .dashboard-float img {
        animation: dashboardFloat 4s ease-in-out infinite;
    }

    /* Good vs Risky comparison */
    .example-good {
        border-left: 4px solid #10b981;
        background: linear-gradient(90deg, rgba(16, 185, 129, 0.06) 0%, transparent 100%);
    }
    .example-risky {
        border-left: 4px solid #ef4444;
        background: linear-gradient(90deg, rgba(239, 68, 68, 0.06) 0%, transparent 100%);
    }

    /* Sticky mobile CTA */
    .sticky-cta-mobile {
        transform: translateY(100%);
        transition: transform 0.4s ease-out;
    }
    .sticky-cta-mobile.visible {
        transform: translateY(0);
    }

    /* Keyword order flow */
    .keyword-flow-item {
        position: relative;
    }
    .keyword-flow-item:not(:last-child)::after {
        content: '→';
        position: absolute;
        right: -20px;
        top: 50%;
        transform: translateY(-50%);
        color: #046bfc;
        font-weight: 700;
        font-size: 1.1rem;
    }
    /* M4: Hide arrows on small screens (flow wraps) */
    @media (max-width: 640px) {
        .keyword-flow-item:not(:last-child)::after {
            display: none;
        }
    }

    /* Accessible screen-reader-only utility */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    /* Global focus-visible ring for keyboard navigation (WCAG 2.4.7) */
    :focus-visible {
        outline: 2px solid #046bfc;
        outline-offset: 2px;
        border-radius: 4px;
    }
    .btn-pill:focus-visible,
    .faq-tab:focus-visible {
        outline-offset: 3px;
        border-radius: 50px;
    }

    /* Scroll-reveal animations */
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }

    /* Listing Optimizer Wheel Carousel */
    .lo-wheel-container {
        position: relative;
        overflow: visible;
        overscroll-behavior: contain;
        touch-action: pan-x;
    }
    .lo-wheel-card {
        position: absolute;
        width: 88%;
        left: 6%;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }
    .lo-wheel-card[data-position="center"] {
        z-index: 10;
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
        pointer-events: auto;
        cursor: zoom-in;
    }

    /* Lightbox overlay for expanded carousel image */
    .lo-lightbox {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0);
        opacity: 0;
        pointer-events: none;
        transition: background 0.35s ease, backdrop-filter 0.35s ease, opacity 0.35s ease;
    }
    .lo-lightbox.visible {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(8px);
        opacity: 1;
        pointer-events: auto;
        cursor: zoom-out;
    }
    .lo-lightbox img {
        max-width: 92vw;
        max-height: 88vh;
        border-radius: 16px;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
        transform: scale(0.85);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .lo-lightbox.visible img {
        transform: scale(1);
    }
    .lo-lightbox-close {
        position: absolute;
        top: 20px;
        right: 24px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s, transform 0.2s;
    }
    .lo-lightbox-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
    }
    .lo-wheel-card[data-position="top"] {
        z-index: 5;
        transform: translateY(-65%) scale(0.82);
        opacity: 0.5;
        filter: blur(3px);
    }
    .lo-wheel-card[data-position="bottom"] {
        z-index: 5;
        transform: translateY(65%) scale(0.82);
        opacity: 0.5;
        filter: blur(3px);
    }
    .lo-wheel-card[data-position="hidden"] {
        z-index: 1;
        transform: translateY(0) scale(0.6);
        opacity: 0;
        filter: blur(6px);
    }

    /* Stagger children delays */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }

    /* Carousel height for very small screens (320px) */
    @media (max-width: 374px) {
        .lo-wheel-container { height: 320px !important; }
        .lo-wheel-card { width: 92%; left: 4%; }
    }

    /* M10: Reduced motion */
    @media (prefers-reduced-motion: reduce) {
        .dashboard-float img,
        .bridge-card,
        .lo-wheel-card {
            animation: none !important;
            transition-duration: 0.01ms !important;
        }
        .reveal, .reveal-left, .reveal-right {
            opacity: 1 !important;
            transform: none !important;
            transition: none !important;
        }
    }

    /* M2: Submenu gradient fade on edges */
    .submenu .max-w-6xl {
        mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
    }

    /* U4: Scroll-margin for anchor links under fixed headers */
    section[id] {
        scroll-margin-top: 120px;
    }

    /* U5: Toast/snackbar for copy feedback */
    .toast-snackbar {
        position: fixed;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        background: #04143d;
        color: white;
        padding: 10px 20px;
        border-radius: 50px;
        font-size: 13px;
        font-weight: 600;
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.3s, transform 0.3s;
        pointer-events: none;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }
    .toast-snackbar.visible {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    /* Limit Banner */
    .limit-banner {
        background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 40%, #f0f4ff 100%);
        border: 2px solid rgba(4, 107, 252, 0.18);
        border-radius: 20px;
        padding: 32px 24px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }
    .limit-banner::before {
        content: '';
        position: absolute;
        top: -40px; right: -40px;
        width: 140px; height: 140px;
        background: radial-gradient(circle, rgba(4, 107, 252, 0.08) 0%, transparent 70%);
        pointer-events: none;
    }
    .limit-banner::after {
        content: '';
        position: absolute;
        bottom: -30px; left: -30px;
        width: 100px; height: 100px;
        background: radial-gradient(circle, rgba(255, 153, 0, 0.06) 0%, transparent 70%);
        pointer-events: none;
    }
    .limit-banner-pulse {
        animation: limitPulse 3s ease-in-out infinite;
    }
    @keyframes limitPulse {
        0%, 100% { box-shadow: 0 4px 24px rgba(4, 107, 252, 0.08); }
        50% { box-shadow: 0 8px 32px rgba(4, 107, 252, 0.15); }
    }

    /* Listing Optimizer Upsell Popup */
    .lo-popup-overlay {
        position: fixed;
        inset: 0;
        z-index: 9998;
        background: rgba(4, 20, 61, 0.55);
        backdrop-filter: blur(6px);
        opacity: 0;
        transition: opacity 0.35s ease;
        pointer-events: none;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
    }
    .lo-popup-overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }
    .lo-popup {
        background: white;
        border-radius: 20px;
        max-width: 480px;
        width: 100%;
        padding: 32px 28px 28px;
        position: relative;
        box-shadow: 0 25px 60px rgba(4, 20, 61, 0.25), 0 8px 24px rgba(4, 107, 252, 0.12);
        transform: translateY(20px) scale(0.97);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .lo-popup-overlay.visible .lo-popup {
        transform: translateY(0) scale(1);
    }
    .lo-popup-close {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #f1f5f9;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s, transform 0.2s;
    }
    .lo-popup-close:hover {
        background: #e2e8f0;
        transform: rotate(90deg);
    }
    @media (max-width: 480px) {
        .lo-popup { padding: 24px 20px 20px; }
    }

    /* U7: Passed checks disclosure triangle */
    details > summary {
        list-style: none;
    }
    details > summary::-webkit-details-marker {
        display: none;
    }
    details > summary::before {
        content: '▸';
        display: inline-block;
        margin-right: 6px;
        transition: transform 0.2s;
    }
    details[open] > summary::before {
        transform: rotate(90deg);
    }

    /* O1: Print stylesheet */
    @media print {
        /* Hide non-essential UI */
        nav, .submenu, .sticky-cta-mobile, .hero-blob, .hero-grid,
        .section-blob, .macrobox-dark::before, .macrobox-dark::after,
        #stickyCta, #cookieConsent, button, .btn-pill,
        footer, #submenu { display: none !important; }

        /* Reset backgrounds & shadows */
        body { background: white !important; color: #000 !important; font-size: 12pt; }
        section { background: white !important; box-shadow: none !important; padding: 12pt 0 !important; }
        .macrobox-dark { background: #f5f5f5 !important; color: #000 !important; }

        /* Ensure text is dark */
        h1, h2, h3, h4, p, li, span, a { color: #000 !important; }

        /* Show link URLs */
        a[href]::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #555; }
        a[href^="#"]::after, a[href^="javascript"]::after { content: ''; }

        /* Avoid page breaks inside key sections */
        .faq-item, .bridge-card { break-inside: avoid; }

        /* Force all content visible (no overflow hidden) */
        * { overflow: visible !important; }
    }
