@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 12px;
}

body, html {
    height: 100%;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 12px;
    background: #ffffff;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Panel lateral izquierdo */
.sidebar {
    width: 380px;
    background: #f8f9fa;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1000;
}

.main-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a365d;
    line-height: 1.2;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.filter-section {
    margin-bottom: 40px;
}

.filter-title {
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.filter-group {
    flex: 1;
}

.filter-group-full {
    flex: 1;
    display: flex;
}

.clear-filters-btn {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: #0079C8;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /*box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);*/
}

.clear-filters-btn:hover {
    background: #0079C8;
    transform: translateY(-1px);
    /*box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);*/
}

.clear-filters-btn:active {
    transform: translateY(0);
}

/* Botón aplicar filtros (solo móvil) */
.apply-filters-btn {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: #0079C8;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /*box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);*/
    margin-bottom: 12px;
}

.apply-filters-btn:hover {
    background: #0079C8;
    transform: translateY(-1px);
}

.apply-filters-btn:active {
    transform: translateY(0);
}

/* Clase para mostrar solo en móvil */
.mobile-only {
    display: none;
}

/* Contador de resultados */
.results-counter {
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1) 0%, rgba(49, 130, 206, 0.1) 100%);
    border: 1px solid rgba(66, 153, 225, 0.2);
    text-align: center;
}

.results-counter span {
    font-size: 13px;
    font-weight: 600;
    color: #2b6cb0;
}

.select-wrapper {
    position: relative;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #2d3748;
    background: white;
    border: 1px solid #e2e8f0;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-select:disabled {
    background: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.form-select option:disabled {
    color: #a0aec0;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #a0aec0;
    pointer-events: none;
}

.projects-section {
    flex: 1;
}

.projects-title {
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.project-types {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-type {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-type:hover {
    background: rgba(255, 255, 255, 0.8);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

/* Indicadores circulares del menú */
.project-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    position: relative;
    transition: all 0.2s ease;
    background: currentColor;
    /* Por defecto atenuado (inactivo) */
    opacity: 0.5;
}

/* Cuando está ACTIVO - color normal */
.project-indicator.active {
    opacity: 1;
}

/* Texto del proyecto */
.project-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.2s ease;
    /* Por defecto atenuado (inactivo) */
    opacity: 0.5;
}

/* Cuando el proyecto está ACTIVO - texto normal */
.project-type:has(.project-indicator.active) .project-label {
    opacity: 1;
}

.project-type:has(.project-indicator:not(.active)) .project-label {
    opacity: 0.5;
}

/* Colores específicos por tipo */
.project-type.urbanos {
    color: #e53e3e;
}

.project-type.periurbanos {
    color: #0bc5ea;
}

.project-type.emblematicos {
    color: #c53030;
}

.project-type.internacionales {
    color: #38a169;
}

.project-indicator.urbanos {
    background-color: #e53e3e;
}

.project-indicator.periurbanos {
    background-color: #0bc5ea;
}

.project-indicator.emblematicos {
    background-color: #c53030;
}

.project-indicator.internacionales {
    background-color: #38a169;
}

/* Área del mapa */
.map-container {
    flex: 1;
    position: relative;
    background: #f7fafc;
}

#map {
    width: 100%;
    height: 100%;
}

/* ============================================ */
/* ESTILOS PARA TARJETAS DE ZOOM 15 */
/* ============================================ */

.marker-card {
    position: absolute;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 16px;
    width: 280px;
    z-index: 1000;
    border: 2px solid #e0e0e0;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.marker-card.visible {
    opacity: 1;
}

.marker-card::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: white;
}

.card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    margin-bottom: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-location {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.location-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    fill: currentColor;
}

.ver-button {
    background: #0079C8;
    color: white;
    border: none;
    padding: 10px 20px;
    /*border-radius: 6px;*/
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ver-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* ============================================ */

/* Marcadores circulares */
.marker {
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.marker:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.marker.urbanos { background-color: #e53e3e; }
.marker.periurbanos { background-color: #0bc5ea; }
.marker.emblematicos { background-color: #c53030; }
.marker.internacionales { background-color: #38a169; }

.marker-label {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 55, 72, 0.95);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: none;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

/* Panel de detalles (popup) con scroll */
.details-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: white;
    border-radius: 0 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    overflow: hidden;
    animation: popupAppear 0.3s ease;
    /* Estructura para header fijo */
    display: flex;
    flex-direction: column;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
    animation: overlayAppear 0.3s ease;
}

.popup-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Ajuste para header fijo */
    padding-top: 0;
}

/* Estilos para la scrollbar */
.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.popup-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    transition: background 0.2s ease;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-popup:hover {
    background: white;
    color: #2d3748;
}

/* ============================================ */
/* NUEVO DISEÑO DEL POPUP - ESPACIADO 24PX */
/* ============================================ */

/* Header del popup */
.new-popup-header {
    background: #0079C8;
    color: white;
    padding: 40px;
    margin-bottom: 20px;

    /* Fijo en la parte superior del popup */
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.popup-project-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.popup-location {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Colaboradores en fila horizontal */
.popup-collaborators {
    display: flex;
    gap: 16px;
    padding: 0 24px;
    margin-bottom: 24px;
}

.collaborator-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F3F5F8;
    padding: 10px;
    flex: 1;
    min-width: 0;
}

.collaborator-logo {
    height: 40px;
    width: auto;
    /*background: white;*/
    padding: 6px;
    flex-shrink: 0;
}

.collaborator-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Grid de estadísticas en fila horizontal */
.popup-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 0 24px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 24px;
    text-align: center;
    position: relative;
}

.stat-card.primary {
    background: #1e3a8a;
    color: white;
}

.stat-card.secondary {
    background: #1e3a8a;
    color: white;
}

.stat-card.tertiary {
    background: #3b82f6;
    color: white;
}

.stat-card.quaternary {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.stat-card .stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.stat-card .stat-main-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.8;
    line-height: 1.2;
}

/* ============================================ */
/* ESTILOS PARA SECCIÓN DE ODS */
/* ============================================ */

.ods-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 1px solid #c3dafe;
}

.ods-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    justify-content: flex-start;
}

.ods-icon {
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Tooltip para ODS */
.ods-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* ============================================ */

/* Secciones del popup */
.popup-section {
    padding: 24px;
    margin-bottom: 24px;
    background: #f8fafc;
}

.popup-section:last-child {
    margin-bottom: 0;
}

.popup-section.dark {
    background: #1e293b;
    color: white;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-section.dark .section-title {
    color: white;
}

.ods-section .section-title {
    color: #1e3a8a;
}

/* Contenido usa el texto base 12px */
.section-content {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

.popup-section.dark .section-content {
    color: #e2e8f0;
}

/* Barra de progreso */
.progress-container {
    margin-top: 12px;
}

.progress-info {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    transition: width 0.3s ease;
}

/* Botón VER PROYECTO */
.project-link-section {
    display: flex;
    justify-content: flex-end;
    padding: 24px;
    margin-bottom: 0;
    background: #f8fafc;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0079C8;
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-link-btn:hover {
    background: #006ab1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 121, 200, 0.3);
}

.project-link-btn:active {
    transform: translateY(0);
}

.project-link-arrow {
    font-size: 18px;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.project-link-btn:hover .project-link-arrow {
    transform: translateX(3px);
}

/* ============================================ */
/* GALERÍA DE IMÁGENES */
/* ============================================ */

.gallery-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #0079C8;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* ============================================ */
/* LIGHTBOX */
/* ============================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3001;
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

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

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    z-index: 3000;
    animation: slideInRight 0.3s ease;
}

.notification.success { background: #38a169; }
.notification.error { background: #e53e3e; }
.notification.info { background: #4299e1; }

/* Botón de filtros móvil */
.mobile-filters-btn {
    display: none;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mobile-filters-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.mobile-filters-btn.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.mobile-filters-btn.active:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.filter-icon {
    font-size: 16px;
}

/* Contenedor de filtros */
.filters-container {
    display: block;
}

/* Header móvil para filtros - oculto por defecto */
.mobile-filters-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.mobile-filters-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
    margin: 0;
}

.close-mobile-filters {
    background: none;
    border: none;
    font-size: 24px;
    color: #4a5568;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-mobile-filters:hover {
    background: #f7fafc;
    color: #2d3748;
}

/* ============================================ */
/* RESPONSIVE PARA GALERÍA Y TARJETAS */
/* ============================================ */

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        min-height: 120px;
        padding: 20px;
        flex-direction: column;
    }
    
    .main-title {
        font-size: 20px;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    /* Mostrar botón de filtros SOLO en móvil */
    .mobile-filters-btn {
        display: flex !important;
    }
    
    /* Mostrar botón aplicar solo en móvil */
    .mobile-only {
        display: block;
    }
    
    .filters-container.active .mobile-only {
        display: block;
    }
    
    /* Ocultar filtros por defecto en móvil y mostrarlos como overlay */
    .filters-container {
        display: none;
    }
    
    .filters-container.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 2000;
        padding: 20px;
        overflow-y: auto;
    }
    
    /* Mostrar header móvil cuando está activo */
    .filters-container.active .mobile-filters-header {
        display: flex;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .project-types {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .project-type {
        justify-content: flex-start;
        padding: 12px;
        background: rgba(255, 255, 255, 0.8);
        margin: 0;
        border: 1px solid #e2e8f0;
    }
    
    .map-container {
        flex: 1;
        height: calc(100vh - 160px);
    }
    
    /* Responsive para tarjetas de zoom 15 en móvil */
    .marker-card {
        width: 240px;
        padding: 12px;
    }
    
    .card-image {
        height: 100px;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .card-location {
        font-size: 12px;
    }
    
    .details-popup {
        width: 95%;
        max-height: 90vh;
        border-radius: 0 !important;
    }
    
    .popup-content {
        max-height: none;
    }
    
    /* Responsive popup - mantener espaciado 40px en header fijo */
    .new-popup-header {
        padding: 40px;

    }
    
    .popup-collaborators {
        flex-direction: column;
        gap: 12px;
        padding: 0 24px;
        margin-bottom: 24px;
    }
    
    .collaborator-card {
        flex: none;
    }
    
    .popup-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 24px;
        margin-bottom: 24px;
    }
    
    .stat-card {
        padding: 24px;
    }
    
    .stat-card .stat-number {
        font-size: 26px;
    }
    
    .stat-card .stat-label {
        font-size: 16px;
    }
    
    .popup-project-name {
        font-size: 20px;
    }
    
    .popup-section {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .popup-section:last-child {
        margin-bottom: 0;
    }
    
    /* ODS responsivo en móvil */
    .ods-container {
        justify-content: center;
        gap: 5px;
    }
    
    .ods-icon {
        width: 48px;
        height: 48px;
    }

    /* Botón VER PROYECTO en móvil */
    .project-link-section {
        justify-content: center;
        padding: 24px;
    }
    
    .project-link-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        font-size: 16px;
    }

    /* Galería responsive en móvil */
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .gallery-item {
        aspect-ratio: 1;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .sidebar {
        padding: 15px;
    }
    
    .main-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .mobile-filters-btn {
        padding: 14px;
        font-size: 13px;
    }
    
    .map-container {
        height: calc(100vh - 140px);
    }
    
    /* Tarjetas aún más pequeñas en pantallas muy pequeñas */
    .marker-card {
        width: 200px;
        padding: 10px;
    }
    
    .popup-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 24px;
        margin-bottom: 24px;
    }
    
    .stat-card .stat-number {
        font-size: 24px;
    }
    
    .stat-card .stat-label {
        font-size: 14px;
    }
    
    /* ODS aún más pequeños en pantallas muy pequeñas */
    .ods-icon {
        width: 40px;
        height: 40px;
    }

    /* Botón VER PROYECTO en pantallas muy pequeñas */
    .project-link-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    /* Galería aún más compacta */
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .lightbox-close {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* Animaciones */
@keyframes popupAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estados de carga */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #718096;
    font-size: 16px;
    flex-direction: column;
}

.loading::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #4299e1;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}