/* ============================================
   Regions Overview Page — Styles
   Matching the image-card layout grouped by geo region
   ============================================ */

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

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

.lit-regions-page-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Body ---- */
.lit-regions-page-body {
    padding: 36px 0 0;
}

/* ---- Geographic Region Group ---- */
.lit-geo-group {
    margin-bottom: 40px;
}

.lit-geo-group:last-child {
    margin-bottom: 0;
}

.lit-geo-group-title {
    font-family: var(--lit-font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--lit-charcoal);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lit-geo-group-icon {
    font-size: 20px;
}

/* ---- Region Cards Grid ---- */
.lit-region-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* ---- Individual Region Card ---- */
.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;
}

/* Geo icon badge (top-left of card image) */
.lit-rcard-geo-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    font-size: 14px;
    z-index: 2;
}

/* Region name */
.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;
}

/* Stats row */
.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 (crest/coat of arms style) ---- */
.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;
}

/* Hide overlay — not needed for crest style */
.lit-pcard-overlay {
    display: none;
}

/* Crest image — contained, not cropped */
.lit-pcard-img img,
.lit-pcard-crest {
    max-height: 110px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Placeholder when no image */
.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);
}

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

@media (max-width: 768px) {
    .lit-regions-page-title {
        font-size: 28px;
    }

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

    .lit-rcard-img {
        height: 160px;
    }

    .lit-pcard-img {
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .lit-region-cards-grid,
    .lit-pcard-grid {
        grid-template-columns: 1fr;
    }

    .lit-rcard-img {
        height: 180px;
    }

    .lit-geo-group-title {
        font-size: 18px;
    }
}
