/* ===== CONTENEDOR INTEGRADO AL MODO OSCURO EDITORIAL ===== */
.locations-section {
    background-color: #050505;
    background-image:
        radial-gradient(circle, rgba(180, 147, 90, 0.15) 1px, transparent 1px),
        linear-gradient(to right, #0d1c37df 20%, #273546db 100%),
        url('../img/image.jpg');
    background-size: 24px 24px, auto, cover;
    background-position: center, center, right;
    background-repeat: repeat, no-repeat, no-repeat;
    background-attachment: fixed;

    padding: 160px 0;
    font-family: 'Inter', sans-serif;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.locations-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    padding: 0 40px;
    box-sizing: border-box;
}

/* ===== CONTENEDOR GEOMÉTRICO 3D (TILT WRAPPER) ===== */
.locations-grid-wrapper {
    flex: 1.2;
    perspective: 2500px;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform;
}

/* GRID ISOMÉTRICO AVANZADO */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 580px;

    /* Configuración de inclinación inicial elegante */
    transform: rotateX(20deg) rotateY(-20deg) rotateZ(5deg);
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modificamos la perspectiva general al pasar el mouse por encima */
.locations-grid-wrapper:hover .locations-grid {
    transform: rotateX(12deg) rotateY(-14deg) rotateZ(6deg);
}

/* ELEMENTOS DEL MOSAICO (FLOTACIÓN INDEPENDIENTE) */
.grid-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);

    /* Sombra proyectada en profundidad (Soft Shadows) */
    box-shadow: -15px 20px 40px rgba(0, 0, 0, 0.5);

    transform-style: preserve-3d;
    transform: translateZ(0px);
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s ease,
        border-color 0.5s ease;
}

/* Escalonamiento de niveles 3D (Z-Axis Push diferencial) */
.item-cdmx {
    transform: translateZ(40px);
}

.item-cancun {
    transform: translateZ(15px) translateY(-10px);
}

.item-mty {
    transform: translateZ(25px) translateY(10px);
}

.item-ytn {
    transform: translateZ(50px) translateX(5px);
}

/* Hover dinámico por elemento */
.grid-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: -30px 40px 70px rgba(0, 0, 0, 0.7);
}

.grid-item.item-cdmx:hover {
    transform: translateZ(75px) scale(1.03);
}

.grid-item.item-cancun:hover {
    transform: translateZ(50px) translateY(-15px) scale(1.03);
}

.grid-item.item-mty:hover {
    transform: translateZ(60px) translateY(15px) scale(1.03);
}

.grid-item.item-ytn:hover {
    transform: translateZ(85px) translateX(10px) scale(1.03);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    scale: 1.02;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-item:hover img {
    transform: scale(1.08);
}

/* Capa líquida con texto sutil al hover */
.grid-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 17, 30, 0.85) 0%, rgba(11, 17, 30, 0) 60%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.grid-item:hover .grid-item-overlay {
    opacity: 1;
}

.grid-item-overlay span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-item:hover .grid-item-overlay span {
    transform: translateY(0);
}

/* ===== BLOQUE DE TEXTO EDITORIAL ===== */
.locations-content {
    flex: 0.9;
    max-width: 520px;
    opacity: 0;
    transform: translateY(50px);
    will-change: transform, opacity;
}

.locations-tag {
    font-size: 10px;
    font-weight: 700;
    color: #ff4d7a;
    background-color: rgba(208, 19, 65, 0.12);
    border: 1px solid rgba(208, 19, 65, 0.2);
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.locations-content h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 25px 0;
    color: #f8fafc;
}

.locations-content h2 span {
    font-weight: 400;
    color: #94a3b8;
    display: block;
    margin-top: 5px;
}

.line-accent {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #d01341, #ff4d7a);
    margin-bottom: 30px;
    border-radius: 2px;
}

.locations-lead {
    font-size: 16px;
    color: #ececec;
    line-height: 1.65;
    margin: 0 0 40px 0;
}

/* ESTRUCTURA BICOLUMNA DE LA LISTA */
.locations-list-wrapper {
    display: flex;
    gap: 50px;
}

.locations-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.locations-list li a {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: color 0.3s ease;
}

/* Línea minimalista inferior al pasar el mouse */
.locations-list li a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: #ff4d7a;
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.locations-list li a:hover {
    color: #ffffff;
}

.locations-list li a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Enlace especial destacado */
.locations-list li .list-link-special {
    color: #b4935a;
    font-weight: 600;
}

.locations-list li .list-link-special::after {
    background-color: #b4935a;
}

.locations-list li .list-link-special:hover {
    color: #dfba7d;
}

/* ANIMACIÓN INTERSECTION OBSERVER COHERENTE */
.locations-content.active {
    opacity: 1;
    transform: translateY(0);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== RESPONSIVO ADAPTATIVO ===== */
@media (max-width: 992px) {
    .locations-container {
        flex-direction: column;
        gap: 80px;
        padding: 0 30px;
    }

    .locations-grid-wrapper {
        width: 100%;
        max-width: 500px;
    }

    .locations-content {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .locations-section {
        padding: 100px 0;
    }

    .locations-grid {
        gap: 12px;
        transform: rotateX(15deg) rotateY(-18deg) rotateZ(8deg);
    }

    /* Suavizado de Z-index en móvil */
    .item-cdmx {
        transform: translateZ(20px);
    }

    .item-cancun {
        transform: translateZ(8px);
    }

    .item-mty {
        transform: translateZ(12px);
    }

    .item-ytn {
        transform: translateZ(25px);
    }

    .locations-list-wrapper {
        flex-direction: column;
        gap: 16px;
    }
}