/* =========================================
   Cities Directory Page
   ========================================= */

.tag-orange {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(253, 82, 2, 0.1);
    color: var(--brand-orange);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* ---- Hero ---- */
.city-hero {
    padding: 150px 0 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.city-hero::before {
content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Add grid pattern ONLY to background */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Crect x='10' y='10' width='80' height='80' rx='20' fill='none' stroke='%23f1f3f9' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center top;
    
    /* Fade the background pattern at the edges */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
}

.city-hero .container {
    position: relative;
    z-index: 1;
}

.city-hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-navy);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 16px 0 20px;
}

.city-hero-sub {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* ---- Search Box ---- */
.city-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 650px;
    margin: 0 auto;
    background: white;
    border: 1.5px solid #d8e0ec;
    border-radius: 50px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
}


.city-search input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    color: var(--text-navy);
    background: transparent;
}

.city-search input::placeholder {
    color: #a0aab8;
}

.city-search button {
    background: var(--text-navy);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.city-search button:hover {
    background: var(--brand-green-hover);
}

/* ---- Stats Bar ---- */
.city-stats-bar {
    background: var(--text-navy);
    padding: 28px 0;
}

.city-stats-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.city-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 50px;
}

.city-stat strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-orange);
    line-height: 1;
}

.city-stat span {
    font-size: 0.82rem;
    color: #889bb0;
    margin-top: 4px;
    font-weight: 500;
}

.city-stat-div {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.1);
}

/* ---- Main Grid Section ---- */
.cities-section {
    padding: 80px 0 120px;
    background: #ffffff;
}

.city-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.city-results-count {
    font-size: 1rem;
    color: var(--text-gray);
}

.city-results-count strong {
    color: var(--text-navy);
}

.city-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}

.city-filter-btn {
    padding: 8px 22px;
    border-radius: 50px;
    border: 1.5px solid #d8e0ec;
    background: white;
    font-family: 'Sora', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
}

.city-filter-btn:hover,
.city-filter-btn.active {
    background: var(--text-navy);
    color: white;
    border-color: var(--text-navy);
}

/* ---- Card Grid ---- */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.city-card {
    background: white;
    border: 1.5px solid #e8edf5;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.city-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.08);
    border-color: #c8d5ea;
}

.city-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.city-card-header-info {
    flex: 1;
    min-width: 0;
}

.city-card-header-info h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-navy);
    margin-bottom: 2px;
    line-height: 1.2;
}

.city-card-header-info .city-state {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.city-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(253, 82, 2, 0.08); /* Updated to orange-ish background */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid rgba(253, 82, 2, 0.1);
}

.city-badge {
    padding: 4px 12px;
    border-radius: 50px;
    background: #f1f4f9;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-navy);
}


.city-desc {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.city-meta {
    display: flex;
    padding: 16px 0;
    border-top: 1px solid #f0f3f8;
    margin-bottom: 24px;
}

.city-meta-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.city-meta-item strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-navy);
}

.city-meta-item span {
    font-size: 0.78rem;
    color: var(--text-gray);
    font-weight: 500;
}

.city-meta-div {
    width: 1px;
    height: 35px;
    background: #eef1f6;
}

.city-view-btn {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 50px;
    background: var(--text-navy);
    color: white;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.2s;
}

.city-view-btn:hover {
    background: #0f1e3a;
}

/* ---- CTA Section ---- */
.city-cta {
    background: var(--text-navy);
    border-radius: 28px;
    padding: 60px 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.city-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect x='5' y='5' width='50' height='50' rx='12' fill='none' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.city-cta-content {
    position: relative;
    z-index: 1;
}

.city-cta h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.city-cta p {
    color: #889bb0;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
}

.btn-orange {
    position: relative;
    z-index: 1;
    background: var(--brand-orange);
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-orange:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .city-cta {
        flex-direction: column;
        text-align: center;
        padding: 50px 40px;
    }
    
    .city-cta p {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .city-hero-title {
        font-size: 2rem;
    }
    .city-hero-sub {
        font-size: 1rem;
    }
    
    .city-stat {
        padding: 0 20px;
    }
    
    .city-stat-div {
        display: none;
    }
    
    .city-stats-inner {
        flex-wrap: wrap;
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .cities-grid {
        grid-template-columns: 1fr;
    }
    
    .city-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .city-search {
        border-radius: 50px;
        padding: 6px 6px 6px 16px;
    }
}
