/* ==========================================
   1. SECTION ARCHITECTURE
   ========================================== */
.locations-section {
    padding-top: clamp(80px, 10vw, 120px); 
    padding-bottom: clamp(80px, 10vw, 120px);
    background-color: var(--color-surface, #ffffff);
}

.locations-container {
    max-width: var(--container-width, 1440px);
    margin: 0 auto;
    padding: 0 var(--container-padding, 40px);
}

/* --- EDITORIAL HEADER --- */
.locations-header {
    margin-bottom: 40px; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

.locations-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #1a1a1a;
    margin: 0 0 10px 0;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}

.locations-subline {
    font-family: var(--font-sans);
    font-size: 10px;
    color: #666666;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
}

/* ==========================================
   2. THE GALLERY GRID
   ========================================== */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg, 30px); 
}

.location-card {
    position: relative;
    height: 650px; 
    display: block;
    overflow: hidden;
    text-decoration: none;
    background-color: #1a1a1a; /* Placeholder color */
    border-radius: 2px;
}

.location-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.location-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform; /* Hardware Acceleration */
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- GPU ACCELERATED GRADIENT --- */
.location-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 60%);
    transition: opacity 0.6s ease;
}

/* --- TEXT CONTENT --- */
.location-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    align-items: flex-start;   
    padding: var(--space-2xl, 40px);
}

.location-count {
    font-family: var(--font-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #ffffff !important; 
    opacity: 0.85;
    margin-bottom: 10px;
    font-weight: 700;
}

.location-name {
    font-family: var(--font-serif);
    font-size: var(--text-3xl, 2.5rem);
    font-weight: 400;
    margin: 0;
    line-height: 1.1;
    color: #ffffff !important; 
    text-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   3. CINEMATIC HOVER STATES
   ========================================== */
.location-card:hover .location-bg img {
    transform: scale(1.05);
}

.location-card:hover .location-gradient {
    opacity: 0.95; /* Animating opacity is 100x smoother than animating linear-gradient */
}

.location-card:hover .location-name {
    /* Using translate3d forces the GPU to handle the movement */
    transform: translate3d(10px, 0, 0); 
}

/* ==========================================
   4. FOOTER ACTION
   ========================================== */
.locations-footer {
    margin-top: 80px; 
    text-align: center; 
    width: 100%;
}

.browse-all-btn {
    display: inline-flex;
    padding: 20px 50px; 
    background-color: #000000;
    color: #ffffff !important; /* Force override */
    border: 1px solid #000000;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.browse-all-btn:hover {
    background-color: transparent;
    color: #000000 !important; 
}

/* ==========================================
   5. RESPONSIVE QUERIES
   ========================================== */
@media (max-width: 1024px) {
    .locations-grid { grid-template-columns: repeat(2, 1fr); }
    .location-card { height: 500px; }
    .location-content { padding: 30px; }
}

@media (max-width: 600px) {
    .locations-grid { grid-template-columns: 1fr; }
    .location-card { height: 450px; }
    .locations-footer { margin-top: 60px; }
    .browse-all-btn { width: 100%; justify-content: center; }
}