.calendar-section {
    padding: 3rem 0;
    background: #ffffff;
}

.calendar-section .row {
    display: flex;
    align-items: stretch;
}

.calendar-section .row > div {
    display: flex;
    flex-direction: column;
}

#calendar {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 100%;
    flex: 1;
}

/* Sidebar de información CLIP */
.clip-info-sidebar {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.clip-info-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.clip-info-text {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.clip-logo-link-sidebar {
    display: block;
    text-decoration: none;
}

.clip-logo-sidebar {
    position: relative;
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.clip-logo-sidebar img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.clip-logo-sidebar:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #2E5AA5;
}

.clip-logo-sidebar:hover img {
    transform: scale(1.05);
}

.clip-logo-sidebar .clip-hover-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(46, 90, 165, 0.95);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.clip-logo-sidebar:hover .clip-hover-text {
    opacity: 1;
}

/* Personalización de FullCalendar - Estilo Gubernamental */
.fc {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Quitar subrayados de todos los elementos */
.fc * {
    text-decoration: none !important;
}

.fc a {
    text-decoration: none !important;
}

.fc-button {
    text-decoration: none !important;
}

.fc-daygrid-day-number {
    text-decoration: none !important;
}

.fc-event-title {
    text-decoration: none !important;
}

.fc-col-header-cell-cushion {
    text-decoration: none !important;
}

.fc-toolbar {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.fc-toolbar-title {
    font-size: 1.75rem;
    font-weight: 600;
    background: #2E5AA5;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-button {
    background-color: #ffffff !important;
    border: 1px solid #2E5AA5 !important;
    color: #2E5AA5 !important;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: none;
    transition: all 0.2s ease;
}

.fc-button:hover {
    background-color: #2E5AA5;
    border-color: #2E5AA5;
    color: #ffffff;
}

.fc-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 64, 133, 0.15);
    outline: none;
}

.fc-button-active {
    background-color: #2E5AA5;
    border-color: #2E5AA5   ;
    color: #ffffff;
}

.fc-button-active:hover {
    background-color: #2d5a9a;
    border-color: #2d5a9a;
    color: #ffffff;
}

.fc-button-primary:not(:disabled):active {
    background-color: #2d5a9a;
    border-color: #2d5a9a;
}

/* Headers de días de la semana */
.fc-col-header-cell {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.fc-col-header-cell-cushion {
    padding: 0.5rem;
    color: #000000;
}

/* Celdas del calendario */
.fc-daygrid-day {
    border: 1px solid #e9ecef;
    background-color: #ffffff;
}

.fc-daygrid-day-frame {
    min-height: 100px !important;
    height: 100px !important;
}

.fc-day-today {
    background-color: rgba(46, 90, 165, 0.1) !important;
    border: 2px solid #2E5AA5 !important;
}

.fc-day-today .fc-daygrid-day-number {
    color: #2E5AA5;
    font-weight: 700;
}

/* Números de día */
.fc-daygrid-day-number {
    padding: 0.5rem;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

.fc-daygrid-day-top {
    flex-direction: row;
    justify-content: flex-start;
}

/* Eventos */
.fc-event {
    cursor: pointer;
    border-radius: 3px;
    padding: 4px 6px;
    margin: 2px 0;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: visible !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.fc-event:hover {
    opacity: 1 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.fc-event:hover .fc-event-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: block;
    max-width: none;
    word-wrap: break-word;
}

.fc-event-title {
    font-weight: 500;
    padding: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tooltip personalizado para eventos */
.fc-event[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #212529;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1001;
    margin-bottom: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
    text-align: center;
}

.fc-event[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #212529;
    z-index: 1001;
    margin-bottom: -5px;
    pointer-events: none;
}

/* Eventos de visita - Azul CLIP con degradado */
.fc-event-visita {
    background: linear-gradient(135deg, #2E5AA5 0%, #5a8bc8 100%) !important;
    border-color: #2E5AA5 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.fc-event-visita:hover {
    background: linear-gradient(135deg, #2d5a9a 0%, #2E5AA5 100%) !important;
    border-color: #2d5a9a !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(46, 90, 165, 0.3);
}

/* Eventos de jornada - Verde CLIP con degradado */
.fc-event-jornada {
    background: linear-gradient(135deg, #159069 0%, #4db37d 100%) !important;
    border-color: #159069 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.fc-event-jornada:hover {
    background: linear-gradient(135deg, #238a5a 0%, #159069 100%) !important;
    border-color: #238a5a !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(21, 144, 105, 0.3);
}

/* Scrollbar personalizado (opcional) */
.fc-scroller::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.fc-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.fc-scroller::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.fc-scroller::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

/* Modal de detalles */
.detalle-escuela {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #F7A733;
}

.detalle-escuela p {
    margin-bottom: 0.75rem;
    color: #495057;
    font-size: 0.95rem;
}

.detalle-escuela strong {
    color: #212529;
    font-weight: 600;
}

.detalle-escuela i {
    color: #F7A733;
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    #calendar {
        padding: 1rem;
    }
    
    .fc-toolbar-title {
        font-size: 1.25rem;
    }
    
    .fc-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .fc-daygrid-day-frame {
        min-height: 100px !important;
        height: 100px !important;
    }
    
    .clip-info-sidebar {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .clip-info-title {
        font-size: 1.25rem;
    }
    
    .clip-info-text {
        font-size: 0.9rem;
    }
    
    .clip-logo-sidebar {
        padding: 1.5rem;
    }
}