/**
 * AI Tool Bee - Modern Directory Stylesheet
 * Clean, lightweight, responsive directory UI inspired by Listeo & Futurepedia.
 */

/* Container */
.aitoolbee-directory-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
}

/* Modern Hero Section */
.aitoolbee-hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border-radius: 24px;
    padding: 60px 24px 44px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 32px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.4);
    position: relative;
    overflow: hidden;
}

.aitoolbee-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
}

.aitoolbee-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fde047;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

.aitoolbee-hero-title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    color: #ffffff;
    letter-spacing: -0.8px;
}

.aitoolbee-hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: #cbd5e1;
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.5;
}

/* Search Bar */
.aitoolbee-search-wrapper {
    max-width: 680px;
    margin: 0 auto 28px;
    position: relative;
    z-index: 2;
}

.aitoolbee-search-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 999px;
    padding: 8px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.2s, transform 0.2s;
}

.aitoolbee-search-bar:focus-within {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.4), 0 12px 36px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.aitoolbee-search-icon {
    display: flex;
    align-items: center;
    color: #64748b;
    margin-right: 12px;
}

.aitoolbee-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 16px !important;
    color: #0f172a !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.aitoolbee-search-clear {
    background: #e2e8f0;
    border: none;
    color: #475569;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.aitoolbee-search-clear:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.aitoolbee-search-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: aitoolbee-spin 0.6s linear infinite;
    margin-left: 10px;
}

@keyframes aitoolbee-spin {
    to { transform: rotate(360deg); }
}

/* Category Filter Pills */
.aitoolbee-category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.aitoolbee-cat-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.aitoolbee-cat-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.aitoolbee-cat-pill.active {
    background: #ffffff;
    color: #0f172a;
    border-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.aitoolbee-cat-pill .pill-count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 4px;
}

/* Toolbar Controls */
.aitoolbee-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.aitoolbee-pricing-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aitoolbee-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-right: 4px;
}

.aitoolbee-price-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.aitoolbee-price-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.aitoolbee-price-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    font-weight: 600;
}

.aitoolbee-toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.aitoolbee-results-count {
    font-size: 14px;
    color: #64748b;
}

.aitoolbee-results-count strong {
    color: #0f172a;
}

.aitoolbee-sort-select {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    color: #334155 !important;
    cursor: pointer;
}

/* Cards Grid */
.aitoolbee-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* Modern Card */
.aitoolbee-tool-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
}

.aitoolbee-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

/* Card Media / Thumbnail */
.aitoolbee-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0f172a;
    overflow: hidden;
}

.aitoolbee-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.aitoolbee-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
}

.aitoolbee-tool-card:hover .aitoolbee-card-img {
    transform: scale(1.05);
}

/* Listeo-Style Media Badges Container */
.aitoolbee-card-badges-top {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}

.aitoolbee-badge-category {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Floating Badge */
.aitoolbee-floating-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.badge-freemium {
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
}

.badge-free {
    background: rgba(14, 165, 233, 0.95);
    color: #ffffff;
}

.badge-paid {
    background: rgba(139, 92, 246, 0.95);
    color: #ffffff;
}

/* Rating Row (Listeo Signature) */
.aitoolbee-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.aitoolbee-rating-stars {
    color: #f59e0b;
    font-size: 13px;
    letter-spacing: 1px;
}

.aitoolbee-rating-score {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.aitoolbee-rating-label {
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Card Body */
.aitoolbee-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.aitoolbee-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.aitoolbee-card-favicon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px;
}

.aitoolbee-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    line-height: 1.3;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aitoolbee-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.aitoolbee-card-title a:hover {
    color: #4f46e5;
}

.aitoolbee-verified-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Category Pill */
.aitoolbee-card-category-wrapper {
    margin-bottom: 12px;
}

.aitoolbee-card-category {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Excerpt */
.aitoolbee-card-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Card Footer / Buttons */
.aitoolbee-card-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    margin-top: auto;
}

.aitoolbee-card-btn-review {
    flex: 1;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
}

.aitoolbee-card-btn-review:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.aitoolbee-card-btn-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #0f172a;
    border: 1px solid #0f172a;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.15s;
}

.aitoolbee-card-btn-visit:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Load More */
.aitoolbee-pagination-wrapper {
    text-align: center;
    margin-top: 48px;
}

.aitoolbee-load-more-btn {
    background: #ffffff;
    border: 2px solid #0f172a;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.aitoolbee-load-more-btn:hover {
    background: #0f172a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

/* No Results */
.aitoolbee-no-results {
    grid-column: 1 / -1;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
}

/* Related Tools Section on Single Posts */
.aitoolbee-related-tools-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #f1f5f9;
}

.aitoolbee-related-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
}

.aitoolbee-related-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
}

/* Modern Category Archive Cards (AI News & Blog) */
body.category .site-main,
body.archive.category .site-main {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 30px !important;
    max-width: 1220px !important;
    margin: 0 auto !important;
    padding: 30px 16px 60px !important;
}

body.category .site-main .page-header,
body.archive.category .site-main .page-header {
    grid-column: 1 / -1 !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%) !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    padding: 44px 30px !important;
    margin-bottom: 8px !important;
    text-align: center !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25) !important;
}

body.category .site-main .page-header .page-title,
body.archive.category .site-main .page-header .page-title {
    color: #ffffff !important;
    font-size: 34px !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
    letter-spacing: -0.5px !important;
}

body.category .site-main .page-header .taxonomy-description,
body.archive.category .site-main .page-header .taxonomy-description {
    color: #cbd5e1 !important;
    font-size: 16px !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

body.category article.post,
body.archive.category article.post {
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Ghughuti Inside Article Card Container */
body.category article.post .inside-article,
body.archive.category article.post .inside-article {
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease !important;
}

body.category article.post .inside-article:hover,
body.archive.category article.post .inside-article:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
    border-color: #cbd5e1 !important;
}

/* 1. Image on TOP with Ghughuti Zoom */
body.category .post-image,
body.archive.category .post-image {
    order: 1 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 210px !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    background: #0f172a !important;
    position: relative !important;
}

body.category .post-image a,
body.archive.category .post-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

body.category .post-image img,
body.archive.category .post-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: block !important;
}

body.category article.post:hover .post-image img,
body.archive.category article.post:hover .post-image img {
    transform: scale(1.08) !important;
}

/* Category Badge Overlaid on Image */
body.category-ai-news .post-image::before {
    content: 'AI NEWS';
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 999px;
    z-index: 2;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

body.category-blog .post-image::before {
    content: 'EDITORIAL';
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #a855f7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 999px;
    z-index: 2;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 2. Header (Title + Meta) BELOW Image */
body.category .entry-header,
body.archive.category .entry-header {
    order: 2 !important;
    padding: 20px 22px 8px !important;
    margin: 0 !important;
}

body.category .entry-meta,
body.archive.category .entry-meta {
    font-size: 12px !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

body.category .entry-meta a,
body.archive.category .entry-meta a {
    color: #64748b !important;
    text-decoration: none !important;
}

body.category .entry-meta .posted-on time,
body.archive.category .entry-meta .posted-on time {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    color: #475569;
}

body.category .entry-title,
body.archive.category .entry-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

body.category .entry-title a,
body.archive.category .entry-title a {
    color: #0f172a !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

body.category .entry-title a:hover,
body.archive.category .entry-title a:hover {
    color: #4f46e5 !important;
}

/* 3. Summary & Excerpt (2 Lines Clamp like Ghughuti) */
body.category .entry-summary,
body.archive.category .entry-summary {
    order: 3 !important;
    padding: 0 22px 16px !important;
    font-size: 0.9rem !important;
    color: #64748b !important;
    line-height: 1.55 !important;
    margin: 0 !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

body.category .entry-summary p,
body.archive.category .entry-summary p {
    margin-bottom: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* 4. Action Button (Ghughuti style button) */
body.category .read-more-container,
body.archive.category .read-more-container {
    margin-top: auto !important;
    padding: 14px 22px 18px !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

body.category .read-more,
body.archive.category .read-more {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

body.category .read-more:hover,
body.archive.category .read-more:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* 5. Footer cleanup */
body.category footer.entry-meta,
body.archive.category footer.entry-meta {
    order: 4 !important;
    display: none !important;
}

/* ==========================================================================
   Compact Cards Grid (Accommodates 3 to 4 cards per row, Favicon style)
   ========================================================================== */
.aitoolbee-cards-grid.aitoolbee-grid-compact {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
}

.aitoolbee-tool-card-compact {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    height: 100%;
    box-sizing: border-box;
}

.aitoolbee-tool-card-compact:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Compact Card Top Row: Thumbnail + Title + Price */
.aitoolbee-compact-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.aitoolbee-compact-thumb-link {
    flex-shrink: 0;
    display: block;
}

.aitoolbee-compact-thumb {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: block;
    transition: transform 0.25s ease;
}

.aitoolbee-tool-card-compact:hover .aitoolbee-compact-thumb {
    transform: scale(1.08);
}

.aitoolbee-compact-title-col {
    flex: 1;
    min-width: 0;
}

.aitoolbee-compact-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aitoolbee-compact-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s ease;
}

.aitoolbee-compact-title a:hover {
    color: #f59e0b;
}

.aitoolbee-compact-price-col {
    flex-shrink: 0;
}

.aitoolbee-compact-price-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
}

.aitoolbee-compact-price-pill.badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.aitoolbee-compact-price-pill.badge-paid {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Compact Card Excerpt */
.aitoolbee-compact-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Compact Card Category Pill */
.aitoolbee-compact-cat-wrap {
    margin-bottom: 16px;
}

.aitoolbee-compact-cat-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 500;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Compact Card Footer */
.aitoolbee-compact-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    margin-top: auto;
}

.aitoolbee-compact-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

.aitoolbee-compact-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: #f59e0b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.aitoolbee-compact-details-btn:hover {
    color: #fbbf24;
    transform: translateX(2px);
}

body.category .paging-navigation,
body.archive.category .paging-navigation {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 20px 0 !important;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .aitoolbee-hero-section {
        padding: 40px 16px 32px;
        border-radius: 16px;
    }

    .aitoolbee-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .aitoolbee-toolbar-right {
        justify-content: space-between;
    }

    .aitoolbee-category-pills {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .aitoolbee-cat-pill {
        flex-shrink: 0;
    }

    .aitoolbee-cards-grid {
        grid-template-columns: 1fr;
    }

    body.category .site-main,
    body.archive.category .site-main {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Listeo-Style Categories Hub (/ai-tool-categories/)
   ========================================================================== */
.aitoolbee-categories-hub {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.aitoolbee-cat-hub-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border-radius: 24px;
    padding: 60px 24px 44px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 36px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.4);
    position: relative;
    overflow: hidden;
}

.aitoolbee-cat-hub-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
}

.aitoolbee-cat-hub-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    color: #ffffff;
    letter-spacing: -0.8px;
}

.aitoolbee-cat-hub-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: #cbd5e1;
    max-width: 680px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.aitoolbee-cat-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 999px;
    padding: 8px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.aitoolbee-cat-search-box input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px !important;
    color: #0f172a !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Category Cards Grid (Listeo Style) */
.aitoolbee-cat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.aitoolbee-cat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: #1e293b !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.aitoolbee-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    border-color: #cbd5e1;
}

.aitoolbee-cat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #ec4899);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.aitoolbee-cat-card:hover::after {
    opacity: 1;
}

.aitoolbee-cat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.aitoolbee-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.aitoolbee-cat-card:hover .aitoolbee-cat-icon {
    transform: scale(1.08);
    background: #f1f5f9;
}

.aitoolbee-cat-count-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.aitoolbee-cat-card:hover .aitoolbee-cat-count-badge {
    background: #0f172a;
    color: #ffffff;
}

.aitoolbee-cat-card-name {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.aitoolbee-cat-card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 18px;
    flex-grow: 1;
}

.aitoolbee-cat-card-arrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.aitoolbee-cat-card:hover .aitoolbee-cat-card-arrow {
    gap: 10px;
}

/* Fallback for Gutenberg .tools-cat list block */
ul.tools-cat.wp-block-categories-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 20px 0 !important;
    margin: 0 !important;
}

ul.tools-cat.wp-block-categories-list li {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 18px 20px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

ul.tools-cat.wp-block-categories-list li:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 20px -4px rgba(0,0,0,0.08) !important;
    border-color: #cbd5e1 !important;
}

ul.tools-cat.wp-block-categories-list li a {
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #0f172a !important;
    text-decoration: none !important;
}

ul.tools-cat.wp-block-categories-list li a:hover {
    color: #4f46e5 !important;
}


