/* CSS for index_free_tools_newww.html */

/* Custom styles that complement Tailwind */
    .gradient-hero {
        background: #ffffff;
        position: relative;
        overflow: hidden;
    }
    
    .hero-blob {
        position: absolute;
        border-radius: 50%;
        filter: blur(100px);
        opacity: 0.8;
        pointer-events: none;
        z-index: 0;
    }
    
    .hero-blob-1 {
        width: 600px;
        height: 600px;
        background: rgba(4, 107, 252, 0.35);
        top: -200px;
        left: -150px;
    }
    
    .hero-blob-2 {
        width: 500px;
        height: 500px;
        background: rgba(255, 153, 0, 0.25);
        top: 50px;
        right: -100px;
    }
    
    .hero-blob-3 {
        width: 400px;
        height: 400px;
        background: rgba(4, 107, 252, 0.25);
        bottom: -100px;
        left: 30%;
    }

    /* Background decorative blobs for page sections */
    .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);
    }

    .section-blob-navy {
        background: rgba(4, 20, 61, 0.08);
    }
    
    .hero-content {
        position: relative;
        z-index: 10;
    }
    
    /* Subtle grid pattern */
    .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;
    }

    /* Macrobox styles - solid dark blue with gradient accents */
    .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;
    }

    /* Review cards: horizontal scroll on mobile */
    .review-cards {
        transition: all 0.3s ease;
    }

    @media (max-width: 1023px) {
        .review-cards {
            display: flex;
            gap: 1rem;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 0.75rem;
            scrollbar-width: none;
        }
        .review-cards::-webkit-scrollbar { display: none; }
        .review-cards > div {
            scroll-snap-align: center;
            min-width: 280px;
            flex-shrink: 0;
        }
    }

    /* ── Sticky CTA Bar ── */
    .sticky-cta-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: linear-gradient(135deg, #04143d 0%, #0a2a5e 100%);
        border-top: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .sticky-cta-bar.visible {
        transform: translateY(0);
    }
    
    .btn-pill {
        border-radius: 50px;
    }
    
    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .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-category {
        display: none;
    }
    .faq-category.active {
        display: block;
    }

    /* ===== ROTATING HERO TEXT ===== */
    .hero-rotating-wrapper {
        display: inline-block;
        position: relative;
        overflow: hidden;
        vertical-align: bottom;
        height: 1.15em;
    }
    .hero-rotating-word {
        display: block;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    }
    .hero-rotating-word.slide-out {
        transform: translateY(-110%);
        opacity: 0;
    }
    .hero-rotating-word.slide-in {
        transform: translateY(110%);
        opacity: 0;
    }

    /* Submenu styles */
    .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(-100%);
        transition: transform 0.3s ease;
    }

    .submenu.visible {
        transform: translateY(0);
    }

    .submenu-link {
        color: rgba(255,255,255,0.7);
        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;
    }

    /* ===== TOOL PREVIEW (blurred + overlay) ===== */
    .tool-preview {
        position: relative;
        border-radius: 12px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.3s ease;
    }
    .tool-preview:hover {
        transform: scale(1.02);
    }
    .tool-preview:hover .tool-preview-overlay {
        background: rgba(4, 20, 61, 0.35);
    }
    .tool-preview:hover .tool-preview-label {
        background: rgba(255,255,255,0.25);
        transform: scale(1.05);
    }
    .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;
    }
    .tool-preview {
        aspect-ratio: 16 / 9;
    }
    .tool-preview.tool-preview-tall {
        aspect-ratio: auto;
        flex: 1;
        min-height: 120px;
    }
    .tool-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        filter: blur(4px);
        transition: filter 0.3s ease;
    }
    .tool-preview:hover img {
        filter: blur(3px);
    }
    .tool-preview-overlay {
        position: absolute;
        inset: 0;
        background: rgba(4, 20, 61, 0.45);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease;
    }
    .tool-preview-label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        background: rgba(255,255,255,0.18);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.25);
        border-radius: 50px;
        color: white;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.3s ease;
    }

    /* ===== LIGHTBOX ===== */
    .lightbox-backdrop {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .lightbox-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }
    .lightbox-container {
        position: relative;
        max-width: 90vw;
        max-height: 85vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .lightbox-img {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 16px;
        box-shadow: 0 25px 60px rgba(0,0,0,0.5);
        object-fit: contain;
        transition: opacity 0.25s ease;
    }
    .lightbox-html-content {
        width: min(800px, 85vw);
        border-radius: 16px;
        box-shadow: 0 25px 60px rgba(0,0,0,0.5);
        overflow: hidden;
        transition: opacity 0.25s ease;
    }
    .lightbox-html-content > div {
        font-size: 2.2;
        transform: scale(1);
        transform-origin: top left;
    }
    .lightbox-close {
        position: absolute;
        top: -48px;
        right: 0;
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 50%;
        color: white;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    .lightbox-close:hover {
        background: rgba(255,255,255,0.25);
        transform: scale(1.1);
    }
    .lightbox-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 50%;
        color: white;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        z-index: 10;
    }
    .lightbox-nav:hover {
        background: rgba(255,255,255,0.3);
        transform: translateY(-50%) scale(1.1);
    }
    .lightbox-prev { left: -60px; }
    .lightbox-next { right: -60px; }
    .lightbox-counter {
        position: absolute;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255,255,255,0.6);
        font-size: 13px;
        font-weight: 500;
    }
    .lightbox-title {
        position: absolute;
        bottom: -40px;
        left: 0;
        color: rgba(255,255,255,0.5);
        font-size: 13px;
    }

    /* Mobile nav menu — hidden by default on all screens */
    .nav-mobile-menu {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        padding: 16px 24px;
        z-index: 50;
    }
    .nav-mobile-menu.active { display: flex; flex-direction: column; gap: 4px; }
    .nav-mobile-menu a {
        display: block;
        padding: 12px 0;
        font-size: 15px;
        font-weight: 500;
        color: #334155;
        border-bottom: 1px solid #f1f5f9;
    }
    .nav-mobile-menu a:last-child { border-bottom: none; }

    /* ===== 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);
        will-change: opacity, transform;
    }
    .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);
        will-change: opacity, transform;
    }
    .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);
        will-change: opacity, transform;
    }
    .reveal.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
    /* 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; }

    /* Respect prefers-reduced-motion */
    @media (prefers-reduced-motion: reduce) {
        .reveal, .reveal-left, .reveal-right {
            opacity: 1 !important;
            transform: none !important;
            transition: none !important;
            will-change: auto;
        }
    }

    /* 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;
    }
    .lightbox-close:focus-visible,
    .lightbox-nav:focus-visible {
        outline-color: white;
        outline-offset: 3px;
    }

    @media (max-width: 768px) {
        .lightbox-prev { left: 8px; }
        .lightbox-next { right: 8px; }
        .lightbox-nav { width: 36px; height: 36px; font-size: 16px; }
        .lightbox-close { top: -44px; right: 4px; }

        /* Hide heavy hero blobs on mobile to save GPU */
        .hero-blob { display: none; }

        /* Increase min-height for small bento card previews */
        .tool-preview.tool-preview-tall { min-height: 180px; }

        /* Responsive comparison table */
        .comparison-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
        .comparison-table-wrap table { min-width: 580px; }
    }
