/**
 * Bay Area Service Hub - Best Of List Template
 * Premium Design System for Contractor Rankings
 * SEO and AI Citation Optimized
 */

/* ========================================
   FONTS - Match Business Single
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ========================================
   DESIGN SYSTEM VARIABLES
   ======================================== */

.bash-best-of-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 60px;
    background: #F8FAFC;

    /* Primary Colors */
    --bash-primary: #194FAD;
    --bash-primary-dark: #0F3A82;
    --bash-primary-light: #5A9BFF;

    /* Success/Trust */
    --bash-success: #22C55E;
    --bash-success-dark: #16A34A;

    /* Text */
    --bash-text-primary: #0F172A;
    --bash-text-secondary: #475569;
    --bash-text-muted: #94A3B8;

    /* Surfaces */
    --bash-bg-primary: #FFFFFF;
    --bash-bg-secondary: #F8FAFC;

    /* Borders */
    --bash-border: #E2E8F0;
    --bash-border-light: #F1F5F9;

    /* Shadows */
    --bash-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --bash-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07);
    --bash-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1);

    /* Radii */
    --bash-radius-sm: 6px;
    --bash-radius: 10px;
    --bash-radius-lg: 16px;
    --bash-radius-xl: 24px;
    --bash-radius-full: 9999px;

    /* Typography */
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--bash-text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   HERO SECTION
   ======================================== */

.bash-best-of-hero {
    margin: 0 -24px 40px;
}

.bash-best-of-hero .bash-hero-gradient {
    background: linear-gradient(135deg, #0F3A82 0%, #194FAD 50%, #2B5FB8 100%);
    min-height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bash-best-of-hero .bash-hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

.bash-best-of-hero .bash-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 100%);
}

.bash-best-of-title {
    font-family: 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: white;
    margin: 0 0 12px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.bash-best-of-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 8px;
}

.bash-best-of-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ========================================
   TOP PICK SECTION
   ======================================== */

.bash-top-pick-section {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 24px 28px;
    background: var(--bash-bg-primary);
    border-left: 4px solid var(--bash-primary);
    border-radius: var(--bash-radius);
    box-shadow: var(--bash-shadow);
}

.bash-top-pick-label {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--bash-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bash-top-pick-name {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--bash-text-primary);
    margin-bottom: 6px;
}

.bash-top-pick-license {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--bash-success-dark);
    margin-bottom: 10px;
}

.bash-top-pick-special {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--bash-text-secondary);
    line-height: 1.6;
}

/* ========================================
   CONTRACTOR CARDS SECTION
   ======================================== */

.bash-contractors-section {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.bash-contractor-card {
    background: var(--bash-bg-primary);
    border: 1px solid var(--bash-border);
    border-radius: var(--bash-radius-xl);
    padding: 28px;
    box-shadow: var(--bash-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bash-contractor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--bash-shadow-lg);
}

/* Card Header */
.bash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.bash-card-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.bash-card-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.bash-card-rank {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--bash-primary);
    flex-shrink: 0;
}

.bash-card-name {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--bash-text-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a.bash-card-name:hover {
    color: var(--bash-primary);
}

.bash-card-score {
    background: var(--bash-primary);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header CTA - Same style as original */
.bash-cta-header {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: white;
    border-radius: var(--bash-radius-full);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bash-cta-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(34, 197, 94, 0.45);
    color: white;
}

.bash-cta-header .bash-cta-icon {
    width: 20px;
    height: 20px;
}

/* Card Meta */
.bash-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--bash-text-secondary);
}

.bash-card-meta-divider {
    width: 4px;
    height: 4px;
    background: var(--bash-text-muted);
    border-radius: 50%;
}

/* License Verification */
.bash-card-license {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(22, 163, 74, 0.12) 100%);
    border-radius: var(--bash-radius);
    margin-bottom: 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}

.bash-license-verified {
    color: var(--bash-success-dark);
    font-weight: 700;
}

.bash-license-number {
    color: var(--bash-text-secondary);
}

.bash-license-verify {
    color: var(--bash-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: auto;
}

.bash-license-verify:hover {
    text-decoration: underline;
}

/* Platform Scores */
.bash-card-platforms {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bash-bg-secondary);
    border: 1px solid var(--bash-border-light);
    border-radius: var(--bash-radius);
}

.bash-platforms-label {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--bash-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.bash-platforms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.bash-platform-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}

.bash-platform-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bash-radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: white;
}

.bash-platform-item[data-platform="google"] .bash-platform-icon {
    background: #EA4335;
}

.bash-platform-item[data-platform="yelp"] .bash-platform-icon {
    background: #D32323;
}

.bash-platform-item[data-platform="bbb"] .bash-platform-icon {
    background: #005A8C;
    font-size: 9px;
}

.bash-platform-item[data-platform="diamond"] .bash-platform-icon {
    background: #00A0D2;
}

.bash-platform-item[data-platform="checkbook"] .bash-platform-icon {
    background: #2E7D32;
}

.bash-platform-rating,
.bash-platform-grade,
.bash-platform-certified,
.bash-platform-percent {
    font-weight: 700;
    color: var(--bash-text-primary);
}

.bash-platform-count {
    color: var(--bash-text-muted);
    font-size: 13px;
}

/* Badges */
.bash-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.bash-badge-cert,
.bash-badge-brand {
    display: inline-flex;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(25, 79, 173, 0.08) 0%, rgba(90, 155, 255, 0.12) 100%);
    border: 1px solid rgba(25, 79, 173, 0.2);
    border-radius: var(--bash-radius-full);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--bash-primary);
}

.bash-badge-emergency {
    display: inline-flex;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(239, 68, 68, 0.12) 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--bash-radius-full);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #DC2626;
}

.bash-badge-beso {
    display: inline-flex;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(16, 185, 129, 0.12) 100%);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: var(--bash-radius-full);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #059669;
}

/* Summary */
.bash-card-summary {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--bash-text-secondary);
    margin-bottom: 20px;
}

/* Essential Q&A */
.bash-card-qa {
    background: var(--bash-bg-secondary);
    border: 1px solid var(--bash-border-light);
    border-radius: var(--bash-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.bash-qa-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--bash-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bash-border);
}

.bash-qa-item {
    margin-bottom: 14px;
}

.bash-qa-item:last-child {
    margin-bottom: 0;
}

.bash-qa-question {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--bash-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.bash-qa-answer {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--bash-text-primary);
}

/* Card Footer */
.bash-card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bash-border-light);
}

.bash-cta-secondary {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--bash-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.bash-cta-secondary:hover {
    color: var(--bash-primary-dark);
    text-decoration: underline;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.bash-best-of-empty {
    font-family: 'DM Sans', sans-serif;
}

.bash-best-of-empty h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--bash-text-primary);
    margin-bottom: 16px;
}

.bash-best-of-empty p {
    font-size: 16px;
    color: var(--bash-text-secondary);
    line-height: 1.6;
}

.bash-best-of-empty a {
    color: var(--bash-primary);
    text-decoration: none;
}

.bash-best-of-empty a:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .bash-best-of-list {
        padding: 0 16px 40px;
    }

    .bash-best-of-hero {
        margin: 0 -16px 30px;
    }

    .bash-best-of-title {
        font-size: 28px;
    }

    .bash-best-of-subtitle {
        font-size: 16px;
    }

    .bash-top-pick-section {
        padding: 20px;
    }

    .bash-top-pick-name {
        font-size: 22px;
    }

    .bash-contractor-card {
        padding: 20px;
        border-radius: var(--bash-radius-lg);
    }

    .bash-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .bash-card-header-left {
        width: 100%;
    }

    .bash-card-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .bash-card-score {
        align-self: flex-start;
    }

    .bash-cta-header {
        flex: 1;
        justify-content: center;
    }

    .bash-card-name {
        font-size: 18px;
    }

    .bash-card-license {
        flex-wrap: wrap;
    }

    .bash-license-verify {
        margin-left: 0;
        margin-top: 6px;
        width: 100%;
    }

    .bash-platforms-grid {
        gap: 12px;
    }

    .bash-card-footer {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .bash-best-of-title {
        font-size: 24px;
    }

    .bash-card-rank {
        font-size: 18px;
    }

    .bash-card-name {
        font-size: 16px;
    }

    .bash-card-badges {
        gap: 6px;
    }

    .bash-badge-cert,
    .bash-badge-brand,
    .bash-badge-emergency,
    .bash-badge-beso {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .bash-best-of-hero .bash-hero-gradient {
        background: #f0f0f0 !important;
        min-height: auto;
    }

    .bash-best-of-title {
        color: #000 !important;
        text-shadow: none !important;
    }

    .bash-cta-primary {
        display: none;
    }

    .bash-contractor-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bash-top-pick-section {
    animation: fadeInUp 0.5s ease 0.1s both;
}

.bash-contractor-card {
    animation: fadeInUp 0.5s ease both;
}

.bash-contractor-card:nth-child(1) { animation-delay: 0.15s; }
.bash-contractor-card:nth-child(2) { animation-delay: 0.25s; }
.bash-contractor-card:nth-child(3) { animation-delay: 0.35s; }
.bash-contractor-card:nth-child(4) { animation-delay: 0.45s; }
.bash-contractor-card:nth-child(5) { animation-delay: 0.55s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
