/* Calendar page specific styles - Dark theme */
* {
    box-sizing: border-box;
}

body {
    background: #18181b !important;
    color: #fff !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    margin: 0 !important;
    min-height: 100vh;
    line-height: 1.6;
    padding: 80px 0 0 0 !important;
}

.wrap {
    min-height: 100vh;
    background: #18181b;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem 1rem;
}

.card {
    background: #23232a;
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    overflow: hidden;
    padding: 1.5rem;
}

#calendar {
    min-height: 500px;
    background: transparent;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.loading i {
    animation: spin 1s linear infinite;
}

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

/* Leyenda de colores */
.calendar-legend {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Leyenda en el pie */
.footer-legend {
    margin: 2rem 0 0 0;
    padding: 1.5rem;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.calendar-legend h4 {
    margin: 0 0 1rem 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-legend h4 i {
    color: #4285f4;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #ccc;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.legend-color.pulse-today {
    animation: pulse-legend 2s infinite;
}

@keyframes pulse-legend {
    0%, 100% { 
        opacity: 1; 
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
    }
    50% { 
        opacity: 0.7; 
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.show {
    display: flex;
}

.modal .content {
    background: #23232a;
    border-radius: 1rem;
    max-width: 640px;
    width: 100%;
    margin: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    color: #fff;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal .content > div:first-child {
    padding: 1.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #2a2a2a;
}

.modal .content > div:first-child h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.btn {
    background: #4285f4;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn:hover {
    background: #357ae8;
    transform: translateY(-1px);
}

.btn.secondary {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

.btn.secondary:hover {
    background: #444;
}

#event-modal-body {
    padding: 1.5rem;
    color: #fff;
}

/* FullCalendar Dark Theme Overrides */
.fc {
    background: transparent !important;
    color: #fff !important;
}

.fc-theme-standard td, 
.fc-theme-standard th {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: transparent !important;
}

.fc-theme-standard .fc-scrollgrid {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.fc-col-header-cell {
    background: #2a2a2a !important;
    color: #fff !important;
}

.fc-daygrid-day {
    background: transparent !important;
}

.fc-daygrid-day:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.fc-day-today {
    background: rgba(66, 133, 244, 0.1) !important;
}

.fc-button {
    background: #333 !important;
    border: 1px solid #555 !important;
    color: #fff !important;
    padding: 0.6rem 1rem !important;
    border-radius: 0.75rem !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.fc-button:hover {
    background: #444 !important;
    border-color: #666 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

.fc-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.fc-button-primary {
    background: #4285f4 !important;
    border-color: #4285f4 !important;
    color: #fff !important;
}

.fc-button-primary:hover {
    background: #357ae8 !important;
    border-color: #357ae8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4) !important;
}

.fc-button-primary:active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    transform: translateY(0) !important;
}

/* Botón "Hoy" especial */
.fc-today-button {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border-color: #16a34a !important;
    font-weight: 600 !important;
}

.fc-today-button:hover {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    border-color: #15803d !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4) !important;
}

/* Botones de navegación (prev/next) */
.fc-prev-button, .fc-next-button {
    background: #2563eb !important;
    border-color: #2563eb !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.fc-prev-button:hover, .fc-next-button:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4) !important;
}

/* Iconos de navegación mejorados */
.fc-prev-button .fc-icon, .fc-next-button .fc-icon {
    font-size: 1.1rem !important;
    font-weight: bold !important;
}

/* Grupo de botones de vista (mes, lista) */
.fc-button-group .fc-button {
    border-radius: 0 !important;
    margin: 0 !important;
    background: #2a2a2a !important;
    border-color: #444 !important;
}

.fc-button-group .fc-button:first-child {
    border-top-left-radius: 0.75rem !important;
    border-bottom-left-radius: 0.75rem !important;
}

.fc-button-group .fc-button:last-child {
    border-top-right-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
}

.fc-button-group .fc-button:hover {
    background: #3a3a3a !important;
    border-color: #555 !important;
    z-index: 1 !important;
}

.fc-button-group .fc-button.fc-button-active {
    background: #4285f4 !important;
    border-color: #4285f4 !important;
    color: #fff !important;
    z-index: 2 !important;
}

.fc-toolbar-title {
    color: #fff !important;
    font-weight: 600;
    font-size: 1.5rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    margin: 0 1rem !important;
}

.fc-toolbar {
    margin-bottom: 1.5rem !important;
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
}

.fc-toolbar-chunk {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* Estilos de eventos forzados */
.fc-event {
    color: #fff !important;
    border-radius: 0.5rem !important;
    padding: 0.2rem 0.5rem !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-width: 1px !important;
    border-style: solid !important;
}

/* Forzar colores específicos usando atributos data */
.fc-event[data-color="#666666"] {
    background-color: #666666 !important;
    border-color: #666666 !important;
    opacity: 0.7;
    text-decoration: line-through;
}

.fc-event[data-color="#ef4444"] {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    animation: pulse-today 2s infinite;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.fc-event[data-color="#f59e0b"] {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.4);
}

.fc-event[data-color="#22c55e"] {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    border-width: 2px !important;
}

.fc-event[data-color="#3b82f6"] {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.fc-event[data-color="#06b6d4"] {
    background-color: #06b6d4 !important;
    border-color: #06b6d4 !important;
}

.fc-event[data-color="#8b5cf6"] {
    background-color: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    background: linear-gradient(135deg, #8b5cf6, #a855f7) !important;
}

.fc-event[data-color="#f44336"] {
    background-color: #f44336 !important;
    border-color: #f44336 !important;
}

.fc-event {
    background: #4285f4 !important;
    border-color: #357ae8 !important;
    color: #fff !important;
    border-radius: 0.5rem !important;
    padding: 0.2rem 0.5rem !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fc-event:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    position: relative;
}

.fc-event-title {
    font-weight: 500;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Estilos específicos para eventos pasados */
.fc-event[style*="#666666"] {
    opacity: 0.7;
    text-decoration: line-through;
}

.fc-event[style*="#666666"]:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Eventos de hoy - animación pulsante */
.fc-event[style*="#ef4444"] {
    animation: pulse-today 2s infinite;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

@keyframes pulse-today {
    0%, 100% { 
        opacity: 1; 
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }
    50% { 
        opacity: 0.8; 
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
    }
}

/* Eventos mañana - brillo sutil */
.fc-event[style*="#f59e0b"] {
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.4);
}

/* Eventos esta semana - borde más grueso */
.fc-event[style*="#22c55e"] {
    border-width: 2px !important;
}

/* Eventos futuros - efecto brillante */
.fc-event[style*="#8b5cf6"] {
    background: linear-gradient(135deg, #8b5cf6, #a855f7) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    #calendar {
        min-height: 400px;
    }
    
    .modal .content {
        margin: 0.5rem;
    }
    
    .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem;
    }
    
    .fc-toolbar-chunk {
        justify-content: center;
    }
    
    .fc-toolbar-title {
        font-size: 1.2rem !important;
        order: -1;
    }
    
    .fc-button {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
    
    .fc-prev-button, .fc-next-button {
        width: 36px !important;
        height: 36px !important;
    }
    
    .legend-items {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.6rem;
    }
    
    .footer-legend {
        margin: 1.5rem 0 0 0;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .fc-button {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    
    .fc-prev-button, .fc-next-button {
        width: 32px !important;
        height: 32px !important;
    }
    
    .fc-toolbar {
        gap: 0.8rem;
        padding: 0.6rem;
    }
    
    .fc-toolbar-title {
        font-size: 1.1rem !important;
    }
    
    .fc-event {
        font-size: 0.75rem;
        padding: 0.1rem 0.3rem !important;
    }
    
    .legend-items {
        grid-template-columns: 1fr 1fr;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
}

/* Custom icons for calendar buttons */
.fc-prev-button .fc-icon::before {
    content: "‹" !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    color: #e2e8f0 !important;
}

.fc-next-button .fc-icon::before {
    content: "›" !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    color: #e2e8f0 !important;
}

.fc-today-button::before {
    content: "📅 ";
    margin-right: 0.3rem;
}

.fc-dayGridMonth-button::before {
    content: "🗓 ";
    margin-right: 0.3rem;
}

.fc-listMonth-button::before {
    content: "📋 ";
    margin-right: 0.3rem;
}

/* Enhanced event display */
.fc-event {
    border: none !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
    transition: all 0.2s ease !important;
}

.fc-event:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
}

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

.fc-event-time {
    font-weight: 400 !important;
    opacity: 0.9 !important;
}

/* Loading state for calendar */
.fc-view-harness::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(24, 24, 27, 0.7);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fc-view-harness.loading::before {
    opacity: 1;
}

/* Calendar header styling */
.fc-header-toolbar {
    margin-bottom: 1rem !important;
}

.fc-toolbar-title {
    color: #f1f5f9 !important;
    font-weight: 600 !important;
    text-align: center !important;
    letter-spacing: 0.5px !important;
}

/* Modal enhancements */
.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-image-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-info-section {
    color: #f1f5f9;
}

/* Description section styling */
.description-section {
    margin: 1.5rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(66, 133, 244, 0.2);
}

.section-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.3px;
}

.description-container {
    background: linear-gradient(135deg, #2a2a3a, #323242);
    border: 1px solid rgba(66, 133, 244, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.description-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4285f4, #667eea, #4285f4);
    opacity: 0.7;
}

.description-content {
    position: relative;
}

.description-text {
    line-height: 1.6;
    font-size: 0.95rem;
    color: #e2e8f0;
    text-align: justify;
    margin-bottom: 1rem;
}

.description-text p {
    margin-bottom: 0.75rem;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.btn-read-more {
    background: linear-gradient(135deg, #4285f4, #5a67d8);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-read-more:hover::before {
    left: 100%;
}

.btn-read-more:hover {
    background: linear-gradient(135deg, #357ae8, #4c51bf);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.btn-read-more.expanded {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-read-more.expanded:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-read-more i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.btn-read-more.expanded i {
    transform: rotate(180deg);
}

/* Info items styling */
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #4285f4;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #667eea;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    margin-top: 0.1rem;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 500;
}

.info-link {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.info-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4285f4, #667eea);
    transition: width 0.3s ease;
}

.info-link:hover::after {
    width: 100%;
}

.info-link:hover {
    color: #667eea;
    transform: translateY(-1px);
}

.instagram-link {
    color: #e4405f !important;
}

.instagram-link::after {
    background: linear-gradient(90deg, #e4405f, #fd1d1d) !important;
}

.instagram-link:hover {
    color: #fd1d1d !important;
}

/* Modal responsive design */
@media (min-width: 768px) {
    .modal-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .modal-image-section {
        flex: 0 0 300px;
        margin-right: 1.5rem;
    }
    
    .modal-info-section {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .modal .content {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal .content > div:first-child {
    padding: 1.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.modal .content > div:first-child h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal .content > div:first-child button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal .content > div:first-child button:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

#event-modal-body {
    padding: 1.5rem;
    line-height: 1.6;
}

/* Responsive modal content wrapper */
.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-image-section {
    text-align: center;
}

.modal-image-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 200px;
    object-fit: cover;
}

.modal-info-section {
    flex: 1;
}

/* Desktop layout - side by side */
@media (min-width: 768px) {
    .modal .content {
        max-width: 800px;
    }
    
    .modal-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .modal-image-section {
        flex: 0 0 300px;
        text-align: left;
    }
    
    .modal-image-section img {
        max-height: 300px;
        width: 100%;
        object-fit: cover;
    }
    
    .modal-info-section {
        flex: 1;
        min-width: 0; /* Allow text to wrap properly */
    }
}

/* Large desktop - even more space */
@media (min-width: 1024px) {
    .modal .content {
        max-width: 900px;
    }
    
    .modal-image-section {
        flex: 0 0 350px;
    }
    
    .modal-image-section img {
        max-height: 350px;
    }
}

#event-modal-body p {
    margin: 0.75rem 0;
    padding: 0.5rem 0;
}

#event-modal-body a {
    transition: all 0.2s ease;
    font-weight: 500;
}

#event-modal-body a:hover {
    text-decoration: underline !important;
    transform: translateX(2px);
}
.status-badge{display:inline-flex;align-items:center;gap:.4rem;padding:.25rem .6rem;border-radius:999px;font-weight:600}
@media(max-width:600px){.header{flex-direction:column;gap:.5rem}}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    padding: 8px 0 4px 0;
    margin-bottom: 0;
    font-weight: bold;
    text-align: center;
    color: #444;
    letter-spacing: 1px;
}

.calendar-weekdays div {
    padding: 4px 0;
    border-radius: 4px;
}

/* Sábado y domingo en color diferente */
.calendar-weekdays div:nth-child(6),
.calendar-weekdays div:nth-child(7) {
    color: #c0392b;
    background: #fbeee6;
    font-weight: 700;
}

/* Estilos básicos para el calendario */
.calendar-controls {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    margin: 20px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.calendar-cell {
    background: #fff;
    border-radius: 10px;
    padding: 14px 10px 10px 10px;
    min-height: 90px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
    border: 1px solid #e3e6ea;
    transition: box-shadow 0.2s, border 0.2s, background 0.2s;
}

.calendar-cell:hover {
    box-shadow: 0 6px 18px rgba(78,205,196,0.13);
    border: 1.5px solid #4ecdc4;
    background: #f0fdfa;
    z-index: 2;
}

.calendar-cell.empty {
    background: transparent;
    box-shadow: none;
    border: none;
}

/* Fines de semana en el grid */
.calendar-cell:nth-child(7n),
.calendar-cell:nth-child(7n-1) {
    background: #fbeee6;
    color: #c0392b;
}

/* Resaltar el día de hoy */
.calendar-cell.today {
    border: 2.5px solid #e74c3c;
    box-shadow: 0 8px 24px rgba(231,76,60,0.13);
    background: #fff6f4;
}

.calendar-cell.today .cell-date {
    background: #e74c3c;
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(231,76,60,0.10);
}

/* Badge de Hoy */
.today-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(90deg,#e74c3c 60%,#ffb199 100%);
    color: #fff;
    font-size: 12px;
    padding: 2.5px 10px;
    border-radius: 999px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(231,76,60,0.10);
    letter-spacing: 1px;
}

.event-pill {
    background: linear-gradient(90deg,#4ecdc4 60%,#556270 100%);
    color: #fff;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    margin-bottom: 5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 4px rgba(78,205,196,0.10);
    transition: background 0.2s;
}

.event-pill:hover {
    background: linear-gradient(90deg,#43aea8 60%,#333 100%);
}

.more-marker {
    font-size: 12px;
    color: #333;
    margin-top: 8px;
    cursor: pointer;
    background: #f0fdfa;
    border-radius: 8px;
    padding: 2px 8px;
    display: inline-block;
    font-weight: 600;
    transition: background 0.2s;
}

.more-marker:hover {
    background: #4ecdc4;
    color: #fff;
}

/* Tooltip básico: usamos title en el cell para mostrar conteo */
.calendar-cell[title] {
    cursor: help;
}

/* Tooltip detallado (usaremos pseudo-elemento cuando haya title) */
/* Tooltip estilizado flotante (elemento separado en DOM) */
.calendar-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 9999;
    white-space: nowrap;
    transform: translate(-50%, 10px);
    display: none;
}

/* Drag & drop visuals */
.calendar-cell.drag-over {
    outline: 2px dashed #4ecdc4;
    background: rgba(78,205,196,0.08);
}

/* Create event modal adjustments */
#modal-create-event .modal-body {
    padding: 18px;
}

#create-event-form .form-group {
    margin-bottom: 12px;
}

#create-event-form input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* Mejoras generales en modales (márgenes y scroll) */
.modal-content {
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-body {
    padding: 18px;
    overflow: auto;
}
.modal-small .modal-body {
    padding: 14px 18px;
}

/* =================================
   RESPONSIVE DESIGN PARA MÓVIL
   ================================= */

@media (max-width: 768px) {
    /* Header responsive */
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-logo {
        justify-content: center;
        text-align: center;
    }
    
    .header-logo h1 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    /* Controles de rango responsive */
    .calendar-range-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.8rem !important;
        padding: 1rem !important;
    }
    
    .calendar-range-controls label {
        margin: 0 !important;
        font-weight: 600;
        min-width: auto !important;
    }
    
    .calendar-range-input {
        min-width: auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Controles del calendario */
    .calendar-controls {
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .calendar-controls h2 {
        font-size: 1.3rem;
    }
    
    /* Grid del calendario - más compacto en móvil */
    .calendar-grid {
        gap: 6px;
        padding: 12px;
        margin-bottom: 1rem;
    }
    
    .calendar-cell {
        min-height: 70px;
        padding: 8px 6px 6px 6px;
        font-size: 0.9rem;
    }
    
    /* Días de la semana más compactos */
    .calendar-weekdays {
        font-size: 0.8rem;
        padding: 6px 0 2px 0;
    }
    
    .calendar-weekdays div {
        padding: 2px 0;
    }
    
    /* Eventos en las celdas más pequeños */
    .calendar-event {
        font-size: 0.7rem;
        padding: 2px 4px;
        margin: 1px 0;
        border-radius: 3px;
    }
    
    /* Modal responsive */
    .modal-content {
        margin: 1rem;
        max-height: 85vh;
        width: calc(100% - 2rem);
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    /* Extra pequeño - optimización para móviles muy pequeños */
    .container {
        padding: 0.5rem;
    }
    
    .header-logo h1 {
        font-size: 1.3rem;
    }
    
    .calendar-grid {
        gap: 4px;
        padding: 8px;
    }
    
    .calendar-cell {
        min-height: 60px;
        padding: 6px 4px 4px 4px;
        font-size: 0.8rem;
    }
    
    .calendar-weekdays {
        font-size: 0.7rem;
        padding: 4px 0;
    }
    
    /* Botones más grandes para touch */
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    /* Modal casi a pantalla completa */
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        max-height: 90vh;
        border-radius: 12px;
    }
    
    /* Formularios más touch-friendly */
    .form-group input,
    .form-group select {
        min-height: 44px;
        font-size: 1rem;
        border-radius: 8px;
        padding: 0.75rem;
    }
    
    /* Ocultar texto en botones muy pequeños */
    .btn-text {
        display: none;
    }
    
    /* Mejorar área de toque en celdas del calendario */
    .calendar-cell {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(78, 205, 196, 0.2);
    }
    
    .calendar-cell:active {
        transform: scale(0.98);
        background: #e8f8f7;
    }
}

/* FullCalendar specific styles */
#calendar .fc {
    font-family: inherit;
}

#calendar .fc-toolbar {
    margin-bottom: 1rem;
}

#calendar .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

#calendar .fc-button {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transition: all 0.2s;
}

#calendar .fc-button:hover {
    background: linear-gradient(135deg, #44a08d, #4ecdc4);
    transform: translateY(-1px);
}

#calendar .fc-button:focus {
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3);
}

#calendar .fc-event {
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#calendar .fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#calendar .fc-daygrid-day-number {
    color: #333;
    font-weight: 500;
}

#calendar .fc-day-today {
    background-color: rgba(78, 205, 196, 0.1) !important;
}

#calendar .fc-day-today .fc-daygrid-day-number {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
