/* ============================================
   ARCHIVE / DISCOVERY PAGE
   ============================================ */

/* Main Container Fix */
.categories-discovery-page .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- Hero Adjustments --- */
.categories-discovery-hero .hero-content-wide {
    position: relative;
    padding-top: 20px;
}

/* Glass Breadcrumb Pill */
.breadcrumbs-hero {
    position: absolute;
    top: 24px;
    left: 20px;
    z-index: 10;
}

@media (max-width: 768px) {
    .breadcrumbs-hero {
        position: relative;
        top: 0;
        left: 0;
        margin: 0 0 20px 0;
        text-align: left;
    }
}

.breadcrumb-pill {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .breadcrumb-pill {
        font-size: 11px;
    }
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-weight: 300;
    opacity: 0.8;
    margin: 0 2px;
    font-size: 14px;
}

.breadcrumb-current {
    color: var(--brand-primary, #a855f7);
    font-weight: 700;
}

.breadcrumb-link {
    color: inherit;
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

/* Separator removed from here as it's defined above */


/* --- Intro Section Compact --- */

/* --- Scroll Down CTA (Clean) --- */
.hero-scroll-cta {
    margin-top: 40px;
    padding: 24px 0;
    /* Added breathing room */
    opacity: 0.8;
    transition: opacity 0.2s;
}

.hero-scroll-cta:hover {
    opacity: 1;
}

.scroll-link-clean {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    /* Clean view - no messy border unless hover? */
    transition: all 0.2s;
}

.scroll-link-clean:hover {
    color: var(--text-primary);
    border-bottom-color: var(--brand-primary);
}

.scroll-arrow {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(5px);
    }

    60% {
        transform: translateY(3px);
    }
}

/* --- Intro Section Compact (Premium Glass Overhaul) --- */
.discovery-intro-compact {
    max-width: 960px;
    margin: 0 auto 40px auto;
    /* Reduced from 120px */
    text-align: center;
    padding: 80px 60px;
    position: relative;
    background: rgba(15, 15, 25, 0.4);
    /* Darker, more professional base */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.discovery-intro-compact .card-glow {
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.12), transparent 70%);
    opacity: 1;
    top: -20%;
}

.section-title-sm {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-text-content p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 400;
    margin: 0 auto 8px auto;
    /* Separation between lines */
    max-width: 700px;
}

.intro-text-content p:last-child {
    margin-bottom: 0;
}


/* --- Category Card Premium Styling --- */
.category-card-premium {
    position: relative;
    background: var(--bg-surface, #1e1e2e);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(var(--category-accent), 0.1), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card-premium:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--category-accent), 0.3);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(var(--category-accent), 0.2);
}

.category-card-premium:hover .card-glow {
    opacity: 1;
}

.category-card-premium.is-expanded {
    min-height: 520px;
    /* Only fix height when expanded */
}

/* Card Top: Icon & Badge */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.icon-box {
    width: 52px;
    height: 52px;
    background: rgba(var(--category-accent), 0.1);
    border: 1px solid rgba(var(--category-accent), 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--category-accent));
    transition: all 0.3s ease;
}

.category-card-premium:hover .icon-box {
    background: rgba(var(--category-accent), 0.2);
    transform: scale(1.05);
}

.stats-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim, #94a3b8);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: rgb(var(--category-accent));
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(var(--category-accent), 0.4);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--category-accent), 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(var(--category-accent), 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--category-accent), 0);
    }
}

/* Card Content */
.card-content {
    flex-grow: 1;
    margin-bottom: 20px;
}

.card-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-title a {
    color: var(--text-primary, #fff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-card-premium:hover .card-title a {
    color: rgb(var(--category-accent));
}

.card-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

/* Explorer Section (Subcategories) */
.card-explorer {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.explorer-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.explorer-trigger:hover {
    color: var(--text-primary);
}

.icon-plus {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-dim);
}

.explorer-trigger[aria-expanded="true"] .icon-plus {
    transform: rotate(45deg);
    color: rgb(var(--category-accent));
}

.explorer-content {
    padding-top: 16px;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 180px;
    /* Height of roughly 4-5 subcategories */
    overflow-y: auto;
    padding-right: 6px;
    /* Space for scrollbar */
}

/* Custom scrollbar for premium look */
.subcategory-grid::-webkit-scrollbar {
    width: 4px;
}

.subcategory-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.subcategory-grid::-webkit-scrollbar-thumb {
    background: rgba(var(--category-accent), 0.3);
    border-radius: 10px;
}

.subcategory-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--category-accent), 0.5);
}

.sub-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sub-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-icon {
    color: rgba(var(--category-accent), 0.6);
    transition: color 0.2s ease;
}

.sub-link:hover .sub-icon {
    color: rgb(var(--category-accent));
}

.sub-link:hover {
    background: rgba(var(--category-accent), 0.08);
    border-color: rgba(var(--category-accent), 0.15);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sub-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Card Action */
.card-action {
    margin-top: auto;
}

.btn-explore {
    width: 100%;
    padding: 14px;
    background: rgba(var(--category-accent), 0.1);
    color: rgb(var(--category-accent));
    text-decoration: none;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--category-accent), 0.1);
}

.btn-explore:hover {
    background: rgb(var(--category-accent));
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(var(--category-accent), 0.5);
    transform: translateY(-2px);
}

.btn-explore .arrow {
    transition: transform 0.3s ease;
}

.btn-explore:hover .arrow {
    transform: translateX(4px);
}

/* --- Featured AI Tools (Compact Powerhouse Grid) --- */
.archive-featured-tools-section {
    padding: 40px 0;
    margin-top: 20px;
}

.featured-header-badge-area {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.powerhouse-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(168, 85, 247, 0.08);
    /* Purple tint base */
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-full, 100px);
    position: relative;
    overflow: hidden;
    animation: powerhouseBadgePulse 3s infinite ease-in-out;
}

.powerhouse-badge .powerhouse-badge-icon {
    color: var(--brand-primary, #a855f7);
    display: flex;
    align-items: center;
    animation: powerhouseIconBounce 2s infinite ease-in-out;
}

.powerhouse-badge .powerhouse-badge-text {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-primary, sans-serif);
}

[data-theme="light"] .powerhouse-badge .powerhouse-badge-text {
    color: #1e293b;
}

@keyframes powerhouseBadgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
        border-color: rgba(168, 85, 247, 0.2);
    }

    50% {
        box-shadow: 0 0 25px 0 rgba(168, 85, 247, 0.2);
        border-color: rgba(168, 85, 247, 0.5);
    }
}

@keyframes powerhouseIconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Day Mode Badge Refinement */
[data-theme="light"] .featured-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
    border: none;
}

[data-theme="light"] .verified-badge-label.compact-badge {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.featured-tools-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-flow: row;
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    /* Increased slightly for better 6-col spacing */
}

.featured-tool-card {
    text-decoration: none;
    display: block;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.featured-tool-card .tool-card-inner {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    position: relative;
    height: 100%;
}

.tool-logo-box {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(var(--tool-accent), 0.1);
    border: 1px solid rgba(var(--tool-accent), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.tool-logo-box img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.tool-logo-box .logo-placeholder {
    font-size: 12px;
    font-weight: 800;
    color: rgb(var(--tool-accent));
}

.featured-tool-verify {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.featured-tool-verify svg {
    stroke-width: 3;
}

.featured-tool-card .tool-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

/* Hover Effects */
.featured-tool-card:hover {
    background: rgba(var(--tool-accent), 0.03);
    border-color: rgba(var(--tool-accent), 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.featured-tool-card:hover .tool-logo-box {
    transform: scale(1.1);
    background: rgba(var(--tool-accent), 0.2);
}

.featured-tool-card:hover .tool-name {
    color: rgb(var(--tool-accent));
}

/* Day Mode Refinements */
[data-theme="light"] .featured-tool-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .featured-tool-card:hover {
    background: rgba(var(--tool-accent), 0.02);
    box-shadow: 0 4px 12px rgba(var(--tool-accent), 0.1);
}

[data-theme="light"] .featured-tool-card .tool-name {
    color: #334155;
}

/* Removed old title day mode rule */

/* Mobile Tweaks (2 Columns x 6 Rows) */
@media (max-width: 768px) {
    .featured-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, auto);
        grid-auto-flow: row;
        overflow-x: visible;
        padding-bottom: 0;
        gap: 10px;
    }

    .featured-tool-card {
        min-width: 0;
    }

    .featured-tool-card .tool-card-inner {
        padding: 12px 14px;
        /* Slightly more padding for mobile touch */
    }
}

/* Global Light Mode Overrides Continued */
[data-theme="light"] .category-card-premium {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .category-card-premium:hover {
    border-color: var(--brand-primary, #a855f7);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stats-badge {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .card-title a {
    color: #0f172a;
}

[data-theme="light"] .card-explorer {
    border-top-color: #f1f5f9;
}

[data-theme="light"] .sub-link {
    background: #f8fafc;
    border-color: #f1f5f9;
    color: #334155;
}

[data-theme="light"] .sub-link:hover {
    background: #ffffff;
    border-color: var(--brand-primary, #a855f7);
}

/* Light Mode Overrides - Discovery Intro */
[data-theme="light"] .discovery-intro-compact {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .discovery-intro-compact .section-title-sm {
    background: linear-gradient(135deg, #1e293b 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .intro-text-content p {
    color: #475569;
}

/* Light Mode Overrides - Why Us Cards */
[data-theme="light"] .bfai-feature-card-wow {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .bfai-feature-card-wow:hover {
    background: #ffffff;
    border-color: rgba(var(--feature-accent), 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .feature-title {
    color: #1e293b;
}

[data-theme="light"] .feature-text {
    color: #64748b;
    opacity: 1;
}

/* Light Mode Overrides - FAQ Section */
[data-theme="light"] .faq-item-premium {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .faq-trigger {
    color: #0f172a;
}

[data-theme="light"] .faq-content {
    background: #f8fafc;
    border-top-color: #f1f5f9;
}

[data-theme="light"] .faq-answer {
    color: #475569;
}

