@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
  
        body { background-color: #f8fafc; font-family: 'Inter', sans-serif; color: #1e293b; }
        .agenda-container { max-width: 800px; margin: 0 auto; padding: 1.5rem 15px; }
 
/* IE, Edge y Firefox */
html, body {
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

/* Chrome, Safari y Opera */
html::-webkit-scrollbar, 
body::-webkit-scrollbar {
  display: none;
}
 
        .week-card { border: none; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); background: #fff; overflow: hidden;}
        .week-nav { display: flex; justify-content: space-between; width: 100%; padding: 5px 0; }
        
        /* Modificación para el indicador de HOY */
        .day-link { flex: 1; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #64748b; -webkit-tap-highlight-color: transparent; position: relative; }
        .day-link.is-today::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 20px; height: 3px; background-color: #ef4444; border-radius: 2px; }
        
        .day-name { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.8px; }
        .day-number { font-size: 1.05rem; font-weight: 700; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px; transition: all 0.3s ease; }
        .day-link.active .day-number { background-color: #00A0E0; color: #fff; box-shadow: 0 8px 15px rgba(13, 110, 253, 0.3); transform: translateY(-2px); }
        .day-link.active .day-name { color: #00A0E0; }

        /* MODIFICACIONES DEL SLIDER */
        .slider-wrapper { position: relative; width: 100%; }
        
        .touch-slider { 
            display: flex; 
            overflow-x: auto; 
            gap: 16px; 
            padding: 10px 5px 30px; 
            scroll-snap-type: x mandatory; 
            scroll-padding-inline: 5px; /* Compensa el padding al alinear */
            scrollbar-width: none; 
            scroll-behavior: smooth; 
            cursor: grab; 
        }
        .touch-slider::-webkit-scrollbar { display: none; }
        
        /* Clases para el estado de arrastre con el mouse */
        .touch-slider.active-drag {
            scroll-snap-type: none; 
            scroll-behavior: auto;
            cursor: grabbing;
        }
        .touch-slider.active-drag .slide-item {
            pointer-events: none; 
        }

        /* 1 tarjeta completa en móvil */
        .slide-item { 
            flex: 0 0 100%; 
            min-width: 100%; 
            scroll-snap-align: start; /* CORRECCIÓN: Alinea al inicio, no al centro */
        }
        
        /* 2 tarjetas completas en PC (restando el gap de 16px) */
        @media (min-width: 768px) { 
            .slide-item { 
                flex: 0 0 calc(50% - 8px); 
                min-width: calc(50% - 8px); 
                /* Hereda el scroll-snap-align: start de arriba */
            } 
        }

        /* FLECHAS DEL SLIDER */
        .slider-btn {
            position: absolute;
            top: 40%; 
            transform: translateY(-50%);
            z-index: 10;
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: none; 
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            color: #64748b;
            transition: all 0.2s ease;
        }
        .slider-btn:hover { background: #00A0E0; color: #fff; border-color: #00A0E0; }
        .prev-btn { left: -10px; }
        .next-btn { right: -10px; }

        /* TARJETAS */
        .card-custom { border: none; border-radius: 18px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); overflow: hidden; background: #fff; cursor: pointer; transition: all 0.3s ease; }
        .card-custom:active { transform: scale(0.98); }
        
        .status-en-curso { border: 1px solid rgba(255,193,7,0.3); }
        .status-pendiente { border-left: 5px solid #00A0E0; }
        .status-vencida { opacity: 0.6; background: #f1f5f9; filter: grayscale(0.5); cursor: default; }
        .status-recurrente { background-color: #faf5ff !important; border-left: 5px solid #a855f7 !important; }

        /* ANIMACIONES DE IMÁGENES */
        .img-header-container { height: 150px; position: relative; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
        .img-header-container.step-1 { height: 250px; }
        
        .img-thumb-container { width: 70px; height: 70px; flex-shrink: 0; background: #f1f5f9; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
        
        @media (min-width: 768px) {
            .img-thumb-container.step-1 { width: 50%; height: 220px; }
        }

            @media (max-width: 767.98px) 
            {
                /* 1. La imagen al expandirse ocupa el 100% del ancho */
                .img-thumb-container.step-1 { 
                    width: 100%; 
                    height: 220px; 
                }

                /* 2. Pasamos el contenedor a columna para que el texto baje sí o sí */
                .card-custom.is-expanded .d-flex.w-100.align-items-start {
                    flex-direction: column !important;
                }

                /* 3. Acomodamos el texto que bajó para que ocupe todo el espacio y tenga margen */
                .card-custom.is-expanded .ms-3 {
                    margin-left: 0 !important;   
                    margin-top: 15px !important; 
                    width: 100% !important;      
                }
            }

        .btn-rutina { background-color: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; font-weight: 600; transition: all 0.2s ease; }
        .btn-rutina:hover, .btn-rutina[aria-expanded="true"] { background-color: #e9d5ff; color: #6b21a8; }
        .text-rutina { color: #9333ea !important; }

        .time-badge-floating { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(4px); color: #1e293b; padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 0.75rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 6px; }

        .registro-tags .badge { font-weight: 600; font-size: 0.65rem; background: #f1f5f9; color: #475569; border: none; padding: 6px 10px; }
        .registro-tags .badge.activo { background: #22c55e; color: #fff; }
        .status-recurrente .registro-tags .badge { background: #f3e8ff; color: #7e22ce; }
        
        .section-header { font-size: 0.8rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }
        .section-header i.icon-title { font-size: 1.1rem; margin-right: 8px; }
        
        /* TIMELINE CSS */
        .timeline-container { position: relative; width: 100%; padding-top: 20px; margin-bottom: 5px; }
        .timeline-track { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 12px; position: relative; width: 100%; padding: 5px 0; transition: height 0.3s ease; }
        .timeline-marker { position: absolute; top: -5px; font-size: 0.8rem; font-weight: 500; color: #64748b; transform: translateX(-50%); }
        .timeline-grid-line { position: absolute; height: 100%; border-left: 1px dashed #cbd5e1; top:0; z-index: 0; }
        .timeline-event { position: absolute; height: 6px; border-radius: 10px; z-index: 1; transition: all 0.2s ease; cursor: pointer; border: 1.5px solid #f1f5f9; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        .timeline-event:hover { transform: scale(1.05); z-index: 10; box-shadow: 0 4px 8px rgba(0,0,0,0.2); filter: brightness(1.1); }
        
        .timeline-point { width: 10px !important; height: 10px !important; border-radius: 50% !important; margin-top: -4px; margin-left: -7px; }

        @keyframes pulse-red {
            0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
            70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
            100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        .timeline-now-marker {
            position: absolute;
            top: -5px;
            height: calc(100% + 10px);
            width: 2px;
            background-color: #ef4444;
            z-index: 20;
            pointer-events: none;
        }
        .timeline-now-marker::before {
            content: '';
            position: absolute;
            top: 0;
            left: -3px;
            width: 8px;
            height: 8px;
            background-color: #ef4444;
            border-radius: 50%;
            animation: pulse-red 2s infinite;
        }
        
        :root {
            --bs-primary: #00A0E0;
            --bs-primary-rgb: 0, 160, 224; 
        }

        .text-primary { color: #00A0E0 !important; }
        .bg-primary { background-color: #00A0E0 !important; }
        .border-primary { border-color: #00A0E0 !important; }

        .btn-primary {
            --bs-btn-color: #fff;
            --bs-btn-bg: #00A0E0;
            --bs-btn-border-color: #00A0E0;
            --bs-btn-hover-color: #fff;
            --bs-btn-hover-bg: #008cbd;
            --bs-btn-hover-border-color: #0080ad;
            --bs-btn-focus-shadow-rgb: 38, 174, 229;
            --bs-btn-active-color: #fff;
            --bs-btn-active-bg: #0080ad;
            --bs-btn-active-border-color: #00749e;
            --bs-btn-disabled-color: #fff;
            --bs-btn-disabled-bg: #00A0E0;
            --bs-btn-disabled-border-color: #00A0E0;
        }        

        /* --- ESTILOS PARA EL TOGGLE DEL TIMELINE --- */
        .timeline-divider {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 15px 0 5px 0;
        }
        .timeline-divider hr {
            position: absolute;
            width: 100%;
            margin: 0;
            z-index: 0;
        }
        .btn-timeline-toggle {
            background-color: #fff;
            border: 1px solid #e2e8f0;
            color: #64748b;
            border-radius: 20px;
            padding: 2px 12px;
            font-size: 0.7rem;
            font-weight: 600;
            box-shadow: 0 2px 6px rgba(0,0,0,0.03);
            position: relative;
            z-index: 1;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
        }
        .btn-timeline-toggle:hover {
            color: #00A0E0;
            border-color: #cbd5e1;
            background-color: #f8fafc;
        }
        .btn-timeline-toggle i.chevron-icon {
            transition: transform 0.3s ease;
        }
        .btn-timeline-toggle[aria-expanded="true"] i.chevron-icon {
            transform: rotate(180deg);
        }

/* --- MODALIDAD CINEMA: Ocultar/Mostrar Horarios --- */

/* Estado por defecto (Oculto) */
.card-custom .horarios-cinema {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px); 
    
    /* Anulamos temporalmente los márgenes, paddings y bordes de Bootstrap */
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    
    /* Suavizamos un poco el tiempo y la curva para que sea más premium */
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Estado Expandido (Visible) */
.card-custom.is-expanded .horarios-cinema {
    max-height: 300px; 
    opacity: 1;
    transform: translateY(0); 
    
    /* Restauramos los valores equivalentes a mt-2, pt-2 y border-light */
    margin-top: 0.5rem !important; 
    padding-top: 0.5rem !important;
    border-top: 1px solid #f8f9fa !important; 
}

/* Ayuda al móvil a pre-calcular la animación de los colapsos */
.collapsing {
    transition: height 0.4s ease !important;    
    will-change: height;
    transform: translateZ(0); 
}