* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-verde: #51CE70;
    --color-rojo: #a1344e;
    --color-azul: #192e49;
    --color-azul-oscuro: #0f1419;
    --color-fondo: #0a0a0a;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--color-fondo);
    color: #ffffff;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Mapa Central */
.map-container {
    flex: 1;
    position: relative;
    background-color: var(--color-azul-oscuro);
    display: flex;
    flex-direction: column;
}

.map-header {
    background: linear-gradient(135deg, var(--color-verde) 0%, #3ba858 100%);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-bottom: 3px solid var(--color-azul);
    box-shadow: 0 2px 10px rgba(81, 206, 112, 0.3);
}

.header-logo-link {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.header-logo-link:hover {
    transform: scale(1.05);
}

.header-logo-img {
    height: 99px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}

.header-title-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.header-title-link:hover {
    opacity: 0.85;
}

.map-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(220, 20, 60, 0.95);
    padding: 15px 30px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.header-logo img {
    height: 40px;
    display: block;
}

#map {
    width: 100%;
    flex: 1;
    background-color: #1a2332;
    border: none;
}

/* Panel Lateral Derecho */
.sidebar-right {
    width: 400px;
    background: linear-gradient(180deg, var(--color-rojo) 0%, #7a2839 100%);
    padding: 30px 20px;
    overflow-y: auto;
    border-left: 2px solid var(--color-azul);
}

.add-action-button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--color-verde) 0%, #3ba858 100%);
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1.5px;
    border-radius: 5px;
    border: 2px solid var(--color-azul);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.add-action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(81, 206, 112, 0.5);
    background: linear-gradient(135deg, #3ba858 0%, var(--color-verde) 100%);
}

.sidebar-right h3 {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.news-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateX(5px);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.news-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.news-description {
    font-size: 14px;
    font-weight: normal;
    line-height: 1.4;
    color: #d0d0d0;
    margin-top: 5px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-azul);
}

.news-item p:last-child {
    border-bottom: 2px solid var(--color-azul);
    padding-bottom: 15px;
}

.instagram-embed {
    margin: 20px 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--color-azul);
    padding-bottom: 15px;
}

.instagram-embed blockquote {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    background: transparent !important;
}

/* Scrollbar personalizado */
.sidebar-right::-webkit-scrollbar {
    width: 8px;
}

.sidebar-right::-webkit-scrollbar-track {
    background: var(--color-rojo);
}

.sidebar-right::-webkit-scrollbar-thumb {
    background: var(--color-azul);
    border-radius: 4px;
}

.sidebar-right::-webkit-scrollbar-thumb:hover {
    background: var(--color-verde);
}

/* Estilos para marcadores del mapa */
.leaflet-popup-content-wrapper {
    background-color: var(--color-rojo);
    color: #ffffff;
    border: 2px solid var(--color-azul);
}

.leaflet-popup-tip {
    background-color: var(--color-rojo);
}

.leaflet-popup-content {
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar-right {
        width: 320px;
    }
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }
    
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    /* Header del mapa en móvil */
    .map-header {
        padding: 10px;
        flex-direction: row;
        gap: 15px;
    }
    
    .header-logo-img {
        height: 76px;
    }
    
    .map-header h1 {
        font-size: 21px;
        letter-spacing: 1px;
        text-align: left;
    }
    
    /* Panel lateral en móvil */
    .sidebar-right {
        width: 100%;
        height: auto;
        max-height: none;
        overflow-y: visible;
        order: 2;
        border-left: none;
        border-top: 2px solid var(--color-azul);
    }
    
    .sidebar-right h3 {
        font-size: 20px;
    }
    
    /* Mapa en móvil */
    .map-container {
        height: 60vh;
        min-height: 350px;
        order: 1;
    }
    
    #map {
        min-height: 300px;
    }
    
    /* Noticias en móvil */
    .news-item img {
        height: 150px;
    }
    
    .news-item p {
        font-size: 14px;
    }
    
    /* Instagram embeds en móvil */
    .instagram-embed {
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    /* Header más compacto en pantallas pequeñas */
    .map-header {
        padding: 8px 5px;
        gap: 10px;
    }
    
    .header-logo-img {
        height: 64px;
    }
    
    .map-header h1 {
        font-size: 16px;
        text-align: left;
    }
    
    /* Panel lateral más compacto */
    .sidebar-right {
        padding: 20px 15px;
        overflow-y: visible;
    }
    
    .sidebar-right h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    /* Mapa más pequeño */
    .map-container {
        height: 55vh;
        min-height: 300px;
    }
    
    /* Noticias más compactas */
    .news-section {
        gap: 20px;
    }
    
    .news-item img {
        height: 120px;
    }
    
    .news-item p {
        font-size: 13px;
        line-height: 1.4;
    }
}