/**
 * calendar-style.css - Estilos para el Sistema de Calendario
 * Calendario Apostólico Digital
 * 
 * @author Jorge Leandro
 */

/* =====================================================
   VARIABLES CSS
   ===================================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --success-color: #48bb78;
    --danger-color: #fc8181;
    --warning-color: #f6ad55;
    --info-color: #4299e1;
    --light-bg: #f8f9fc;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* =====================================================
   ESTILOS GENERALES
   ===================================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: #333;
    overflow-x: hidden;
}

.bg-gradient {
    background: var(--primary-gradient) !important;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar .btn-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    transition: var(--transition);
}

.navbar .btn-light:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   CONTENIDO PRINCIPAL
   ===================================================== */
.main-content {
    padding-top: 90px;
    padding-bottom: 40px;
    min-height: 100vh;
}

/* =====================================================
   TARJETAS
   ===================================================== */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.calendar-card {
    box-shadow: var(--card-shadow);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.card-header h2,
.card-header h5 {
    margin: 0;
    font-weight: 700;
}

/* =====================================================
   FULLCALENDAR - TOOLBAR
   ===================================================== */
.fc {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
}

.fc .fc-toolbar {
      background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);

    margin-bottom: 0 !important;
    border-radius: 0;
}

.fc .fc-toolbar-title {
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fc .fc-button {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.fc .fc-button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fc .fc-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3) !important;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fc .fc-button-primary:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   FULLCALENDAR - CALENDARIO
   ===================================================== */
.fc .fc-view-harness {
    background: white;
}

.fc .fc-daygrid {
    background: white;
}

.fc .fc-scrollgrid {
    border: none !important;
}

/* Días de la semana */
.fc .fc-col-header-cell {
    background: linear-gradient(180deg, #f8f9fc 0%, #e9ecef 100%);
    border-color: #dee2e6 !important;
    padding: 1rem 0.5rem;
}

.fc .fc-col-header-cell-cushion {
    color: #495057;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Celdas de días */
.fc .fc-daygrid-day {
    background: white;
    border-color: #e3e6f0 !important;
    transition: var(--transition);
    cursor: pointer;
}

.fc .fc-daygrid-day:hover {
    background: #f8f9fc;
}

.fc .fc-daygrid-day.fc-day-today {
   background: linear-gradient(135deg, rgba(209, 213, 219, 0.3), rgba(156, 163, 175, 0.3)) !important;

}

.fc .fc-daygrid-day-number {
    color: #5a5c69;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem;
    transition: var(--transition);
}

.fc .fc-day-today .fc-daygrid-day-number {
    background: linear-gradient(45deg, #6b7280, #9ca3af);
    color: white;
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.3rem;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.4);
}

/* Días de otros meses */
.fc .fc-day-other .fc-daygrid-day-number {
    color: #b8bcc7;
}

/* =====================================================
   FULLCALENDAR - EVENTOS
   ===================================================== */
.fc .fc-event {
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 2px 4px !important;
    padding: 4px 8px !important;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.fc .fc-event:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.fc .fc-event-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc .fc-event-time {
    font-size: 0.75rem;
    opacity: 0.9;
}

.fc .fc-daygrid-event-dot {
    border-width: 4px;
    border-radius: 50%;
}

/* Más eventos */
.fc .fc-more-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.fc .fc-more-link:hover {
    background: rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

/* =====================================================
   FULLCALENDAR - VISTA SEMANA
   ===================================================== */
.fc .fc-timegrid-slot {
    height: 3rem;
}

.fc .fc-timegrid-slot-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.fc .fc-timegrid-event {
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   FULLCALENDAR - VISTA LISTA
   ===================================================== */
.fc .fc-list-day-cushion {
       background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);

    color: white;
    font-weight: 700;
    padding: 1rem;
}

.fc .fc-list-event {
    cursor: pointer;
    transition: var(--transition);
}

.fc .fc-list-event:hover {
    background: #f8f9fc !important;
}

.fc .fc-list-event-dot {
    border-width: 6px;
}

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

/* =====================================================
   CATEGORÍAS SIDEBAR
   ===================================================== */
.categorias-list {
    max-height: 500px;
    overflow-y: auto;
}

.categoria-item {
    transition: var(--transition);
    cursor: pointer;
}

.categoria-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.categoria-item .badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 0;
}

/* =====================================================
   MODALES
   ===================================================== */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.modal-title {
    font-weight: 700;
    font-size: 1.3rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem;
    background: #f8f9fc;
    border-top: 1px solid #e3e6f0;
}

/* =====================================================
   FORMULARIOS
   ===================================================== */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 600;
}

/* =====================================================
   BOTONES
   ===================================================== */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #fc8181, #f56565);
    box-shadow: 0 2px 8px rgba(252, 129, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f6ad55, #ed8936);
    box-shadow: 0 2px 8px rgba(246, 173, 85, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #718096, #4a5568);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* =====================================================
   ALERTAS
   ===================================================== */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #f0fff4, #c6f6d5);
    color: #22543d;
    border-left: 5px solid #48bb78;
}

.alert-danger {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    color: #742a2a;
    border-left: 5px solid #fc8181;
}

.alert-warning {
    background: linear-gradient(135deg, #fffaf0, #feebc8);
    color: #744210;
    border-left: 5px solid #f6ad55;
}

.alert-info {
    background: linear-gradient(135deg, #ebf8ff, #bee3f8);
    color: #2c5282;
    border-left: 5px solid #4299e1;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* =====================================================
   DROPDOWN
   ===================================================== */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--light-bg);
    transform: translateX(5px);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 2px solid #e3e6f0;
}

/* =====================================================
   SCROLLBAR PERSONALIZADA
   ===================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3, #653a8b);
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .main-content {
        padding-top: 70px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .fc .fc-toolbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.2rem;
    }
    
    .fc .fc-button {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.75rem;
    }
    
    .card-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .fc .fc-toolbar-title {
        font-size: 1rem;
    }
    
    .fc .fc-daygrid-day-number {
        font-size: 0.85rem;
    }
    
    .fc .fc-event {
        font-size: 0.75rem;
        padding: 2px 6px !important;
    }
}

/* =====================================================
   UTILIDADES
   ===================================================== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.shadow-strong {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.border-gradient {
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--primary-gradient) border-box;
}

/* =====================================================
   DARK MODE SUPPORT (Opcional)
   ===================================================== */
@media (prefers-color-scheme: dark) {
    /* Puedes agregar estilos dark mode aquí si lo necesitas */
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .navbar,
    .modal,
    .btn,
    .fc-toolbar {
        display: none !important;
    }
    
    .fc {
        box-shadow: none;
    }
}