/* =========================================================================
   City Hub Page — Nouvelles sections
   ========================================================================= */

/* --- En un coup d'œil (Glance Grid) --- */
.city-glance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.city-glance-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.city-glance-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.city-glance-icon {
    font-size: 1.5rem;
    color: #0798cb;
    margin-bottom: 0.5rem;
}

.city-glance-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.city-glance-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* --- Quartiers (Neighborhoods Grid) --- */
.city-neighborhoods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.city-neighborhood-card {
    display: block;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.city-neighborhood-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #0798cb;
    text-decoration: none;
    color: inherit;
}

.city-neighborhood-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.35rem;
}

.city-neighborhood-count {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.city-neighborhood-ideal {
    font-size: 0.85rem;
    color: #0798cb;
    margin-bottom: 0.5rem;
}

.city-neighborhood-ideal i {
    margin-right: 0.25rem;
}

.city-neighborhood-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.city-neighborhood-cat-badge {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* --- Budget Voyage (Budget Grid) --- */
.city-budget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.city-budget-col {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.city-budget-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

.city-budget-col--low .city-budget-header {
    background: #e8f5e9;
    color: #2e7d32;
}

.city-budget-col--mid .city-budget-header {
    background: #fff3e0;
    color: #e65100;
}

.city-budget-col--high .city-budget-header {
    background: #fce4ec;
    color: #c62828;
}

.city-budget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid #f0f0f0;
}

.city-budget-label {
    font-size: 0.9rem;
    color: #495057;
}

.city-budget-label i {
    margin-right: 0.35rem;
    color: #6c757d;
}

.city-budget-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
}

/* --- Sous-catégories (Subcategory Tags) --- */
.city-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.city-subcat-tag {
    display: inline-block;
    background: #f0f4f8;
    color: #0798cb;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid #d0dbe5;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.city-subcat-tag:hover {
    background: #0798cb;
    color: #fff;
    border-color: #0798cb;
    text-decoration: none;
}

/* --- Section header (title + link) --- */
.country-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.country-section-header .country-section-link {
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 1rem;
    padding-top: 0.25rem;
}

/* --- City card image container --- */
.city-card-img {
    width: 100%;
    height: 180px;
    background: #e9ecef;
    overflow: hidden;
}

.city-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Skeleton placeholder (CLS fix) --- */
.item-slide-container .skeleton {
    width: 100%;
    height: 200px;
    background: #e9ecef;
    overflow: hidden;
}

.item-slide-container .skeleton img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Blog featured post --- */
.country-blog-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
}

.country-blog-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.country-blog-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    pointer-events: none;
}

.country-blog-hero-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 32px;
    color: #fff;
}

.country-blog-hero-text h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.country-blog-hero-text p {
    font-size: 0.95rem;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.9);
}

.country-blog-hero-text span {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid #fff;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

/* --- Community questions (distinct from FAQs) --- */
.community-questions .faq-item {
    border-left: 3px solid #0798cb;
    background: #f0f9fc;
}

.community-questions .faq-item button {
    background: #f0f9fc;
}

.community-questions .faq-item.active button {
    background: #e4f4fa;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .city-glance-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .city-neighborhoods-grid {
        grid-template-columns: 1fr;
    }

    .city-budget-grid {
        grid-template-columns: 1fr;
    }

    .city-budget-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .country-section-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .country-section-header .country-section-link {
        margin-left: 0;
    }

    .city-card-img {
        height: 140px;
    }

    .item-slide-container .skeleton {
        height: 160px;
    }

    .country-blog-hero {
        height: 280px;
    }

    .country-blog-hero-text {
        padding: 16px 20px !important;
    }

    .country-blog-hero-text h3 {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    .city-glance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .city-glance-card {
        padding: 1rem 0.5rem;
    }

    .city-glance-count {
        font-size: 1rem;
    }
}

/* ========== CTA Cards ========== */
.card-cta {
    padding: 0.5rem 1rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.btn-cta-card {
    color: #297cbb;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
}

.card:hover .btn-cta-card {
    color: #1a5a8a;
}

.btn-cta-card i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.card:hover .btn-cta-card i {
    transform: translateX(3px);
}

/* ========== Description Truncation ========== */
.city-description-truncated {
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.city-description-truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.city-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #297cbb;
    margin-top: 0.25rem;
}

/* ========== Top Picks Section ========== */
.city-top-picks-section {
    background: linear-gradient(135deg, #f0f7fd 0%, #f8fbfe 50%, #fef9f0 100%);
    padding: 2.5rem 0 3rem;
    margin-top: 1rem;
    border-top: 1px solid #e8eff5;
    border-bottom: 1px solid #e8eff5;
}

.city-top-picks-grid .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.city-top-picks-grid .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.city-top-pick-rank {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #f5c518;
    font-size: 0.8rem;
    font-weight: 800;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    letter-spacing: -0.5px;
}

.city-top-pick-badge {
    position: absolute;
    bottom: 0.6rem;
    left: 0.6rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #1a5a8a;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.25rem 0.65rem;
    border-radius: 2rem;
    z-index: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
