/* ==========================================================================
   taxonomy-city.css
   ========================================================================== */

/* ── Hero ─────────────────────────────────────────────── */
.city-hero {
    background: var(--bg-gradient);
    background-size: cover;
    background-position: center;
    padding: 5rem 0 4rem;
    color: white;
    text-align: center;
}

.city-hero-inner { max-width: 700px; margin: 0 auto; }

.city-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(8px);
}

.city-hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.city-hero-desc {
    font-size: 1.05rem;
    opacity: 0.85;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Stats */
.city-stats {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 1.3rem 2rem;
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.city-stat { text-align: center; padding: 0 1.8rem; }

.city-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.city-stat-lbl {
    display: block;
    font-size: 0.82rem;
    opacity: 0.8;
    margin-top: 0.15rem;
    font-weight: 600;
}

.city-stat-sep {
    width: 1px;
    height: 42px;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}

/* ── Sticky Tabs ──────────────────────────────────────── */
.city-tabs-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.city-tabs-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}
.city-tabs-nav::-webkit-scrollbar { display: none; }

.ctab {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 1.05rem 1.7rem;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--text-gray);
    font-family: var(--font);
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ctab:hover { color: var(--primary); background: var(--primary-light); }
.ctab.active { color: var(--primary); border-bottom-color: var(--primary); }

.ctab-count {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.12rem 0.5rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
}

.ctab.active .ctab-count {
    background: var(--primary);
    color: white;
}

/* ── Body ─────────────────────────────────────────────── */
.city-body { padding: 3rem 0 5rem; }

.ctab-panel { display: none; }
.ctab-panel.active { display: block; }

.city-section-intro { margin-bottom: 2rem; }
.city-section-intro h2 { font-size: 1.75rem; font-weight: 800; color: var(--text-dark); margin-bottom: 0.35rem; }
.city-section-intro p  { color: var(--text-gray); font-size: 0.97rem; }

/* ── Grid ─────────────────────────────────────────────── */
.city-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

/* ── Card ─────────────────────────────────────────────── */
.ccard {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.ccard:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(27,45,107,0.1);
    border-color: var(--primary-light);
}

.ccard-img {
    position: relative;
    height: 215px;
    overflow: hidden;
    background: var(--bg-gray-dark);
}

.ccard-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ccard:hover .ccard-thumb { transform: scale(1.06); }

.ccard-badge {
    position: absolute;
    top: 11px;
    right: 11px;
    padding: 0.28rem 0.85rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    color: white;
}

.badge-new    { background: var(--primary); }
.badge-resale { background: #C9A84C; }
.badge-type   { background: #10b981; }

.ccard-price {
    position: absolute;
    bottom: 11px;
    left: 11px;
    background: rgba(15,23,42,0.82);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.ccard-body {
    padding: 1.35rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.ccard-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.ccard-title a { color: var(--text-dark); text-decoration: none; }
.ccard-title a:hover { color: var(--primary); }

.ccard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    font-size: 0.83rem;
    color: var(--text-gray);
}

.ccard-meta span { display: flex; align-items: center; gap: 0.28rem; }

.ccard-btn {
    display: block;
    background: var(--primary);
    color: white !important;
    padding: 0.72rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
    transition: all 0.25s;
}

.ccard-btn:hover {
    background: var(--primary-hover);
    color: white !important;
    transform: translateY(-2px);
}

/* ── Empty ────────────────────────────────────────────── */
.city-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-gray);
}

.city-empty svg { opacity: 0.2; margin: 0 auto 1rem; display: block; }
.city-empty p   { font-size: 1.05rem; }

/* ── Pagination ───────────────────────────────────────── */
.city-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.city-pagination .page-numbers {
    padding: 0.6rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.city-pagination .page-numbers:hover,
.city-pagination .page-numbers.current {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
}

/* ── Resale Bar ───────────────────────────────────────── */
.city-resale-link-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #fffbeb;
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.city-resale-link-bar span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.93rem;
}

.city-resale-full-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #C9A84C;
    color: white !important;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.2s;
    white-space: nowrap;
}

.city-resale-full-btn:hover {
    background: #a8872e;
    color: white !important;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

/* Tablet Landscape */
@media (max-width: 1024px) {
    .city-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet Portrait */
@media (max-width: 768px) {

    /* Hero */
    .city-hero         { padding: 3.5rem 0 3rem; }
    .city-hero-badge   { font-size: 0.8rem; }
    .city-hero-title   { font-size: 2rem; }
    .city-hero-desc    { font-size: 0.95rem; margin-bottom: 2rem; }

    /* Stats */
    .city-stats        { padding: 1.1rem 1.2rem; }
    .city-stat         { padding: 0 1rem; }
    .city-stat-num     { font-size: 1.5rem; }
    .city-stat-lbl     { font-size: 0.78rem; }
    .city-stat-sep     { height: 30px; }

    /* Tabs — not sticky on tablet */
    .city-tabs-bar     { position: static; }
    .ctab              { padding: 0.85rem 1rem; font-size: 0.86rem; gap: 0.35rem; }
    .ctab svg          { width: 15px; height: 15px; }
    .ctab-count        { font-size: 0.72rem; padding: 0.1rem 0.45rem; }

    /* Body */
    .city-body         { padding: 2rem 0 4rem; }
    .city-section-intro h2 { font-size: 1.4rem; }
    .city-section-intro p  { font-size: 0.9rem; }

    /* Grid → 1 col */
    .city-grid         { grid-template-columns: 1fr; gap: 1.25rem; }

    /* Card */
    .ccard-img         { height: 200px; }
    .ccard-body        { padding: 1.15rem; gap: 0.6rem; }
    .ccard-title       { font-size: 0.95rem; }
    .ccard-meta        { font-size: 0.8rem; gap: 0.45rem; }
    .ccard-btn         { padding: 0.65rem 1rem; font-size: 0.87rem; }

    /* Resale bar */
    .city-resale-link-bar  { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .city-resale-full-btn  { width: 100%; justify-content: center; }

    /* Pagination */
    .city-pagination        { gap: 0.35rem; margin-top: 2rem; }
    .city-pagination .page-numbers { padding: 0.55rem 0.85rem; font-size: 0.85rem; }
}

/* Mobile */
@media (max-width: 480px) {

    /* Hero */
    .city-hero         { padding: 2.8rem 0 2.5rem; }
    .city-hero-title   { font-size: 1.65rem; }
    .city-hero-badge   { display: none; }
    .city-hero-desc    { font-size: 0.9rem; margin-bottom: 1.5rem; }

    /* Stats → vertical stack */
    .city-stats {
        flex-direction: column;
        border-radius: 14px;
        padding: 0;
        overflow: hidden;
        width: 100%;
        max-width: 260px;
    }
    .city-stat-sep     { display: none; }
    .city-stat {
        width: 100%;
        padding: 0.9rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }
    .city-stat:last-child { border-bottom: none; }
    .city-stat-num     { font-size: 1.4rem; }
    .city-stat-lbl     { font-size: 0.8rem; }

    /* Tabs */
    .ctab              { padding: 0.8rem 0.9rem; font-size: 0.82rem; }
    .ctab-count        { display: none; }

    /* Card */
    .ccard-img         { height: 180px; }
    .ccard-price       { font-size: 0.78rem; padding: 0.25rem 0.65rem; }
    .ccard-badge       { font-size: 0.72rem; padding: 0.22rem 0.7rem; }

    /* Empty */
    .city-empty        { padding: 3.5rem 1rem; }
    .city-empty svg    { width: 44px; height: 44px; }
    .city-empty p      { font-size: 0.95rem; }
}

/* Very Small */
@media (max-width: 360px) {
    .city-hero-title   { font-size: 1.45rem; }
    .city-hero-desc    { font-size: 0.85rem; }
    .ccard-body        { padding: 1rem; }
    .ccard-title       { font-size: 0.88rem; }
    .ctab              { padding: 0.75rem 0.75rem; font-size: 0.78rem; }
    .city-stat         { padding: 0.75rem 1.2rem; }
}
