/*
 * Location Card Widget - Desktop Layout Fix
 * Left: Image (60%) | Right: Region List (40%)
 */


/* ============================================================
   GRID - FLEXBOX LAYOUT (Desktop Side-by-Side)
   ============================================================ */
.location-card-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
}

/* ============================================================
   LEFT COLUMN: Image (60%)
   ============================================================ */
.location-card-image-wrapper {
    flex: 0 0 60%;
    max-width: 60%;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

/* ============================================================
   RIGHT COLUMN: Region List (40%)
   ============================================================ */
.location-card-list-wrapper {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
}

/* ============================================================
   IMAGE CONTAINER
   ============================================================ */
.location-card-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    background: #1A1A2E;
}

/* ============================================================
   IMAGE BACKGROUND (animated)
   ============================================================ */
.location-card-image-bg {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    overflow: hidden;
    will-change: transform, opacity;
    z-index: 1;
}

/* ============================================================
   NEW IMAGE (for transition)
   ============================================================ */
.location-card-image-new {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    z-index: 2;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ============================================================
   MAP OVERLAY - TOP RIGHT
   ============================================================ */
.region-map-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.region-map-overlay img {
    width: 280px;
    height: 140px;
    opacity: 0.6;
    filter: brightness(1.5);
}

/* ============================================================
   BOTTOM OVERLAY - FIXED
   ============================================================ */
.location-bottom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 5;
    border-radius: 0 0 24px 24px;
}

/* ============================================================
   BOTTOM LEFT: BUTTON
   ============================================================ */
.location-bottom-left {
    display: flex;
    align-items: center;
}

.location-view-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #E17055;
    color: #FFFFFF;
    padding: 10px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(225, 112, 85, 0.3);
}

.location-view-button:hover {
    background-color: #D63031;
    color: #FFFFFF;
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(214, 48, 49, 0.4);
}

.location-view-button i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.location-view-button:hover i {
    transform: translateX(4px);
}

/* ============================================================
   BOTTOM RIGHT: STATISTICS
   ============================================================ */
.location-bottom-right {
    display: flex;
    align-items: flex-end;
}

.location-stats-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-end;
}

.location-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.location-stats-number {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
}

.location-stats-label {
    font-size: 12px;
    color: #B2BEC3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   REGION LIST
   ============================================================ */
.location-list-heading {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #B2BEC3;
    margin-bottom: 16px;
}

.location-list {
    display: flex;
    flex-direction: column;
}

.location-item {
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    outline: none;
}

.location-item:last-child {
    border-bottom: none;
}

.location-item .location-name {
    font-size: 18px;
    font-weight: 600;
    color: #6B6B8A;
    transition: all 0.3s ease;
}

.location-item:hover .location-name {
    color: #E17055;
}

.location-item.active .location-name {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
}

.location-item .location-description-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.location-item.active .location-description-wrapper {
    max-height: 200px;
    opacity: 1;
}

.location-description {
    font-size: 14px;
    color: #B2BEC3;
    line-height: 1.6;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   KEYBOARD FOCUS
   ============================================================ */
.location-item:focus-visible {
    outline: 2px solid #E17055;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media (max-width: 992px) {
    .location-card-grid {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 30px;
    }

    .location-card-image-wrapper {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .location-card-list-wrapper {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0;
    }

    .location-card-image-container {
        height: 350px;
    }

    .location-stats-wrapper {
        gap: 24px;
    }

    .location-stats-number {
        font-size: 24px;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 576px) {
    .location-card-widget {
        padding: 20px 12px;
    }

    .location-card-grid {
        gap: 20px;
    }

    .location-card-image-container {
        height: 280px;
        border-radius: 16px;
    }

    .location-bottom-overlay {
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .location-view-button {
        padding: 10px 20px;
        font-size: 13px;
        justify-content: center;
        width: 100%;
    }

    .location-stats-wrapper {
        gap: 20px;
        justify-content: center;
    }

    .location-stat {
        align-items: center;
    }

    .location-stats-number {
        font-size: 20px;
    }

    .location-stats-label {
        font-size: 10px;
    }

    .location-item .location-name {
        font-size: 16px;
    }

    .location-item.active .location-name {
        font-size: 18px;
    }
}

/* ============================================================
   ELEMENTOR EDITOR
   ============================================================ */
.elementor-editor-active .location-item .location-description-wrapper {
    max-height: 200px;
    opacity: 1;
}

.elementor-editor-active .location-card-image-bg {
    position: relative !important;
}