/* Estilos para el calendario */
.calendar-section {
    padding: 60px 0;
}

/* Alinear estilos de cabecera con cupones y recomendaciones */
.title-large {
	font-size: 36px;
	margin-bottom: 15px;
	color: #333;
}

.text-center {
	text-align: center;
}

/* Centrar el párrafo introductorio como en cupones/recomendaciones */
.intro-centered {
	text-align: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Separación y centrado del bloque de título */
.top-content {
	text-align: center;
	margin-bottom: 20px;
	justify-content: center;
	display: flex;
}

.intro-content {
	margin-bottom: 20px;
}

/* Nueva estructura con filtros */
.calendar-section:root, :root {
    --calendar-controls-height: 56px;
    --calendar-controls-gap: 20px; /* Debe coincidir con margin-bottom de .calendar-controls */
}
.calendar-main-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.calendar-filters {
    flex: 0 0 250px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-top: calc(var(--calendar-controls-height) + var(--calendar-controls-gap)); /* Alinear con inicio del #calendar */
}

.calendar-filters h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
}

/* Buscador de categorías */
.category-search-container {
    position: relative;
    margin-bottom: 15px;
}

.category-search-input {
    width: 100%;
    padding: 8px 12px;
    padding-right: 30px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-search-input:focus {
    outline: none;
    border-color: #DE826B;
    box-shadow: 0 0 0 2px rgba(222, 130, 107, 0.2);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

.category-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

.category-filter-list::-webkit-scrollbar {
    width: 6px;
}

.category-filter-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.category-filter-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.category-filter-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.category-filter-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.category-filter-item:hover {
    background-color: #f8f8f8;
}

.category-filter-item.active {
    background-color: #f5f5f5;
    font-weight: 600;
    border-left-color: #DE826B;
}

.category-filter-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

.category-filter-name {
    font-size: 15px;
    color: #333;
    transition: color 0.2s;
}

.category-filter-item.active .category-filter-name {
    color: #000;
}

.calendar-content {
    flex: 1;
}

.calendar-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.calendar-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: var(--calendar-controls-height);
    margin-bottom: var(--calendar-controls-gap);
}

.view-selector {
    display: flex;
    gap: 10px;
}

.view-button {
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-button.active {
    background-color: #DE826B;
    color: white;
}

/* Estilos para eventos en el calendario - CORREGIDO Y SIMPLIFICADO */
.fc-event {
    border-radius: 4px;
    padding: 3px 6px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 2px;
    /* No definir colores de fondo o borde aquí para no sobrescribir */
}

.fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fc-event-time, .fc-event-title {
    color: #fff !important;
    font-weight: 500 !important;
}

/* Eliminar estilos redundantes o incorrectos */
.fc-event-wrapper {
    margin: 1px 0;
}

/* Estilos para los botones de navegación del calendario */
.fc .fc-button-primary {
    background-color: #DE826B !important;
    border-color: #DE826B !important;
    color: white !important;
    padding: 8px 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.fc .fc-button-primary:hover {
    background-color: #c76a55 !important;
    border-color: #c76a55 !important;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #c76a55 !important;
    border-color: #c76a55 !important;
}

/* Estilos para el título del mes y año */
.fc .fc-toolbar-title {
    color: #DE826B !important;
    font-weight: 600;
    font-size: 1.5em !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* Centrar los elementos del toolbar */
.fc .fc-toolbar.fc-header-toolbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    padding-bottom: 10px;
}

.fc-header-toolbar .fc-toolbar-chunk:first-child {
    width: 25%;
}

.fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
    width: 50%;
    position: relative;
    text-align: center;
}

.fc-header-toolbar .fc-toolbar-chunk:last-child {
    width: 25%;
    text-align: right;
}

/* Estilos para el modal */
.event-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.event-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #DE826B;
}

.event-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.event-header h2 {
    color: #DE826B;
    margin-bottom: 10px;
}

.event-date-time {
    color: #666;
    font-style: italic;
}

.event-body {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.event-image-container {
    flex: 1;
    min-width: 300px;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.event-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.event-details {
    flex: 1;
    min-width: 300px;
}

.event-location {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    color: #666;
}

.location-emoji {
    font-size: 18px;
    margin-right: 10px;
    margin-top: 2px;
}

.event-detail-text {
    line-height: 1.5;
    flex: 1;
}

.event-detail-text a, 
.event-description a {
    color: #DE826B;
    text-decoration: underline;
    word-break: break-word;
}

.event-detail-text a:hover,
.event-description a:hover {
    color: #c76a55;
}

.event-description {
    line-height: 1.6;
    white-space: pre-line;
}

.event-description a {
    color: #DE826B;
    text-decoration: underline;
    word-break: break-word;
}

.event-description a:hover {
    color: #c76a55;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 3px;
}

.category-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: white;
    margin-right: 5px;
}

.event-categories {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

/* Estilos para los eventos en el calendario */
.fc-event-wrapper {
    margin: 1px 0;
    border: none !important;
    background: none !important;
}

.fc-event {
    border: none !important;
    background: none !important;
}

.fc-event-title {
    font-weight: bold !important;
    line-height: 1.3 !important;
}

.fc-event-time {
    font-weight: bold !important;
    opacity: 0.9;
    margin-bottom: 2px;
}

/* Mejorar visualización en móviles para vista de lista */
.fc-list-event {
    padding: 8px !important;
}

.fc-list-event-title {
    font-weight: bold !important;
}

.fc-list-event-time {
    font-weight: normal !important;
    min-width: 100px;
}

.fc-list-table td {
    padding: 10px !important;
}

/* Mejorar visibilidad de días y etiquetas */
.fc th {
    padding: 10px 0 !important;
    text-transform: capitalize !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.fc-day-today {
    background-color: rgba(222, 130, 107, 0.1) !important;
}

.fc-daygrid-day-number {
    font-weight: 500 !important;
    padding: 8px !important;
    color: #333 !important;
}

/* Mejoras para estilo tipo iOS */
.fc-day {
    cursor: pointer !important;
    transition: background-color 0.2s ease;
}

.fc-day:hover {
    background-color: rgba(222, 130, 107, 0.1) !important;
}

.fc-day-today {
    background-color: rgba(222, 130, 107, 0.15) !important;
    border-radius: 6px;
}

.fc .fc-daygrid-day-top {
    justify-content: center !important;
    padding-top: 5px !important;
}

.fc .fc-daygrid-day-number {
    text-align: center !important;
    width: 100% !important;
    padding: 8px 0 !important;
    font-weight: 500 !important;
}

/* Más espacio para eventos */
.fc-daygrid-event-harness {
    margin-bottom: 2px;
}

/* Mejorar estilo de los botones de navegación */
.fc .fc-button-primary {
    font-size: 14px !important;
    border-radius: 20px !important;
    padding: 6px 15px !important;
}

/* Mejorar estilo de eventos al estilo iOS */
.fc-event-wrapper {
    margin: 1px 0;
    border: none !important;
    background: none !important;
}

.fc-event-title {
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9em;
}

.fc-more-link {
    background-color: rgba(222, 130, 107, 0.1);
    border-radius: 10px;
    padding: 2px 4px !important;
    font-size: 0.85em !important;
    color: #DE826B !important;
    font-weight: 500 !important;
}

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

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

/* Para versión de escritorio - scroll en días con más de 2 eventos */
@media (min-width: 768px) {
    /* Configuración para que los eventos sean scrolleables en escritorio */
    .fc-daygrid-day-events {
        max-height: 80px !important; /* Altura para mostrar 2 eventos sin scroll */
        overflow-y: auto !important; /* Forzar scroll cuando excede max-height */
        overflow-x: hidden !important;
        padding-right: 2px;
        transition: max-height 0.2s;
        padding-top: 2px !important;
    }
    
    /* Estilizar la barra de scroll para escritorio */
    .fc-daygrid-day-events::-webkit-scrollbar {
        width: 4px;
    }
    
    .fc-daygrid-day-events::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .fc-daygrid-day-events::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 10px;
    }
    
    .fc-daygrid-day-events::-webkit-scrollbar-thumb:hover {
        background: #ccc;
    }
    
    /* Asegurar que las celdas de día tienen altura suficiente */
    .fc-daygrid-day-frame {
        min-height: 100px !important;
    }
    
    /* Evitar que 'más eventos' aparezca en escritorio, preferimos scroll */
    .fc-daygrid-more-link {
        display: none !important;
    }
    
    /* Hacer que cada evento tenga su color propio */
    .fc-daygrid-event {
        border-left-width: 3px !important;
        margin-bottom: 3px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
        /* Eliminar cualquier sobrescritura de color de fondo */
    }
    
    /* Asegurar que los títulos de eventos son visibles */
    .fc-event-time, .fc-event-title {
        color: #fff !important;
        padding: 1px 0;
    }
}

/* Para versión de escritorio - scroll en días con más de 3 eventos */
@media (min-width: 768px) {
    /* Configuración para que los eventos sean scrolleables en escritorio */
    .fc-daygrid-day-events {
        max-height: 120px !important; /* Altura para mostrar 3 eventos sin scroll */
        overflow-y: auto !important; /* Forzar scroll cuando excede max-height */
        overflow-x: hidden !important;
        padding-right: 2px;
        transition: max-height 0.2s;
        padding-top: 2px !important;
        position: relative !important; /* Asegurar posicionamiento correcto */
        z-index: 1 !important; /* Prevenir que eventos se escondan */
    }
    
    /* Ajustar espaciado y posición de eventos dentro del día */
    .fc-daygrid-event-harness {
        margin-top: 0 !important;
        margin-bottom: 2px !important;
    }
    
    /* Evitar que 'más eventos' aparezca en escritorio, preferimos scroll */
    .fc-daygrid-more-link {
        display: none !important;
    }
}

/* Asegurar que los eventos siempre sean visibles correctamente */
.fc-daygrid-day-events {
    position: relative !important;
    min-height: 0 !important; /* Permitir altura mínima automática */
}

/* Mejorar visualización del contenido del día */
.fc-daygrid-day-frame {
    display: flex !important;
    flex-direction: column !important;
}

.fc-daygrid-day-top {
    order: 1 !important;
}

.fc-daygrid-day-events {
    order: 2 !important;
}

.fc-daygrid-day-bottom {
    order: 3 !important;
}

/* Nuevos estilos para el modo de compatibilidad */
.simple-month { 
    margin-bottom: 20px; 
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.simple-month-title { 
    color: #DE826B;
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: capitalize;
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.simple-event {
    display: flex;
    padding: 10px;
    border-left: 3px solid #DE826B;
    margin-bottom: 8px;
    background-color: #fff;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.simple-event:hover {
    transform: translateX(3px);
}

.simple-event-date {
    font-weight: bold;
    margin-right: 10px;
    color: #DE826B;
    min-width: 50px;
}

.simple-event-title {
    flex: 1;
    color: #333;
}

/* Arreglo específico para Chrome y Firefox */
@media (max-width: 767px) and (-webkit-min-device-pixel-ratio:0), 
       (max-width: 767px) and (min--moz-device-pixel-ratio:0) {
    /* Elimina transiciones y efectos que puedan causar problemas */
    .fc-view-harness, .fc-scroller, .fc-view, .fc-scrollgrid {
        height: auto !important;
    }
    
    /* Forzar una altura mínima para el contenedor */
    .calendar-wrapper {
        min-height: 400px;
    }
}

/* Clase que se aplica mientras el calendario se carga */
.calendar-loading {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #666;
}

/* Estilos responsivos optimizados */
@media (max-width: 767px) {
    /* Estructura básica */
    .calendar-main-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-filters {
        flex: none;
        width: 100%;
        margin-bottom: 15px;
        margin-top: 0; /* Quitar el margen superior en móviles */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .category-filter-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
        max-height: none;
        padding-right: 0;
    }
    
    .category-filter-item {
        padding: 6px 10px;
        font-size: 13px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    
    .category-filter-item.active {
        border-bottom-color: #DE826B;
        background-color: rgba(222, 130, 107, 0.1);
    }
    
    .calendar-wrapper {
        padding: 10px;
        border-radius: 8px;
    }
    
    /* Estilo para el calendario simple */
    .simple-calendar {
        background: #fff;
        border-radius: 8px;
        padding: 15px 10px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    }
    
    .simple-month {
        margin-bottom: 25px;
        background: #fff;
        border-radius: 8px;
        padding: 0;
    }
    
    .simple-month-title {
        color: #DE826B;
        font-size: 18px;
        text-align: center;
        padding: 0 0 10px 0;
        margin-bottom: 12px;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .simple-events-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .simple-event {
        display: flex;
        padding: 12px 15px;
        border-left: 3px solid #DE826B;
        margin-bottom: 0;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        border-radius: 5px;
    }
    
    .simple-event-date {
        font-weight: 600;
        color: #666;
        margin-right: 12px;
        min-width: 50px;
    }
    
    .simple-event-title {
        font-weight: 500;
        color: #333;
    }
    
    /* Hacer que el modal sea más adaptable */
    .event-modal-content {
        width: 90%;
        max-width: 450px;
        padding: 20px;
        margin: 15% auto;
    }
    
    .event-header h2 {
        font-size: 18px;
    }
    
    .event-date-time {
        font-size: 14px;
    }
    
    /* Indicador de carga */
    .calendar-loader {
        text-align: center;
        padding: 30px 0;
        color: #666;
        font-style: italic;
    }
    
    .error-message {
        color: #e74c3c;
        text-align: center;
        padding: 20px;
        background-color: #fdf3f2;
        border-radius: 4px;
    }
    
    .no-events-message {
        text-align: center;
        color: #666;
        padding: 30px 0;
    }
}

/* Mejoras para la vista de FullCalendar en móvil */
@media (max-width: 767px) {
    .fc-header-toolbar {
        flex-direction: row !important;
        flex-wrap: wrap;
    }
    
    .fc .fc-toolbar-title {
        font-size: 16px !important;
        position: static;
        transform: none;
        text-align: center;
        margin: 5px 0;
        width: 100%;
        order: 1;
    }
    
    .fc-header-toolbar .fc-toolbar-chunk:first-child,
    .fc-header-toolbar .fc-toolbar-chunk:last-child {
        width: auto;
        flex: 1;
    }
    
    .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
        width: 100%;
        order: 3;
    }
    
    .fc .fc-button {
        padding: 4px 8px !important;
        font-size: 12px !important;
    }
    
    .fc-daygrid-day-top {
        justify-content: center !important;
    }
    
    .fc .fc-daygrid-day-number {
        font-size: 12px !important;
        padding: 2px !important;
    }
    
    .fc-event {
        font-size: 11px !important;
        /* Eliminar esta línea que estaba causando el problema */
        /* background-color: inherit !important; */
    }
    
    .fc-toolbar.fc-header-toolbar {
        margin-bottom: 10px !important;
    }
    
    .fc-daygrid-day-events {
        min-height: auto !important;
        max-height: none !important;
    }
}

/* Estilos adicionales para mejorar la apariencia de eventos */
.calendar-event {
    border-radius: 4px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Asegurar que los eventos sean más visibles */
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-event {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
}

/* Corregir espaciado en contenedor de eventos */
.fc .fc-daygrid-body-balanced .fc-daygrid-day-events {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

/* Asegurar que el color se respeta en todos los casos */
.fc-daygrid-event,
.fc-list-event {
    /* Los colores se aplicarán dinámicamente con JavaScript */
}

/* Estilos para la agrupación de eventos por día en móvil */
.simple-day {
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.simple-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.simple-day-date {
    font-weight: 600;
    color: #333;
    text-transform: capitalize;
}

.simple-day-content {
    padding: 12px 15px;
    text-align: center;
}

.events-count-btn {
    background-color: #DE826B;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(222, 130, 107, 0.3);
    transition: background-color 0.2s;
    width: 100%;
}

.events-count-btn:hover {
    background-color: #c76a55;
}

/* Modal para eventos del día */
.day-events-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.day-events-modal-content {
    position: relative;
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    width: 90%;
    max-width: 450px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s;
}

.day-events-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.day-events-title h3 {
    margin: 0;
    color: #DE826B;
    font-size: 18px;
    text-transform: capitalize;
}

.close-day-events-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-day-events-modal:hover {
    color: #DE826B;
}

.day-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.day-event-item {
    display: flex;
    padding: 12px 15px;
    border-left: 4px solid #DE826B;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.day-event-item:hover {
    transform: translateX(3px);
    background-color: #f5f5f5;
}

.day-event-time {
    font-weight: 600;
    color: #666;
    margin-right: 12px;
    min-width: 60px;
}

.day-event-content {
    flex: 1;
}

.day-event-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.day-event-location {
    font-size: 13px;
    color: #666;
}

@media (max-width: 767px) {
    /* Estilos para la nueva estructura de eventos en móvil */
    .simple-event {
        margin-bottom: 0;
        box-shadow: none;
        border-radius: 0;
    }
}

/* Estilos para contador de eventos en vista móvil */
.mobile-event-count {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    padding: 2px 4px;
    background-color: rgba(222, 130, 107, 0.7);
    color: white;
    border-radius: 3px;
    margin: 0 4px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ajustes específicos para versión móvil del calendario */
@media (max-width: 767px) {
    .fc .fc-daygrid-day {
        position: relative; /* Para posicionar absolutamente el contador */
        cursor: pointer;
    }
    
    .fc .fc-daygrid-day-frame {
        padding-bottom: 20px !important; /* Espacio para el contador */
    }
    
    /* Hacer que los días con eventos sean más visibles */
    .fc .fc-daygrid-day.fc-day-today {
        background-color: rgba(222, 130, 107, 0.25) !important;
    }
    
    /* Eliminar estilos para la vista simple que ya no usamos */
    .simple-calendar, .simple-month, .simple-event {
        display: none;
    }
}

/* Mejoras para el modal de eventos por día */
.day-events-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.day-events-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5vh auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.day-events-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.day-events-title h3 {
    margin: 0;
    color: #DE826B;
    font-size: 18px;
    text-transform: capitalize;
}

.close-day-events-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-day-events-modal:hover {
    color: #DE826B;
}

.day-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

/* Estilos para tarjetas de eventos en el modal de día */
.day-event-card {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.day-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.event-card-header {
    padding: 15px 18px;
    color: #fff;
}

.event-card-time {
    font-weight: 600;
    font-size: 14px;
    opacity: 0.9;
}

.event-card-title {
    font-weight: 700;
    font-size: 18px;
    margin-top: 5px;
    line-height: 1.3;
}

/* Estilo para la imagen de la tarjeta */
.event-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #eee;
}

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

.day-event-card:hover .event-card-image img {
    transform: scale(1.05);
}

.event-card-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card-location {
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
}

.event-card-location i {
    margin-right: 8px;
    color: #DE826B;
}

.event-card-categories {
    margin-top: 5px;
    margin-bottom: 5px;
}

.event-card-description {
    font-size: 15px;
    color: #444;
    line-height: 1.5;
    white-space: pre-line;
}

/* Ajustes para scroll en el modal */
.day-events-modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.day-events-list {
    overflow-y: auto;
    padding-right: 5px;
    flex: 1;
}

.day-events-list::-webkit-scrollbar {
    width: 6px;
}

.day-events-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.day-events-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.day-events-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Estilo responsive para todos los modales */
@media (max-width: 767px) {
    .day-events-modal-content,
    .event-modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        max-width: none;
        border-radius: 0;
        padding: 15px;
    }
    
    .day-events-list {
        padding-bottom: 20px;
    }
    
    .event-card-image {
        height: 180px;
    }
    
    .event-card-header {
        padding: 12px 15px;
    }
    
    .event-card-title {
        font-size: 16px;
    }
    
    .event-card-content {
        padding: 15px;
    }
}

/* Estilo para dispositivos muy pequeños */
@media (max-width: 360px) {
    .event-card-image {
        height: 140px;
    }
    
    .event-card-header {
        padding: 10px 12px;
    }
    
    .event-card-content {
        padding: 12px;
        gap: 8px;
    }
    
    .event-card-title {
        font-size: 15px;
    }
    
    .event-card-description {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* Mejoras para la visualización del modal de evento individual */
.event-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5vh auto;
    padding: 25px;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s;
    max-height: 90vh;
    overflow-y: auto;
}

/* Estilo responsive para todos los modales */
@media (max-width: 767px) {
    .day-events-modal-content,
    .event-modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        max-width: none;
        border-radius: 0;
        padding: 15px;
    }
    
    .day-events-modal-content {
        display: flex;
        flex-direction: column;
    }
    
    .day-events-list {
        flex: 1;
        overflow-y: auto;
    }
    
    .event-card-image {
        height: 130px;
    }
    
    .event-body {
        flex-direction: column;
    }
    
    .event-image-container {
        margin-bottom: 15px;
        max-height: 200px;
        overflow: hidden;
    }
}

/* Estilo para dispositivos muy pequeños */
@media (max-width: 360px) {
    .event-card-image {
        height: 100px;
    }
    
    .event-card-header {
        padding: 8px 12px;
    }
    
    .event-card-content {
        padding: 10px;
    }
    
    .event-card-title {
        font-size: 14px;
    }
    
    .event-card-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

/* Estilo mejorado para el botón de Google Maps */
.map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #DE826B;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(222, 130, 107, 0.2);
    border: 1px solid #DE826B;
    text-align: center;
}

.map-link:hover {
    background-color: white;
    color: #DE826B;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(222, 130, 107, 0.3);
}

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

/* Versión móvil más simple */
.map-link-mobile {
    color: #DE826B;
    text-decoration: underline;
    font-weight: 500;
}

/* Estilo mejorado para el botón de Google Maps */
.location-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Estilos definitivos para modal en móvil - ALTA PRIORIDAD */
@media (max-width: 767px) {
    .day-events-modal {
        position: fixed !important;
        z-index: 9999 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.7) !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        display: none;
    }
    
    .day-events-modal-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    
    .day-events-title {
        position: sticky !important;
        top: 0 !important;
        background-color: #fff !important;
        z-index: 10 !important;
        padding-top: 15px !important;
        margin-top: -15px !important;
        padding-bottom: 10px !important;
        margin-bottom: 15px !important;
        width: 100% !important;
    }
}

/* Estilo simplificado para el contenedor de ubicación */
.location-item {
    display: flex;
    margin-bottom: 15px;
}

.location-content {
    width: 100%;
}

/* Estilos refinados para el botón de mapa */
.map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #DE826B;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(222, 130, 107, 0.2);
    border: 1px solid #DE826B;
    text-align: center;
}

.map-link:hover {
    background-color: white;
    color: #DE826B;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(222, 130, 107, 0.3);
}

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