/* ================================================================
   1. YOUR ORIGINAL HERO SECTION
   ================================================================ */
.page-hero {
    height: 45vh;
    margin-top: 80px; /* Space for the fixed navbar */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('assets/ubicacion/ubicacion-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 4.5rem);
    color: #fff;
}

/* ================================================================
   2. MAP DASHBOARD (SIDE-BY-SIDE FIX)
   ================================================================ */

/* --- MAP DASHBOARD CORE --- */
.map-section {
    background-color: #0d0d0d;
    padding: 80px 8% 40px 8%;
}

.map-wrapper {
    display: flex !important;
    flex-direction: row !important;
    height: 750px;
    background: #000;
    border: 1px solid rgba(0, 154, 71, 0.3);
    border-radius: 4px;
    overflow: hidden;
}


.map-sidebar {
    width: 400px;
    height: 700px; /* Fixed container height */
    background: #050505;
    display: flex;
    flex-direction: column; /* Vital for the math to work */
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- 1. THE GRADIENT HEADER (FORCE ACTIVATED) --- */
.sidebar-header {
    background: linear-gradient(145deg, #009a47 0%, #002e15 100%) !important;
    padding: 45px 40px;
    border-bottom: 3px solid var(--volt-yellow);
    position: relative;
    z-index: 20;
}

.sidebar-header h3 {
    font-family: var(--font-heading);
    color: #ffffff !important;
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin: 0;
}


.sidebar-header p {
    color: var(--volt-yellow) !important; /* Force Volt Yellow */
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-top: 5px;
    text-transform: uppercase;
}



/* --- 2. THE HEAVY-DUTY GREEN SCROLLBAR (FORCE RE-WIRING) --- */

/* --- THE SCROLLABLE AREA (THE FIX) --- */
.sidebar-scroll-area {
    flex: 1; /* This automatically calculates the remaining space (e.g., 550px) */
    overflow-y: auto !important; /* Re-ignites your green scrollbar */
    background: #0a0a0a;
    display: block;
    /* REMOVED height: 100% to prevent overflow cutoff */
}

/* Chrome, Safari, and Edge (Webkit) */
.sidebar-scroll-area::-webkit-scrollbar {
    width: 20px !important; /* Extra wide */
    display: block !important;
}

.sidebar-scroll-area::-webkit-scrollbar-track {
    background: #050505 !important; /* Black industrial track */
}

.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background-color: #009a47 !important; /* THE GREEN */
    border-radius: 10px !important;
    /* This creates the 'floating' effect */
    border: 5px solid #050505 !important;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2);
}

.sidebar-scroll-area::-webkit-scrollbar-thumb:hover {
    background-color: var(--volt-yellow) !important; /* Turns yellow on hover */
}

/* --- 3. THE RADIAL GLOW HOVER (FIXED) --- */
.branch-item {
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 30px 40px;
    background-color: #0a0a0a;
    border-left: 8px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.branch-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at left, rgba(0, 154, 71, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.branch-item:hover::before,
.branch-item.active:hover::before {
    opacity: 1; /* Glow appears on hover */
}

.branch-item:hover {
    border-left-color: var(--volt-yellow) !important; /* Yellow line only on hover */
    padding-left: 50px;
}

.branch-item.active {
    background-color: rgba(0, 154, 71, 0.1) !important;
    border-left-color: transparent !important; /* No yellow line on active-static */
}
/* --- BRANCH ITEMS BASE --- */
.branch-item {
    padding: 30px 40px;
    background-color: #0a0a0a;
    border-left: 8px solid transparent; /* Hidden by default */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

/* THE ACTIVE STATE (Static) */
/* No yellow line here anymore, just the green wash background */
.branch-item.active {
    background-color: rgba(0, 154, 71, 0.15) !important;
    border-left-color: transparent !important;
}

/* THE HOVER STATE (The Power-Up) */
/* This works for BOTH regular and active items */
.branch-item:hover,
.branch-item.active:hover {
    background: rgba(0, 154, 71, 0.25);
    border-left-color: var(--volt-yellow) !important; /* Line only appears on hover */
    padding-left: 50px; /* Industrial push effect */
}

/* --- BRANCH ITEM TEXT HIERARCHY --- */

/* 1. THE SPECIALTY LABEL (Small & Technical) */
.branch-category {
    display: inline-block;
    color: #bdbdbd;
    font-family: var(--font-body); /* IBM Plex Sans */
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    /* Optional: subtle underline like a part number label */
    border-bottom: 1px solid rgba(0, 154, 71, 0.3);
    padding-bottom: 2px;
}

/* 2. THE COMMERCIAL NAME (High-End Title) */
.branch-item h4 {
    color: #ffffff;
    font-family: var(--font-heading); /* Forces Zilla Slab */
    font-size: 1.35rem; /* Slightly larger for the Name */
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: none; /* Let the Commercial Name read naturally */
    letter-spacing: 0.5px;
    line-height: 1.1;
}

/* This makes the ampersand look like a high-end design element */
.amp-style {
    font-family: var(--font-heading); /* Zilla Slab */
    font-style: normal !important;               /* Italic ampersands are classic & elegant */
    color: #ffffff;      /* Brand green to make it pop */
    font-size: 1.1em;                 /* Slightly larger to balance the 'S' characters */
    padding: 0 4px;                   /* Just enough air to breathe */
    vertical-align: middle;
}

/* 3. THE ADDRESS */
.short-address {
    color: #ffffff; /* Slightly muted so Name stands out */
    font-family: var(--font-body);
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 400;
}

/* 4. THE META (Schedule stays sharp) */
.schedule {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* --- THE CLEAN MAP LINK --- */
.branch-item .map-link {
    /* --- THE ADDITIONS --- */
    align-self: flex-start;  /* Forces the link to collapse to text width */
    width: fit-content;      /* Secondary protection for the width */

    /* --- YOUR EXISTING STYLES --- */
    display: inline-block;
    margin-top: 8px;
    color: var(--volt-yellow) !important;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.branch-item .map-link:hover {
    border-bottom: 1px solid var(--volt-yellow);
    padding-left: 5px; /* Keeps the industrial slide */
}
/* MAP VIEWPORT */
.map-viewport {
    flex: 1;
    height: 100%;
}

.map-viewport iframe {
    width: 100%;
    height: 100%;
    filter: invert(90%) hue-rotate(155deg) brightness(95%) contrast(110%) saturate(140%);
}

/*/* ================================================================
   3. FACILITY DIRECTORY (CENTERED 3 + 2 GRID)
   ================================================================ */

.branches-section {
    padding: 80px 8% 120px 8%;
    background-color: #000;
}

/* THE GRID SYSTEM */
.branches-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* This creates the 3 + 2 centered look */
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* THE CARD CONTAINER */
.location-card {
    width: calc(33.333% - 30px);
    min-width: 350px;
    background: linear-gradient(180deg, #002e15 0%, #050505 100%);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

/* THE HOVER POWER-UP */
.location-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 154, 71, 0.25);
    border-color: var(--volt-yellow); /* Glow turns yellow-green on hover */
}

/* 1. IMAGE BOX & CORNER ACCENT */
.card-img-box {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: 0.5s ease;
}

.location-card:hover .card-img-box img {
    opacity: 1;
    transform: scale(1.1);
}

.corner-accent {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 60px;
    height: 60px;
    border-top: 8px solid var(--primary-green);
    border-right: 8px solid var(--primary-green);
    pointer-events: none;
    z-index: 2;
}

/* 2. TEXT HIERARCHY */
.card-info {
    padding: 40px;
}

/* THE TECHNICAL CATEGORY (The "What") */
.card-category {
    display: block;
    color: var(--primary-green);
    font-family: var(--font-body); /* IBM Plex Sans */
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 10px;
}

/* THE COMMERCIAL NAME (The "Who") */
.card-info h3 {
    font-family: var(--font-heading); /* Zilla Slab */
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
}

/* THE BOLD AMPERSAND */
.amp-solid {
    color: #ffffff;
    font-style: normal; /* Force non-italic */
    font-weight: 800;
    margin: 0 4px;
}

/* 3. TECHNICAL DATA ITEMS */
.info-item {
    margin-bottom: 15px;
}

.info-item span {
    display: block;
    font-size: 0.65rem;
    color: var(--primary-green);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 0.95rem;
    color: #e0e0e0;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

/* 4. MAP LINK */
.map-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--volt-yellow) !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.map-link:hover {
    padding-left: 8px; /* Industrial slide effect */
    border-bottom-color: var(--volt-yellow);
}

/* ================================================================
   4. RESPONSIVE FIXES
   ================================================================ */
@media (max-width: 1200px) {
    .location-card { width: calc(50% - 20px); }
}

@media (max-width: 968px) {
    .map-section {
        display: none; /* Currentl, map is unavailable for mobile due to ease of use.*/
    }
    .map-wrapper {
        flex-direction: column; /* Stack on mobile only */
        height: auto;
    }
    .map-sidebar { width: 100%; height: 350px; }
    .map-viewport { height: 400px; }
    .location-card { width: 100%; min-width: unset; }
}
