/* Featured Events Section */
.eventos-destacados {
    padding: 1.5rem 0;
    position: relative;
    margin-bottom: 2rem;
}


/* Section Header */
.section-title {
    font-size: 1.75rem;
    color: #333;
    text-align: left;
    margin: 0 0 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    display: block; /* Cambiado de inline-block a block */
    transform: none; /* Eliminado el translateX(-50%) */    width: auto; /* Asegura que el ancho se ajuste al contenido */
}


/* Carousel Wrapper for proper arrow positioning */
.carousel-wrapper {
    position: relative;
    padding: 0 2.5rem;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0.25rem;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 16px;
    padding: 0.25rem 0;
}

/* Adapt layout classes are applied by JS */
.carousel-track.single-event { justify-content: center; }
.carousel-track.few-events { justify-content: center; }
.carousel-track.many-events { justify-content: flex-start; }
.carousel-track.no-scroll { justify-content: center; }

/* Enhanced Card Hover Effect for Front Page */
.evento {
    min-width: calc(25% - 12px);
    max-width: calc(25% - 12px);
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease; /* Changed from transform to all for smoother transitions */
    position: relative;
    flex-shrink: 0;
    margin: 0.25rem 0;
    display: flex;
    flex-direction: column;
    border-bottom: 3px solid transparent; /* Transparent border by default */
}


.single-event .evento {
    min-width: calc(50% - 8px);
    max-width: calc(50% - 8px);
}

.few-events .evento {
    min-width: calc(33.333% - 11px);
    max-width: calc(33.333% - 11px);
}

.no-scroll .evento {
    flex: 1;
    min-width: 0;
    max-width: calc(25% - 12px);
}

.evento:hover {
    transform: translateY(-3px);
    background-color: #fffbf0; /* Very light gold background on hover */
    box-shadow: 0 6px 16px rgba(225, 175, 26, 0.15); /* Gold-tinted shadow */
}

.evento-img-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.evento-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.evento:hover .evento-img {
    transform: scale(1.05);
}

.evento-info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.evento:hover .evento-info {
    background-color: #e1af1a; /* Gold background on hover */
}

.evento-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    line-height: 1.3;
    color: #333;
    transition: color 0.2s ease;
}

.evento-info h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.evento-info h3 a:hover {
    color: #e1af1a;
}

.evento:hover .evento-info h3 a {
    color: #000000; /* Black text on hover for better contrast */
    font-weight: 700; /* Make text slightly bolder on hover */
}

.evento-fecha,
.evento-lugar {
    margin: 0.2rem 0;
    font-size: 0.8rem;
    color: #666;
    transition: color 0.2s ease;
}

/* Add icons styling */
.evento-fecha i,
.evento-lugar i {
    color: #999; /* Default icon color */
    margin-right: 0.25rem;
    transition: color 0.2s ease;
}

/* Change icon colors on hover */
.evento:hover .evento-fecha i,
.evento:hover .evento-lugar i {
    color: #000000; /* Black icon color on hover for contrast */
}

/* Make date and location text black on hover */
.evento:hover .evento-fecha,
.evento:hover .evento-lugar {
    color: #000000; /* Black text for better contrast against gold */
}


/* Navigation Arrows */
.arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 40px;
    transform: none;
    background-color: rgba(0, 0, 0, 0.085);
    border: none;
    color: #e2e0e0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 5px;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.dark-mode .arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 40px;
    transform: none;
    background-color: rgba(0, 0, 0, 0.085);
    border: none;
    color: #e2e0e0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 5px;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}
.arrow.active {
    opacity: 1;
    pointer-events: auto;
}

.arrow:hover:not(:disabled) {
    background-color:rgba(0, 0, 0, 0.266) ;
}

.dark-mode .arrow:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.266);
}


.arrow:disabled {
    opacity: 0;
    cursor: default;
}

.arrow.left {
    left: 0;
}

.arrow.right {
    right: 0;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .evento {
        min-width: calc(33.333% - 11px);
        max-width: calc(33.333% - 11px);
    }
    
    .single-event .evento {
        min-width: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
    
    .no-scroll .evento {
        max-width: calc(33.333% - 11px);
    }
}

@media (max-width: 992px) {
    .eventos-destacados {
        padding: 1.5rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .evento {
        min-width: calc(33.333% - 11px);
        max-width: calc(33.333% - 11px);
    }
    
    .single-event .evento {
        min-width: calc(60% - 8px);
        max-width: calc(60% - 8px);
    }
    
    .no-scroll .evento {
        max-width: calc(33.333% - 11px);
    }
}

@media (max-width: 768px) {
    .eventos-destacados {
        padding: 1.25rem 0;
    }
    
    .section-title {
        font-size: 1.35rem;
        margin-bottom: 1.25rem;
    }
    
    .evento {
        min-width: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
    
    .carousel-track {
        gap: 12px;
    }
    
    .arrow {
        width: 32px;
        height: 32px;
    }
    
    .carousel-wrapper {
        padding: 0 1.75rem;
    }
    
    .single-event .evento,
    .few-events .evento {
        min-width: calc(80% - 6px);
        max-width: calc(80% - 6px);
    }
    
    .no-scroll .evento {
        max-width: calc(50% - 8px);
    }
}

@media (max-width: 576px) {
    .eventos-destacados {
        padding: 1rem 0;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .evento {
        min-width: 80%;
        max-width: 80%;
    }
    
    .carousel-track {
        gap: 10px;
    }
    
    .arrow {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .carousel-wrapper {
        padding: 0 1.5rem;
    }
    
    .evento-img-container {
        padding-bottom: 60%; /* Slightly taller ratio on mobile */
    }
    
    .evento-info {
        padding: 0.65rem;
    }
    
    .single-event .evento {
        min-width: 90%;
        max-width: 90%;
    }
    
    .no-scroll .evento {
        max-width: 80%;
    }
}

/* Estilos para la sección Eventos por Ciudad usando Flexbox */
.eventos-por-ciudad {
    padding: 40px 0;
    background-color: #f9f9f9;
}

.ciudad-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
}

.ciudad-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ciudad-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #222;
    display: flex;
    align-items: center;
}

.ciudad-title i {
    color: #e1af1a;
    margin-right: 10px;
}

.event-count {
    font-size: 16px;
    color: #666;
    margin-left: 10px;
    font-weight: normal;
}

/* Flexbox en lugar de Grid */
.eventos-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -8px; /* Compensar el padding de los elementos internos */
    width: calc(100% + 16px); /* Compensar el margen negativo */
}

/* Eventos dentro de flex */
.eventos-grid .evento {
    flex: 0 0 calc(25% - 16px);
    margin: 8px;
    min-width: initial;
    max-width: initial;
}

/* Adaptación responsive */
@media (max-width: 1200px) {
    .eventos-grid .evento {
        flex: 0 0 calc(33.333% - 16px);
    }
}

@media (max-width: 992px) {
    .eventos-grid .evento {
        flex: 0 0 calc(50% - 16px);
    }
    
    .event-count {
        display: block;
        margin-left: 28px; /* Alinear con el texto después del icono */
        margin-top: 5px;
    }
}

@media (max-width: 576px) {
    .eventos-grid .evento {
        flex: 0 0 calc(100% - 16px);
    }
    
    .ciudad-title {
        font-size: 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-count {
        margin-left: 28px;
        margin-top: 5px;
    }
}

/* Modo oscuro */
body.dark-mode .eventos-por-ciudad {
    background-color: #121212;
}

body.dark-mode .ciudad-section {
    border-color: #333;
}

body.dark-mode .ciudad-title {
    color: #fff;
}

body.dark-mode .event-count {
    color: #aaa;
}

/* Adaptación específica para elementos dentro del flex */
.eventos-grid .evento .evento-img-container {
    padding-bottom: 100%; /* Mantener la misma relación de aspecto 16:9 */
}

.eventos-grid .evento .evento-info {
    padding: 0.75rem;
}

/* Estilos para la sección Eventos por Tipo usando Flexbox */
.eventos-por-tipo {
    padding: 1px 0;
}

.tipo-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
}

.tipo-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tipo-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #222;
    display: flex;
    align-items: center;
}

.tipo-title i {
    color: #e1af1a;
    margin-right: 10px;
}

/* Mantenemos la misma estructura Flexbox que en ciudad */
.eventos-por-tipo .eventos-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -8px; /* Compensar el padding de los elementos internos */
    width: calc(100% + 16px); /* Compensar el margen negativo */
}

.eventos-por-tipo .evento {
    flex: 0 0 calc(25% - 16px);
    margin: 8px;
    min-width: initial;
    max-width: initial;
}

/* Adaptación responsive */
@media (max-width: 1200px) {
    .eventos-por-tipo .evento {
        flex: 0 0 calc(33.333% - 16px);
    }
}

@media (max-width: 992px) {
    .eventos-por-tipo .evento {
        flex: 0 0 calc(50% - 16px);
    }
}

@media (max-width: 576px) {
    .eventos-por-tipo .evento {
        flex: 0 0 calc(100% - 16px);
    }
    
    .tipo-title {
        font-size: 20px;
    }
}

/* Modo oscuro */
body.dark-mode .eventos-por-tipo {
    background-color: #121212
}

body.dark-mode .tipo-section {
    border-color: #333;
}

body.dark-mode .tipo-title {
    color: #fff;
}

/* Estilo para el encabezado de sección con enlace "Ver más" */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    margin: 0;
    padding-bottom: 0.5rem;
}

.ver-mas-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease; 
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 10px; 
    z-index: 2; 
    overflow: visible; 
    background-color:#e1af1a ;
    border-radius: 5px;
}

.ver-mas-link i {
    margin-left: 6px;
    transition: transform 0.2s ease;
    position: relative; 
    z-index: 3; 
}

.ver-mas-link:hover {
    color: #ffffff;
}

.ver-mas-link:hover i {
    transform: translateX(2px);
}

.tipo-title, .ciudad-title {
    margin: 0;
}


@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ver-mas-link {
        margin-top: 8px;
    }
}

/* Soporte para modo oscuro */
body.dark-mode .ver-mas-link {
    color: #ffffff;
}

body.dark-mode .ver-mas-link:hover {
    color: #ffffff;
}