/* =============================================
   MAP SECTION
   ============================================= */
#mapas {
    padding: 100px 0;
}

.map-intro {
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.8;
}

.map-card {
    background: rgba(0, 0, 0, 0.75);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.05);
    width: 90%;
    margin: 0 auto;
    max-width: 1100px;
    transition: all 0.3s ease;
}

.map-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.map-toggle-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 24px;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-toggle-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.map-toggle-btn.active {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.3);
}

.map-container {
    width: 100%;
    height: 420px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

/* Map popup */
.ol-popup {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 12px 28px 12px 12px;
    color: var(--text-color);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    max-width: 200px;
}

.ol-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: var(--secondary-color) transparent transparent;
}

.popup-closer {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    font-size: 16px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.popup-closer:hover {
    color: #fff;
    transform: scale(1.2);
}

.popup-content {
    font-size: 12px;
    text-align: center;
}

.popup-content p {
    margin: 3px 0;
    color: var(--secondary-color);
    white-space: nowrap;
}

/* OL zoom controls */
.ol-zoom {
    background-color: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid var(--secondary-color) !important;
    border-radius: 6px !important;
}

.ol-zoom-in,
.ol-zoom-out {
    background-color: transparent !important;
    color: var(--secondary-color) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.ol-zoom-in:hover,
.ol-zoom-out:hover {
    background-color: var(--secondary-color) !important;
    color: var(--primary-color) !important;
}

/* =============================================
   LIGHTBOX / MODAL
   ============================================= */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

.lightbox-content {
    max-width: 850px;
    width: 100%;
    text-align: center;
}

.lightbox-content img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    margin-bottom: 1rem;
}

.lightbox-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.lightbox-nav button {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: var(--secondary-color);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 600;
    transition: all 0.3s;
}

.lightbox-nav button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================
   MAP RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .map-card {
        width: 95%;
        padding: 15px;
    }

    .map-container {
        height: 350px;
    }

    .map-controls {
        flex-direction: column;
        align-items: center;
    }

    .map-toggle-btn {
        width: 100%;
        max-width: 250px;
    }
}