/* ============================================================================
   Homepage Styles - Modern Directory Design
   ============================================================================ */

/* Hero Section */
.admin-bar .bip-hero {
    position: relative;
    min-height: calc(100vh - 114px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
}

.bip-hero {
    position: relative;
    /* Was calc(100vh - 82px). A directory should show results
       sooner; raise this back if you want the full-bleed hero. */
    min-height: min(72vh, 640px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
}


/* The hero previously loaded a 1920x1080 Unsplash cityscape from a remote
   host and buried it under a 60% black wash. Three problems: it was the
   largest-contentful-paint element gated behind a third-party DNS + TLS
   round trip, a stock skyline says nothing about law, and the black overlay
   flattened the brand navy into grey. This is pure CSS, so it paints with
   the stylesheet and costs no extra request. */
.bip-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background:
        radial-gradient(120% 100% at 12% 0%, var(--bip-primary-700) 0%, var(--bip-primary) 58%),
        var(--bip-primary);
}

/* Fine architectural grid, faded out so it reads as texture rather than
   pattern. Masked to one corner to keep the composition asymmetric. */
.bip-hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(72% 72% at 76% 16%, #000 0%, transparent 100%);
    mask-image: radial-gradient(72% 72% at 76% 16%, #000 0%, transparent 100%);
}

/* Single brass glow, offset from centre. One warm light source against the
   navy is what keeps this from looking like a flat colour block. */
.bip-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(46% 58% at 82% 8%, rgba(184, 134, 59, 0.20) 0%, transparent 70%);
}

.bip-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.bip-hero-title {
    font-size: 3.5rem;
    font-weight: var(--bip-weight-bold);
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.bip-hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    font-weight: var(--bip-weight-normal);
}

/* Hero Search */
.bip-hero-search {
    margin-bottom: 30px;
}

.bip-hero-search-wrapper {
    display: flex;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin: 0 auto;
}

.bip-hero-search-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding: 12px 20px;
}

.bip-hero-search-input-group i {
    color: var(--bip-default-500);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.bip-hero-search-input {
    border: none;
    outline: none;
    font-size: var(--bip-font-regular);
    color: var(--bip-default-800);
    background: transparent;
    width: 100%;
    font-family: inherit;
}

.bip-hero-search-input::placeholder {
    color: var(--bip-default-400);
}

.bip-hero-search-input-group:first-of-type {
    border-right: 1px solid var(--bip-default-200);
}

.bip-hero-search-btn {
    background: var(--bip-primary-600);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: var(--bip-font-regular);
    font-weight: var(--bip-weight-semibold);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bip-hero-search-btn:hover {
    background: var(--bip-primary-700);
    transform: translateX(2px);
}

.bip-hero-search-btn i {
    width: 18px;
    height: 18px;
}

/* Hero Location Dropdown */
.bip-hero-location-wrapper {
    position: relative;
}

.bip-hero-location-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--bip-default-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    max-height: 350px;
    overflow: hidden;
}

.bip-hero-location-dropdown.active {
    display: block;
}

.bip-hero-location-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 350px;
}

.bip-hero-location-item {
    border-bottom: 1px solid var(--bip-default-100);
}

.bip-hero-location-item:last-child {
    border-bottom: none;
}

.bip-hero-location-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--bip-default-800);
    font-size: var(--bip-font-small);
}

.bip-hero-location-btn:hover {
    background: var(--bip-default-100);
}

.bip-hero-location-btn i {
    width: 16px;
    height: 16px;
    color: var(--bip-default-600);
    flex-shrink: 0;
}

.bip-hero-location-city-name {
    font-size: var(--bip-font-small);
    font-weight: var(--bip-weight-medium);
    color: var(--bip-default-800);
}

.bip-hero-location-region-name {
    color: var(--bip-default-600);
    font-size: var(--bip-font-small);
}

.bip-hero-location-empty {
    padding: 20px;
    text-align: center;
    color: var(--bip-default-500);
    font-size: var(--bip-font-small);
}

#bip-hero-location-display {
    cursor: pointer;
}

/* Hero Quick Links */
.bip-hero-quick-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bip-hero-quick-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--bip-font-small);
    font-weight: var(--bip-weight-medium);
}

.bip-hero-quick-link {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: var(--bip-font-small);
    font-weight: var(--bip-weight-medium);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.bip-hero-quick-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Stats Section */
.bip-stats-section {
    background: white;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

.bip-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.bip-stat-item {
    text-align: center;
}

.bip-stat-number {
    font-size: 2.5rem;
    font-weight: var(--bip-weight-bold);
    color: var(--bip-primary-600);
    margin-bottom: 8px;
    line-height: 1;
}

.bip-stat-label {
    font-size: var(--bip-font-regular);
    color: var(--bip-default-600);
    font-weight: var(--bip-weight-medium);
}

/* Section Header */
.bip-section {
    padding: 80px 0;
}

.bip-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.bip-section-title {
    font-size: 2.5rem;
    font-weight: var(--bip-weight-bold);
    color: var(--bip-default-800);
    margin-bottom: 16px;
}

.bip-section-subtitle {
    font-size: 1.125rem;
    color: var(--bip-default-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Cities Section */
.bip-cities-section {
    background: var(--bip-default-100);
}

.bip-cities-section .bip-cities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.bip-cities-section .bip-city-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bip-cities-section .bip-city-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.bip-city-image {
    position: relative;
    height: 280px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

.bip-city-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    transition: background 0.3s ease;
}

.bip-city-card:hover .bip-city-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.bip-city-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: white;
}

.bip-city-name {
    font-size: 1.75rem;
    font-weight: var(--bip-weight-bold);
    margin-bottom: 4px;
    color: white;
}

.bip-city-state {
    font-size: var(--bip-font-regular);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.bip-city-count {
    font-size: var(--bip-font-small);
    color: rgba(255, 255, 255, 0.8);
    font-weight: var(--bip-weight-medium);
}

/* Categories Section */
.bip-categories-section {
    background: white;
}

.bip-categories-section .bip-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.bip-categories-section .bip-category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bip-categories-section .bip-category-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.bip-category-image {
    position: relative;
    height: 240px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

.bip-category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.75) 100%);
    transition: background 0.3s ease;
}

.bip-categories-section .bip-category-card:hover .bip-category-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.bip-category-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.bip-category-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.bip-categories-section .bip-category-card:hover .bip-category-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.bip-category-icon i {
    width: 32px;
    height: 32px;
    color: white;
}

.bip-category-name {
    font-size: 1.5rem;
    font-weight: var(--bip-weight-bold);
    margin-bottom: 8px;
    color: white;
}

.bip-category-count {
    font-size: var(--bip-font-small);
    color: rgba(255, 255, 255, 0.9);
    font-weight: var(--bip-weight-medium);
}

/* Features Section */
.bip-features-section {
    background: var(--bip-default-100);
}

.bip-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.bip-feature-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--bip-default-200);
}

.bip-feature-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--bip-primary-200);
}

.bip-feature-icon {
    width: 64px;
    height: 64px;
    background: var(--bip-primary-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.bip-feature-card:hover .bip-feature-icon {
    background: var(--bip-primary-100);
    transform: scale(1.05);
}

.bip-feature-icon i {
    width: 32px;
    height: 32px;
    color: var(--bip-primary-600);
}

.bip-feature-title {
    font-size: 1.25rem;
    font-weight: var(--bip-weight-semibold);
    color: var(--bip-default-800);
    margin-bottom: 12px;
}

.bip-feature-description {
    font-size: var(--bip-font-small);
    color: var(--bip-default-600);
    line-height: 1.6;
}

/* CTA Section */
.bip-cta-section {
    background: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.bip-cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.bip-cta-title {
    font-size: 2.5rem;
    font-weight: var(--bip-weight-bold);
    color: var(--bip-default-900);
    margin-bottom: 16px;
}

.bip-cta-subtitle {
    font-size: 1.125rem;
    color: var(--bip-default-600);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.bip-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .bip-hero-title {
        font-size: 2.5rem;
    }

    .bip-hero-subtitle {
        font-size: 1.125rem;
    }

    .bip-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .bip-cities-section .bip-cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bip-categories-section .bip-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .bip-section-title {
        font-size: 2rem;
    }

    .bip-cta-title {
        font-size: 2rem;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
        .bip-hero {
            min-height: 600px;
        }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
    .bip-hero {
        min-height: 500px;
        padding: 60px 0;
    }

    .bip-hero-title {
        font-size: 2rem;
    }

    .bip-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .bip-hero-search-wrapper {
        flex-direction: column;
        border-radius: 12px;
        gap: 0;
    }

    .bip-hero-search-input-group {
        padding: 14px 16px;
        border-bottom: 1px solid var(--bip-default-200);
    }

    .bip-hero-search-input-group:first-of-type {
        border-right: none;
    }

    .bip-hero-search-input-group:last-of-type {
        border-bottom: none;
    }

    .bip-hero-search-btn {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
    }

    .bip-hero-quick-links {
        gap: 8px;
    }

    .bip-hero-quick-label {
        width: 100%;
        text-align: center;
    }

    /* Stats Section */
    .bip-stats-section {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    .bip-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .bip-stat-number {
        font-size: 2rem;
    }

    .bip-stat-label {
        font-size: var(--bip-font-small);
    }

    .bip-section {
        padding: 60px 0;
    }

    .bip-section-header {
        margin-bottom: 40px;
    }

    .bip-section-title {
        font-size: 1.75rem;
    }

    .bip-section-subtitle {
        font-size: 1rem;
    }

    .bip-cities-section .bip-cities-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bip-city-image {
        height: 240px;
    }

    .bip-cities-section .bip-city-name {
        font-size: 1.5rem;
    }

    .bip-categories-section .bip-categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bip-category-image {
        height: 220px;
    }

    .bip-categories-section .bip-category-name {
        font-size: 1.25rem;
    }

    .bip-features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bip-feature-card {
        padding: 24px;
    }

    .bip-cta-section {
        padding: 60px 0;
    }

    .bip-cta-title {
        font-size: 1.75rem;
    }

    .bip-cta-subtitle {
        font-size: 1rem;
    }

    .bip-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* Small Mobile (below 480px) */
@media (max-width: 480px) {
    .bip-hero-title {
        font-size: 1.75rem;
    }

    .bip-section-title {
        font-size: 1.5rem;
    }

    .bip-cta-title {
        font-size: 1.5rem;
    }

    .bip-stat-number {
        font-size: 1.75rem;
    }
}
/* ---------------------------------------------------------------
   City cards without photography
   The cards previously carried a remote Unsplash photo each. Eight
   cards meant eight cross-origin image requests for decoration, and
   generic city stock photos say nothing about the attorneys inside.
   A tinted panel keeps the card structure and costs nothing.
   --------------------------------------------------------------- */
.bip-city-image--plain {
    background-color: var(--bip-primary-800);
    background-image:
        linear-gradient(150deg, var(--bip-primary-700) 0%, var(--bip-primary-900) 100%);
    position: relative;
}

.bip-city-image--plain::after {
    /* Faint brass hairline along the bottom edge; the cards read as a set
       without needing imagery to differentiate them. */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bip-accent) 0%, transparent 70%);
}

.bip-city-count {
    color: var(--bip-accent-300);
    font-weight: var(--bip-weight-semibold);
    font-size: var(--bip-font-small);
}

/* ---------------------------------------------------------------
   Browse by state
   Dense text grid rather than cards. With 50 entries, tiles would
   push everything else off the page; this stays scannable.
   --------------------------------------------------------------- */
.bip-regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.bip-region-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid var(--bip-default-300);
    border-radius: var(--bip-radius-md);
    background: var(--bip-surface);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.bip-region-card:hover {
    border-color: var(--bip-accent);
    box-shadow: var(--bip-shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

.bip-region-name {
    font-family: var(--bip-font-display);
    font-size: var(--bip-font-medium);
    font-weight: var(--bip-weight-semibold);
    color: var(--bip-primary);
}

.bip-region-count {
    font-size: var(--bip-font-small);
    font-weight: var(--bip-weight-semibold);
    color: var(--bip-default-600);
    font-variant-numeric: tabular-nums;
}
