/* =========================================
   ESTILOS PARA LA GALERÍA DE PROYECTOS
   ========================================= */

/* 1. Contenedor de la Sección */
.gallery-section {
    padding: 40px 0 80px 0; /* Reducido de 80px a 40px para que suba */
    background-color: #f9f9f9; 
    min-height: 100vh;
}

/* 2. Encabezado de la Galería */
.gallery-header {
    text-align: left;
    margin-bottom: 35px; /* Reducido para acercar las fotos al título */
    padding: 0 15px;
}

/* ESTO FALTABA: Estilo para "PORTAFOLIO" */
.top-tag {
    color: #666; /* Gris oscuro para que se note */
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 5px;
}

/* Ajuste del título principal */
.gallery-header h2 {
    font-size: 2.8rem;
    color: #1a1a1a; /* Negro fuerte */
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
}

.gallery-header h2 .highlight {
    color: #e31e24; /* Rojo ROAN */
}

.title-line {
    width: 60px;
    height: 5px;
    background-color: #e31e24;
    margin-top: 12px;
}

/* 3. Grid de Proyectos */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 0 15px; /* Quitamos padding superior para que suba más */
}

/* 4. Tarjetas de Proyecto (Estáticas) */
.gallery-item-static {
    position: relative;
    height: 320px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background-color: #000;
}

.gallery-item-static img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
    opacity: 0.9;
}

.gallery-item-static:hover img {
    transform: scale(1.1);
    opacity: 0.75;
}

/* 5. Overlay (Capa de texto sobre imagen) */
.gallery-overlay-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 26, 53, 0.9) 0%, rgba(10, 26, 53, 0.3) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    pointer-events: none;
}

/* 6. Estilo de los Textos dentro de la tarjeta */
.overlay-text span {
    color: #e31e24;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 5px;
}

.overlay-text p {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

/* 7. Ajustes Responsivos */
@media (max-width: 768px) {
    .gallery-section {
        padding-top: 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-header h2 {
        font-size: 2.1rem;
    }
}
/* =========================================
   NUEVOS ESTILOS PARA EL MAPA INTERACTIVO
   ========================================= */

.map-section {
    padding: 60px 0 20px 0; /* Espaciado equilibrado */
    background-color: #f9f9f9;
}

#map-proyectos {
    width: 100%;
    height: 500px;
    border-radius: 20px; /* Bordes más redondeados para look moderno */
    box-shadow: 0 15px 40px rgba(0,0,0,0.12); /* Sombra más suave y profunda */
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

/* Estilos para la ventana de información (InfoWindow) de Google */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 12px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
}

.info-window-card {
    padding: 15px;
    max-width: 220px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

.info-window-card h3 {
    font-size: 1rem;
    color: #0a1a35;
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.info-window-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
}

.info-window-card p {
    font-size: 0.85rem;
    color: #e31e24;
    font-weight: 600;
    margin: 0;
}

/* Ajuste para que la galería no esté tan pegada al mapa */
.gallery-section {
    padding-top: 40px !important; 
}

/* Responsivo para el mapa */
@media (max-width: 768px) {
    #map-proyectos {
        height: 350px; /* Más pequeño en celulares */
    }
    
    .map-section {
        padding: 40px 0 10px 0;
    }
}
#map-proyectos {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    border: 1px solid #e0e0e0;
    z-index: 1; /* Importante para que no tape los dropdowns del menú */
}

/* Estilo para los popups de Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
}
.leaflet-popup-content {
    margin: 10px;
}
