/**
 * Bay Area Service Hub - Hub Page Template
 * Displays city cards linking to Best Of pages
 */

@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&family=Outfit:wght@400;500;600;700;800&display=swap');

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

.bash-hub {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
    background: #F8FAFC;

    --bash-primary: #194FAD;
    --bash-primary-dark: #0F3A82;
    --bash-text-primary: #0F172A;
    --bash-text-secondary: #475569;
    --bash-text-muted: #94A3B8;
    --bash-bg-primary: #FFFFFF;
    --bash-bg-secondary: #F8FAFC;
    --bash-border: #E2E8F0;
    --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);
    --bash-radius: 10px;
    --bash-radius-lg: 16px;
    --bash-radius-xl: 24px;

    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

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

.bash-hub-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-hub-hero-content {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.bash-hub-title {
    font-family: 'Outfit', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: white;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

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

/* ========================================
   SECTION TITLES (Regional Hubs)
   ======================================== */

.bash-hub-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--bash-text-primary);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bash-border);
}

.bash-hub-grid-section + .bash-hub-grid-section {
    margin-top: 48px;
}

/* ========================================
   GRID
   ======================================== */

.bash-hub-grid-section {
    max-width: 1000px;
    margin: 0 auto;
}

.bash-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.bash-hub-card {
    background: var(--bash-bg-primary);
    border: 1px solid var(--bash-border);
    border-radius: var(--bash-radius-xl);
    padding: 28px;
    text-decoration: none;
    box-shadow: var(--bash-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: block;
}

.bash-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bash-shadow-lg);
    border-color: var(--bash-primary);
}

.bash-hub-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.bash-hub-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--bash-text-primary);
    margin: 0 0 8px;
}

.bash-hub-card:hover .bash-hub-card-title {
    color: var(--bash-primary);
}

.bash-hub-card-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--bash-text-secondary);
    margin: 0 0 16px;
}

.bash-hub-card-cta {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--bash-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bash-hub-card-cta::after {
    content: '→';
    transition: transform 0.2s ease;
}

.bash-hub-card:hover .bash-hub-card-cta::after {
    transform: translateX(4px);
}

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

.bash-hub-empty {
    text-align: center;
    padding: 60px 20px;
    font-family: 'DM Sans', sans-serif;
    color: var(--bash-text-secondary);
}

.bash-hub-empty p {
    margin: 0 0 12px;
    font-size: 16px;
}

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

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

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

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

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

    .bash-hub-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bash-hub-card {
        padding: 24px;
    }

    .bash-hub-card-title {
        font-size: 20px;
    }
}

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

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

.bash-hub-card {
    animation: fadeInUp 0.4s ease both;
}

.bash-hub-card:nth-child(1) { animation-delay: 0.1s; }
.bash-hub-card:nth-child(2) { animation-delay: 0.15s; }
.bash-hub-card:nth-child(3) { animation-delay: 0.2s; }
.bash-hub-card:nth-child(4) { animation-delay: 0.25s; }
.bash-hub-card:nth-child(5) { animation-delay: 0.3s; }
.bash-hub-card:nth-child(6) { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
    .bash-hub-card {
        animation: none;
    }
}
