/* ============ PORTADA Y VIDEO ============ */
#portada {
    position: relative;
    overflow: hidden;
    background-color: var(--dark-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.video-background {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    object-fit: cover;
    z-index: 0;
    
    /* CAMBIO AGRESIVO: */
    /* 1.1 o 1.2 aumenta la luz artificialmente si el video original es oscuro */
    filter: brightness(1.1) contrast(1.1); 
}

/* Overlay mínimo para que el video sea el protagonista */
.video-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    
    /* CAMBIO: Opacidad bajísima (0.15 y 0.1) */
    /* Es casi transparente, solo unifica un poco los tonos */
    background: linear-gradient(135deg, rgba(0, 30, 70, 0.15), rgba(0, 70, 50, 0.1));
    
    z-index: 1;
}

#portada .container { 
    position: relative; 
    z-index: 2; 
}

/* Título principal */
.display-title {
    font-size: 4rem;
    color: white;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    background: linear-gradient(90deg, #FFFFFF, var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tarjetas Informativas en Portada */
.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    height: 100%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.15);
    border-color: var(--primary-blue);
}

.info-card h5 { 
    color: var(--primary-blue); 
    font-weight: 700; 
    font-size: 1.1rem;
}

.info-card p { 
    color: var(--text-main); 
    font-weight: 600;
}

.info-card .small { 
    color: var(--text-muted); 
    font-weight: 400;
}

.info-card i { 
    color: var(--primary-green); 
    margin-bottom: 1rem;
}

/* ============ CAJA CUD ============ */
.cud-info-box {
    background: white;
    border-left: 4px solid var(--primary-blue);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--card-shadow);
    text-align: left !important;
}

.cud-info-box h4 { 
    color: var(--primary-blue); 
    font-weight: 700;
}

.cud-list li { 
    color: var(--text-main); 
    line-height: 1.6;
}

.cud-list li i { 
    color: var(--primary-green); 
}

.cud-list strong {
    color: var(--primary-blue);
}

/* ============ GRILLA DE ARTISTAS ============ */
#grilla { 
    background-color: white; 
    padding: 6rem 0;
}

.flyer-container {
    width: 100%;
    height: 480px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    background: white;
}

.flyer-img {
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    object-position: top center;
    transition: transform 0.5s ease;
}

.card-modern:hover .flyer-img { 
    transform: scale(1.05); 
}

/* Estilo para imágenes de artistas */
.image-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 102, 204, 0.15);
    transition: all 0.4s ease;
}

.image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.25);
}

/* Efecto para las nuevas imágenes de La Fiesta */
.image-wrapper:hover img {
    transform: scale(1.05);
}

.enlarged-image {
    display: block;
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 15px;
}

/* ============ LA FIESTA ============ */
#fiesta { 
    background-color: #f8fafc; 
    padding: 6rem 0;
}

.image-container img {
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.02);
}

/* Alerta estilo moderno */
.alert {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 168, 107, 0.05));
    border-left: 4px solid var(--primary-blue);
    border-radius: 8px;
    padding: 1.5rem;
}

.alert h5 {
    color: var(--primary-blue);
}

/* ============ SPONSORS INFINITO INTELIGENTE ============ */
#sponsors { 
    background-color: white; 
    padding: 6rem 0;
}

/* Contenedor principal */
.simple-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    width: 100%;
    /* Máscara para desvanecer bordes */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* La Pista */
.simple-carousel-track {
    display: flex !important;
    width: max-content;   /* Se adapta al ancho del contenido */
    gap: 5rem;            /* ESPACIO GRANDE: Separa los items para que no se vea repetitivo */
    
    /* Animación */
    animation: scrollSponsors 25s linear infinite; 
}

/* Pausa al pasar el mouse */
.simple-carousel-track:hover {
    animation-play-state: paused;
}

/* Los Items */
.simple-carousel-item {
    flex: 0 0 auto;
    width: 200px;
    display: block;
}

/* 1. Contenedor invisible pero alineado */
.simple-logo-card {
    height: 160px;
    width: 100%;
    display: flex;
    align-items: center;     /* Centra verticalmente */
    justify-content: center; /* Centra horizontalmente */
    background: transparent; 
    border: none;
    box-shadow: none;
    padding: 0;
}

/* 2. REGLA OBLIGATORIA PARA IMÁGENES (Soluciona lo de Flamingo gigante) */
.simple-logo-card img {
    max-width: 150px !important;
    max-height: 90px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    filter: none !important;    /* ESTO lo deja a color */
    opacity: 1 !important;      /* ESTO quita la transparencia */
    transition: all 0.3s ease;
}

/* Efecto hover en imágenes */
.simple-logo-card img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 3. Estilo para los textos de relleno */
.sponsor-text {
    color: #ccc !important;
    font-weight: 700;
    text-align: center;
    font-size: 1.2rem;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ANIMACIÓN RESPONSIVA (Porcentajes) */
@keyframes scrollSponsors {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Se mueve exactamente la mitad del ancho total */
        /* El cálculo incluye el 50% del ancho + la mitad del gap para que el loop sea invisible */
        transform: translateX(calc(-50% - 2.5rem)); 
    }
}

/* Ajuste para móviles (menos espacio entre tarjetas pero suficiente para logos) */
@media (max-width: 768px) {
    
    /* 1. Damos más espacio entre logos (Antes era 2rem, ahora 4rem) */
    .simple-carousel-track {
        gap: 4rem; 
    }

    /* 2. Ajustamos la animación matemática para que el bucle sea perfecto */
    /* IMPORTANTE: El valor restado (-2rem) debe ser la mitad del gap (4rem) */
    @keyframes scrollSponsors {
        100% { transform: translateX(calc(-50% - 2rem)); }
    }

    /* 3. Achicamos un poco los logos en celular para que no se vean gigantes */
    .simple-logo-card img {
        max-width: 110px !important; /* En escritorio es 150px */
        max-height: 70px !important; /* En escritorio es 90px */
    }
    
    /* 4. Achicamos también los textos de los placeholders */
    .sponsor-text {
        font-size: 1rem;
    }
}

/* ============ MAPA ============ */
#mapa { 
    background: white;
    padding: 6rem 0;
}

.transport-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-green);
    box-shadow: var(--card-shadow);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.transport-card:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 35px rgba(0, 168, 107, 0.15);
}

.transport-icon-wrapper {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.2rem;
}

.recommendation-box {
    background: rgba(0, 102, 204, 0.05);
    border: 1px solid rgba(0, 102, 204, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.map-container-styled iframe {
    filter: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* Estilos para textos en secciones */
.lead {
    color: var(--text-muted) !important;
    font-weight: 400;
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .display-title {
        font-size: 3rem;
    }
    
    .simple-carousel-item {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .display-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .simple-carousel-item {
        width: 150px;
    }
    
    #portada {
        padding-top: 100px;
    }
}

/* Ajustes para el acordeón de info */
.accordion-button:not(.collapsed) {
    color: var(--primary-green) !important;
    background-color: rgba(3, 166, 150, 0.05);
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,0.1);
}
.accordion-button::after {
    background-size: 0.8rem;
}

/* ============ DISEÑO SECCION LA FIESTA ============ */

/* Divisor decorativo */
.divider-custom {
    width: 80px;
    height: 4px;
    background: var(--accent-orange);
    border-radius: 2px;
}

/* Tarjetas Generales */
.card-custom {
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}
.border-start-accent {
    border-left: 5px solid var(--primary-blue);
}

/* Icon Circle (Medio Ambiente) */
.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* --- Grilla de Instituciones con Iconos --- */
.institution-grid-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Adaptable */
    gap: 1rem;
}

.inst-card-icon {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column; /* Icono arriba, texto abajo */
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.inst-card-icon i {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.inst-card-icon span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.inst-card-icon:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: var(--primary-blue);
    transform: translateY(-3px);
}
.inst-card-icon:hover i {
    transform: scale(1.1);
    opacity: 1;
}

/* --- Patio Gastronómico Alineado --- */
.border-end-md-white {
    /* Línea separadora blanca solo en desktop */
    border-right: 1px solid rgba(255,255,255,0.2);
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}

.food-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.food-item:hover {
    background: white;
    color: var(--primary-blue);
    transform: scale(1.05);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .section-title { font-size: 2.5rem !important; }
    .border-end-md-white { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
    .institution-grid-icons { grid-template-columns: repeat(2, 1fr); }
    .food-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ AJUSTES PATIO GASTRONÓMICO FINAL ============ */

/* Separadores verticales blancos en desktop */
@media (min-width: 992px) {
    .border-end-lg-white {
        border-right: 1px solid rgba(255,255,255,0.2);
    }
    .border-start-lg-white {
        border-left: 1px solid rgba(255,255,255,0.2);
    }
}

/* Grilla de Tarjetas de Comida (Ajustada para 3 columnas) */
.food-card-grid {
    display: grid;
    /* Forzamos 3 columnas en desktop para que quede compacto */
    grid-template-columns: repeat(3, 1fr); 
    gap: 0.8rem;
}

/* Diseño de la Tarjeta Individual (Glass Effect) */
.food-card {
    background: rgba(255, 255, 255, 0.08); /* Un poco más transparente */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    height: 100%;
    min-height: 90px;
}

/* Tarjeta especial Sin TACC */
.food-card.highlight-green {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}
.food-card.highlight-green span {
    color: #a7f3d0; /* Verde claro texto */
}

/* Efecto Hover: Se eleva y se ilumina */
.food-card:hover {
    background: white;
    color: var(--primary-blue-dark);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    border-color: white;
}

/* TRUCO VISUAL: Empanada Invertida (Arco hacia arriba) */
.empanada-icon-inverted {
    /* 135deg hace que la luna mire hacia abajo como un arco */
    transform: rotate(135deg); 
}

/* Ajustes Responsive para la nueva estructura */
@media (max-width: 992px) {
    /* En tablet/móvil, quitamos bordes verticales y añadimos horizontales */
    .border-end-lg-white, .border-start-lg-white { 
        border: none;
    }
    .border-end-lg-white {
        border-bottom: 1px solid rgba(255,255,255,0.2);
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }
    /* La grilla de comida vuelve a ser flexible en móvil */
    .food-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        margin-bottom: 2rem;
    }
}

