@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;
}
 
/* Ancho card e iframe locacion */
 .modal-ancho-card {
    max-width: 800px; 
    width: 100%;      
    margin: 0 auto;   
	}

#modalUbicacionGenda .modal-content {
    height: 100vh !important;
    border-radius: 0;
}
 
 
 
 /* mmmmmmmmmmmmmmmmmmmmmmm */ 

 /* Asegura que el HTML y el Body ocupen todo el alto */
html, body {
    height: 100%;
    margin: 0;
}

/* El contenedor principal (orquestador) */
.wrapper-genda {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ocupa el 100% de la ventana */
}

/* El contenido central crece para ocupar el espacio sobrante */
.content-genda {
    flex: 1;
}

/* El footer se queda al final naturalmente */
footer {
    flex-shrink: 0;
}
 
 /* mmmmmmmmmmmmmmmmmmmmmmm */ 
 
 
 
 
 /* btn shared */  
 
 	.share-btn {
    background: #fff;
    border: none;
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
 
 
 
 
 
 
 
 
 
 
 
 
/* x */ 
.week-wrapper { 
    display: block; 
    width: 100%; 
    position: relative; 
}

/* Botones laterales reubicados arriba */
.nav-scroll-btn { 
    background: none; 
    border: none; 
    font-size: 1.8rem; 
    color: #64748b; 
    cursor: pointer; 
    padding: 0 5px; 
    z-index: 10; 
    transition: color 0.2s; 
    line-height: 1;
    display: flex;
    align-items: center;
}
.nav-scroll-btn:hover { 
    color: #00A0E0; 
}

/* Cinta de Meses adaptada al nuevo espacio central */
.month-track {
    background-color: #f8fafc; 
    height: 26px; 
    border-radius: 6px; 
    border: 1px solid #f1f5f9; 
    overflow: hidden;
    position: relative; 
}

.track-text {
    color: #64748b; 
    font-family: system-ui, -apple-system, sans-serif; 
    font-size: 0.65rem; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 1.5px; 
    position: absolute;
    top: 50%; 
    transform: translateY(-50%); 
    margin: 0;
    transition: opacity 0.3s ease; 
}

#track-month-left {
    left: 16px;
}

.track-transition-group {
    position: absolute;
    height: 100%;
    top: 0;
}

.track-divider {
    width: 2px; 
    height: 12px; 
    background-color: #cbd5e1; 
    position: absolute;
    left: 0;
    top: 50%; 
    transform: translateY(-50%); 
    border-radius: 4px;
}

/* Contenedor de días con SCROLL SNAP (el imán) y 100% de ancho disponible */
.week-nav { 
    display: flex; 
    width: 100%; 
    padding: 5px 0; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
    scroll-snap-type: x mandatory; 
}
.week-nav::-webkit-scrollbar { 
    display: none; 
}

/* Estilos de los días con cálculo exacto para 7 columnas */
.day-link { 
    flex: 0 0 calc(100% / 7); 
    min-width: 0; /* Permitir que el flex calcule bien en pantallas chicas */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-decoration: none; 
    color: #64748b; 
    -webkit-tap-highlight-color: transparent; 
    position: relative; 
    scroll-snap-align: start; 
}
.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(0, 160, 224, 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; 
        }
        
        /* 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); 
            } 
        }

        /* 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: 15px; 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-vencida { opacity: 0.6; background: #f1f5f9; filter: grayscale(0.5); cursor: default; }
















/* ==========================================================================
   ANIMACIONES DE IMÁGENES - CSS CORREGIDO Y COHERENTE
   ========================================================================== */

.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; 
}       

/* Tamaño base de la miniatura (Aplica por defecto a móviles en reposo) */
.img-thumb-container { 
    width: 110px; 
    height: 140px; 
    flex-shrink: 0; 
    background: #f1f5f9; 
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    /* Alinea la transformación para que parezca crecer desde su posición a la derecha */
    transform-origin: center right; 
}


/* ==========================================================================
   CONTROL DE VISIBILIDAD DE ELEMENTOS EXPANDIBLES
   (Solución al espacio fantasma y clics accidentales)
   ========================================================================== */

/* Estado colapsado (por defecto) */
.mostrar-al-expandir {
    display: none !important;
}

.ocultar-al-expandir {
    display: block !important;
}

/* Estado expandido (cuando la tarjeta recibe la clase .is-expanded) */
.card-custom.is-expanded .mostrar-al-expandir {
    display: block !important; 
}

.card-custom.is-expanded .ocultar-al-expandir {
    display: none !important;
}


/* ==========================================================================
   VISTA PC
   ========================================================================== */
@media (min-width: 768px) {
    /* Miniatura base un poco más grande solo en PC (ej: 160px) */
    .img-thumb-container {
        width: 160px; 
        height: 160px;
    }
    
    /* Expansión en PC (Mantenemos la lógica de ancho al 50%) */
    .img-thumb-container.step-1 { 
        width: 65%; 
        height: 220px; 
    }
}


/* ==========================================================================
   VISTA MÓVIL
   ========================================================================== */
@media (max-width: 767.98px) {
    
    .card-custom.is-expanded .d-flex.w-100.align-items-stretch {
        flex-wrap: wrap-reverse !important; 
    }

    .img-thumb-container {
        margin-left: auto !important; 
    }

    .img-thumb-container.step-1 { 
        width: 100%; 
        height: 220px; 
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-top-left-radius: 1rem !important;
        border-top-right-radius: 1rem !important;
    }

    /* ¡CORRECCIÓN AL LAYOUT ROTO CORREGIDA! */
    .card-custom.is-expanded .col-datos-evento { 
        margin-right: 0 !important;   
        margin-top: 0 !important; 
        width: 100% !important;
        padding: 0 !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);
        }

/* --- Ocultar/Mostrar Horarios --- */

/* --- Ocultar/Mostrar Horarios (Lógica adaptada) --- */

/* VISTA MÓVIL (Por defecto) */
@media (max-width: 767.98px) {
    .card-custom .tag-horarios {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateY(-10px);
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
        transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    /* Solo se expande si tiene la clase is-expanded */
    .card-custom.is-expanded .tag-horarios {
        max-height: 500px; /* Aumentado por si hay mucho contenido */
        opacity: 1;
        transform: translateY(0);
        /*margin-top: 0.5rem !important;  mt-2 equivalente */
         /*padding-top: 0.5rem !important; pt-2 equivalente */
        border-top: 1px solid #f8f9fa !important;
    }
}

/* VISTA PC / ESCRITORIO (Siempre visible) */
@media (min-width: 768px) {
    .card-custom .tag-horarios {
        max-height: none !important;
        opacity: 1 !important;
        transform: none !important;
        overflow: visible !important;
        /* Restauramos el estilo visual de la tarjeta */
        /* 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); 
}

/* tooltip-clickeable */

.tooltip-clickeable {
    pointer-events: auto !important;
}

.mi-tooltip-link {
    cursor: pointer !important;
    display: block; /* Asegura que tome todo el ancho del tooltip */
}

/* Efecto visual opcional para que se note al pasar el mouse */
.mi-tooltip-link:hover {
    opacity: 0.8;
}