/* ========================================================
   CALCHUB - MOST POPULAR CALCULATORS PAGE STYLES
   Matches CalcHub 1468px SaaS Design System & Dark Mode
======================================================== */

.pop-page {
    padding: 2rem 0 5rem;
    min-height: 80vh;
}

/* ==========================================
   1. HERO SECTION & TRENDING SPOTLIGHT
========================================== */
.pop-hero {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.25rem;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
    box-shadow: 0 14px 36px -14px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.pop-hero::before {
    content: "";
    position: absolute;
    top: -110px;
    right: -80px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.14) 0%, rgba(59, 130, 246, 0.08) 45%, transparent 72%);
    pointer-events: none;
}

html.dark .pop-hero {
    background: #131b2e;
    border-color: #1e293b;
    box-shadow: 0 14px 36px -12px rgba(0, 0, 0, 0.5);
}

.pop-hero-left {
    position: relative;
    z-index: 1;
}

.pop-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-size: 0.78rem;
    font-weight: 750;
    padding: 0.32rem 0.9rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

html.dark .pop-eyebrow {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.pop-title {
    font-size: 2.85rem;
    font-weight: 850;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.12;
    margin: 0 0 0.85rem 0;
}

html.dark .pop-title {
    color: #f8fafc;
}

.pop-title span {
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pop-desc {
    font-size: 1.04rem;
    color: #475569;
    line-height: 1.6;
    max-width: 660px;
    margin: 0 0 1.6rem 0;
}

html.dark .pop-desc {
    color: #94a3b8;
}

/* Search Box */
.pop-search-box {
    display: flex;
    align-items: center;
    max-width: 600px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.34rem 0.42rem 0.34rem 1.2rem;
    gap: 0.7rem;
    transition: all 0.2s ease;
}

.pop-search-box:focus-within {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

html.dark .pop-search-box {
    background: #0b1120;
    border-color: #1e293b;
}

html.dark .pop-search-box:focus-within {
    background: #131b2e;
    border-color: #60a5fa;
}

.pop-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.94rem;
    color: #0f172a;
    font-family: inherit;
    min-width: 0;
}

html.dark .pop-search-input {
    color: #f8fafc;
}

.pop-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #e2e8f0;
    color: #475569;
    cursor: pointer;
    flex-shrink: 0;
}

.pop-search-clear.visible {
    display: inline-flex;
}

.pop-search-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 0.58rem 1.4rem;
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
    transition: transform 0.14s ease;
    flex-shrink: 0;
}

.pop-search-btn:hover {
    transform: translateY(-1px);
}

/* Quick Tag Pills */
.pop-quick-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.1rem;
}

.pop-quick-label {
    font-size: 0.8rem;
    font-weight: 650;
    color: #64748b;
    margin-right: 0.2rem;
}

html.dark .pop-quick-label {
    color: #94a3b8;
}

.pop-quick-pill {
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 9999px;
    padding: 0.24rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.14s ease;
}

.pop-quick-pill:hover {
    background: #e2e8f0;
    color: #2563eb;
    transform: translateY(-1px);
}

html.dark .pop-quick-pill {
    background: #1e293b;
    color: #cbd5e1;
}

html.dark .pop-quick-pill:hover {
    background: #334155;
    color: #60a5fa;
}

/* Right: Top 4 Spotlight Card */
.pop-spotlight-card {
    position: relative;
    z-index: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.25rem;
}

html.dark .pop-spotlight-card {
    background: #0b1120;
    border-color: #1e293b;
}

.pop-spotlight-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.pop-spotlight-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

html.dark .pop-spotlight-title {
    color: #f8fafc;
}

.pop-spotlight-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
}

html.dark .pop-spotlight-badge {
    background: #1e293b;
    color: #60a5fa;
}

.pop-spotlight-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pop-spotlight-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.pop-spotlight-item:hover {
    border-color: #3b82f6;
    transform: translateX(3px);
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.12);
}

html.dark .pop-spotlight-item {
    background: #131b2e;
    border-color: #1e293b;
}

html.dark .pop-spotlight-item:hover {
    border-color: #60a5fa;
}

.pop-spotlight-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.pop-rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pop-spotlight-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .pop-spotlight-name {
    color: #f8fafc;
}

.pop-spotlight-cat {
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 500;
}

html.dark .pop-spotlight-cat {
    color: #94a3b8;
}

/* ==========================================
   2. FILTER TABS & SORT BAR
========================================== */
.pop-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.pop-filter-scroll {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: none;
    flex: 1;
}

.pop-filter-scroll::-webkit-scrollbar {
    display: none;
}

.pop-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.48rem 1rem;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pop-filter-btn:hover {
    background: #e2e8f0;
    color: #2563eb;
}

.pop-filter-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.32);
}

html.dark .pop-filter-btn {
    background: #1e293b;
    color: #94a3b8;
}

html.dark .pop-filter-btn:hover {
    background: #334155;
    color: #60a5fa;
}

html.dark .pop-filter-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: #ffffff;
}

.pop-right-controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.pop-count-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

html.dark .pop-count-label {
    color: #94a3b8;
}

.pop-sort-select {
    appearance: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.48rem 2.2rem 0.48rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

html.dark .pop-sort-select {
    background-color: #131b2e;
    border-color: #1e293b;
    color: #cbd5e1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ==========================================
   3. 4-COLUMN POPULAR TOOLS GRID
========================================== */
.pop-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.35rem;
    margin-bottom: 3.5rem;
}

.pop-tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, border-color 0.18s ease;
}

.pop-tool-card:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 14px 28px -8px rgba(37, 99, 235, 0.14);
}

html.dark .pop-tool-card {
    background: #131b2e;
    border-color: #1e293b;
}

html.dark .pop-tool-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.5);
}

.pop-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.pop-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.16s ease;
}

.pop-tool-card:hover .pop-card-icon {
    transform: scale(1.06);
}

.pop-featured-pill {
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fef3c7;
    color: #b45309;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

html.dark .pop-featured-pill {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

.pop-popular-pill {
    font-size: 0.68rem;
    font-weight: 700;
    background: #eff6ff;
    color: #2563eb;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

html.dark .pop-popular-pill {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.pop-card-title {
    font-size: 1.04rem;
    font-weight: 750;
    color: #0f172a;
    margin: 0 0 0.45rem 0;
    line-height: 1.3;
    transition: color 0.14s ease;
}

.pop-tool-card:hover .pop-card-title {
    color: #2563eb;
}

html.dark .pop-card-title {
    color: #f8fafc;
}

html.dark .pop-tool-card:hover .pop-card-title {
    color: #60a5fa;
}

.pop-card-desc {
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

html.dark .pop-card-desc {
    color: #94a3b8;
}

.pop-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1.1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #f1f5f9;
}

html.dark .pop-card-foot {
    border-color: #1e293b;
}

.pop-card-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .pop-card-cat {
    color: #94a3b8;
}

.pop-card-cat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pop-card-go {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
    flex-shrink: 0;
}

html.dark .pop-card-go {
    color: #60a5fa;
}

/* Empty State */
.pop-empty-state {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
}

html.dark .pop-empty-state {
    background: #131b2e;
    border-color: #334155;
}

/* Bottom CTA Strip */
.pop-bottom-cta {
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
}

html.dark .pop-bottom-cta {
    background: linear-gradient(135deg, #131b2e 0%, #1e1b4b 100%);
    border-color: #312e81;
}

.pop-cta-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

html.dark .pop-cta-title {
    color: #f8fafc;
}

.pop-cta-sub {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
}

html.dark .pop-cta-sub {
    color: #94a3b8;
}

.pop-cta-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pop-cta-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 650;
    padding: 0.65rem 1.4rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    transition: transform 0.14s ease;
}

.pop-cta-btn-primary:hover {
    transform: translateY(-1px);
}

.pop-cta-btn-secondary {
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 0.88rem;
    font-weight: 650;
    padding: 0.65rem 1.4rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.14s ease;
}

.pop-cta-btn-secondary:hover {
    background: #eff6ff;
}

html.dark .pop-cta-btn-secondary {
    background: #1e293b;
    border-color: #334155;
    color: #93c5fd;
}

/* ==========================================
   4. RESPONSIVE BREAKPOINTS
========================================== */
@media (max-width: 1280px) {
    .pop-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pop-hero {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding: 1.75rem;
    }

    .pop-title {
        font-size: 2.25rem;
    }

    .pop-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pop-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .pop-right-controls {
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .pop-tools-grid {
        grid-template-columns: 1fr;
    }

    .pop-title {
        font-size: 1.85rem;
    }

    .pop-hero {
        padding: 1.35rem;
    }
}


