/* ============================================
   Location Taxonomy Archives — Styles
   (Geographic Region / Region / Province pages)
   Append to living-in-italy.css or enqueue separately
   ============================================ */

/* ---- Breadcrumbs ---- */
.lit-location-breadcrumbs-bar {
    background: var(--lit-white);
    border-bottom: 1px solid var(--lit-stone);
    padding: 12px 0;
}

.lit-breadcrumbs {
    font-size: 13px;
    color: var(--lit-grey);
}

.lit-breadcrumbs a {
    color: var(--lit-grey);
    text-decoration: none;
    transition: color 0.2s;
}

.lit-breadcrumbs a:hover {
    color: var(--lit-blue);
}

.lit-bc-sep {
    margin: 0 8px;
    color: var(--lit-grey-light);
}

.lit-bc-current {
    color: var(--lit-charcoal);
    font-weight: 600;
}

/* ---- Header ---- */
.lit-location-header {
    background: linear-gradient(135deg, var(--lit-blue) 0%, var(--lit-blue-light) 100%);
    padding: 48px 0 40px;
    text-align: center;
}

.lit-location-type-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
    text-decoration: none;
}

.lit-location-type-badge-link:hover {
    background: rgba(255,255,255,0.25);
}

.lit-location-header-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.lit-location-title {
    font-family: var(--lit-font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--lit-white);
    margin: 0 0 8px 0;
}

.lit-location-meta {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.lit-location-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    max-width: 700px;
    margin: 12px auto 0;
    line-height: 1.6;
}

/* ---- Content ---- */
.lit-location-content {
    padding: 32px 0 60px;
}

.lit-location-section-title {
    font-family: var(--lit-font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--lit-charcoal);
    margin: 36px 0 8px 0;
}

.lit-location-section-subtitle {
    font-size: 14px;
    color: var(--lit-grey);
    margin: 0 0 20px 0;
}

.lit-location-section-subtitle a {
    color: var(--lit-blue);
    text-decoration: none;
    font-weight: 600;
}

.lit-location-section-subtitle a:hover {
    text-decoration: underline;
}

/* ---- Overview Row (Region page) ---- */
.lit-location-overview {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
}

.lit-location-overview-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lit-location-overview-map {
    width: 380px;
    flex-shrink: 0;
}

.lit-location-summary-text {
    font-size: 15px;
    color: var(--lit-charcoal);
    line-height: 1.7;
}

.lit-location-summary-text p {
    margin: 0 0 12px 0;
}

.lit-location-summary-card {
    margin-bottom: 28px;
}

.lit-location-ataglance-card {
    margin-bottom: 28px;
}

.lit-location-summary-text p:last-child {
    margin-bottom: 0;
}

/* ---- Stats Grid (old — kept for province page) ---- */
.lit-location-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.lit-location-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
    flex: 1;
}

.lit-location-stat-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.lit-location-stat-value {
    font-family: var(--lit-font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--lit-charcoal);
}

.lit-location-stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--lit-grey);
    margin-top: 2px;
}

/* ---- Stat Cards (region page — punchy individual cards) ---- */
.lit-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.lit-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--lit-white);
    border: 1px solid var(--lit-stone);
    border-radius: var(--lit-radius);
    padding: 16px 18px;
    box-shadow: var(--lit-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lit-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--lit-shadow-md);
}

.lit-stat-card-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lit-cream);
    border-radius: var(--lit-radius-sm);
    flex-shrink: 0;
}

.lit-stat-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lit-stat-card-value {
    font-family: var(--lit-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--lit-charcoal);
    line-height: 1.2;
}

.lit-stat-card-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--lit-grey);
    margin-top: 2px;
}

/* ---- Region Image Cards Grid (Geo Region page — e.g. Southern Italy) ---- */
.lit-region-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.lit-rcard {
    display: block;
    text-decoration: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.lit-rcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.lit-rcard-img {
    position: relative;
    height: 180px;
    background-color: var(--lit-blue);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.lit-rcard-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.35) 50%,
        rgba(0,0,0,0.08) 100%
    );
    border-radius: 16px;
}

.lit-rcard-content {
    position: relative;
    z-index: 1;
    padding: 14px 16px;
}

.lit-rcard-name {
    font-family: var(--lit-font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--lit-white);
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.lit-rcard-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
}

.lit-rcard-stat {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lit-rcard-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    font-weight: 400;
    line-height: 1.3;
}

.lit-rcard-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--lit-white);
    line-height: 1.3;
}

/* ---- Province Cards (coat of arms style — Region page) ---- */
.lit-pcard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.lit-pcard {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: var(--lit-radius);
    overflow: hidden;
    background: var(--lit-white);
    border: 1px solid var(--lit-stone);
    transition: transform 0.25s, box-shadow 0.25s;
}

.lit-pcard:hover {
    transform: translateY(-4px);
    box-shadow: var(--lit-shadow-lg);
    border-color: var(--lit-blue);
}

.lit-pcard-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 12px;
    background: var(--lit-cream);
    min-height: 120px;
}

.lit-pcard-overlay {
    display: none;
}

.lit-pcard-img img,
.lit-pcard-crest {
    max-height: 110px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lit-pcard-placeholder {
    font-size: 48px;
    opacity: 0.4;
}

.lit-pcard-content {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lit-pcard-name {
    font-family: var(--lit-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--lit-charcoal);
    margin: 0 0 8px 0;
    text-align: center;
}

.lit-pcard:hover .lit-pcard-name {
    color: var(--lit-blue);
}

.lit-pcard-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.lit-pcard-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.lit-pcard-stat-label {
    color: var(--lit-grey);
    font-weight: 400;
}

.lit-pcard-stat-value {
    font-weight: 700;
    color: var(--lit-charcoal);
}

/* ---- Regions List Grid (Geo Region page) ---- */
.lit-regions-list-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.lit-region-list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--lit-white);
    border: 1px solid var(--lit-stone);
    border-radius: var(--lit-radius);
    padding: 20px 24px;
    text-decoration: none;
    color: var(--lit-charcoal);
    transition: all 0.25s;
}

.lit-region-list-card:hover {
    border-color: var(--lit-blue);
    box-shadow: var(--lit-shadow-md);
    transform: translateX(4px);
}

.lit-region-list-card-body {
    flex: 1;
    min-width: 0;
}

.lit-region-list-name {
    font-family: var(--lit-font-heading);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--lit-charcoal);
}

.lit-region-list-card:hover .lit-region-list-name {
    color: var(--lit-blue);
}

.lit-region-list-summary {
    font-size: 14px;
    color: var(--lit-grey);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.lit-region-list-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--lit-grey);
}

.lit-region-list-arrow {
    font-size: 24px;
    color: var(--lit-grey-light);
    flex-shrink: 0;
    margin-left: 16px;
    transition: color 0.2s;
}

.lit-region-list-card:hover .lit-region-list-arrow {
    color: var(--lit-blue);
}

/* ---- Provinces Grid (Region page) ---- */
.lit-provinces-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.lit-province-card {
    display: flex;
    flex-direction: column;
    background: var(--lit-white);
    border: 1px solid var(--lit-stone);
    border-radius: var(--lit-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--lit-charcoal);
    transition: all 0.25s;
}

.lit-province-card:hover {
    border-color: var(--lit-blue);
    box-shadow: var(--lit-shadow-md);
    transform: translateY(-2px);
}

.lit-province-card-name {
    font-family: var(--lit-font-heading);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: var(--lit-charcoal);
}

.lit-province-card:hover .lit-province-card-name {
    color: var(--lit-blue);
}

.lit-province-card-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--lit-grey);
    flex: 1;
    margin-bottom: 12px;
}

.lit-province-card-arrow {
    font-size: 13px;
    font-weight: 600;
    color: var(--lit-blue);
}

/* ---- Towns Grid (shared by region + province) ---- */
.lit-location-towns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* ============================================
   Redesigned Town Card
   ============================================ */
.lit-location-towns-grid .lit-town-card {
    background: var(--lit-white);
    border-radius: var(--lit-radius);
    padding: 0;
    border: 1px solid var(--lit-stone);
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.lit-location-towns-grid .lit-town-card:hover {
    box-shadow: var(--lit-shadow-lg);
    transform: translateY(-4px);
}

/* Accent colours */
.lit-accent-green:hover  { border-color: #10B981; }
.lit-accent-amber:hover  { border-color: #F59E0B; }
.lit-accent-red:hover    { border-color: #EF4444; }
.lit-accent-neutral:hover { border-color: var(--lit-blue); }

/* Top accent bar */
.lit-tc-accent {
    height: 4px;
    width: 100%;
}

.lit-accent-green .lit-tc-accent  { background: linear-gradient(90deg, #10B981, #34D399); }
.lit-accent-amber .lit-tc-accent  { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.lit-accent-red .lit-tc-accent    { background: linear-gradient(90deg, #EF4444, #F87171); }
.lit-accent-neutral .lit-tc-accent { background: linear-gradient(90deg, var(--lit-blue), var(--lit-blue-light)); }

/* Card inner content */
.lit-tc-header {
    padding: 16px 16px 0;
}

.lit-tc-name-link {
    text-decoration: none;
    color: inherit;
}

.lit-tc-name {
    font-family: var(--lit-font-heading);
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--lit-charcoal);
    transition: color 0.2s;
}

.lit-tc-name-link:hover .lit-tc-name {
    color: var(--lit-blue);
}

.lit-tc-province {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--lit-grey);
    background: var(--lit-cream);
    padding: 2px 10px;
    border-radius: 10px;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Score badges row */
.lit-tc-scores {
    display: flex;
    gap: 8px;
    padding: 12px 16px 0;
}

.lit-tc-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.lit-tc-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
}

.lit-tc-score-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--lit-grey);
    margin-top: 3px;
}

/* Quick stats pills */
.lit-tc-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
}

.lit-tc-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--lit-charcoal);
    background: var(--lit-cream);
    padding: 4px 10px;
    border-radius: 16px;
    border: 1px solid var(--lit-stone);
}

/* Button */
.lit-location-towns-grid .lit-btn {
    margin: auto 16px 16px;
    width: calc(100% - 32px);
    border-radius: var(--lit-radius-sm);
}

/* ---- Empty State ---- */
.lit-location-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--lit-grey);
    font-size: 15px;
}

/* ---- CTA ---- */
.lit-location-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 32px 0 12px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .lit-region-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lit-pcard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lit-location-towns-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .lit-location-title {
        font-size: 32px;
    }

    .lit-location-overview {
        flex-direction: column;
    }

    .lit-location-overview-map {
        width: 100%;
    }

    .lit-region-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .lit-location-towns-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lit-location-stats-grid {
        gap: 12px;
    }

    .lit-location-stat-item {
        min-width: 80px;
    }

    .lit-location-stat-value {
        font-size: 18px;
    }

    .lit-region-list-stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lit-location-cta {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .lit-location-title {
        font-size: 26px;
    }

    .lit-region-cards-grid {
        grid-template-columns: 1fr;
    }

    .lit-pcard-grid {
        grid-template-columns: 1fr;
    }

    .lit-provinces-grid {
        grid-template-columns: 1fr;
    }

    .lit-location-towns-grid {
        grid-template-columns: 1fr;
    }

    .lit-region-list-card {
        padding: 16px;
    }

    .lit-region-list-summary {
        display: none;
    }
}
