:root {
    /* Paleta de colores "Solaris" (Modo Claro) */
    --primary: #4f46e5;       /* Indigo */
    --primary-dark: #3730a3;
    --primary-light: #6366f1;
    --primary-super-light: #eef2ff;
    --secondary: #06b6d4;     /* Cyan */
    --secondary-dark: #0891b2;
    --accent: #f59e0b;        /* Amber */
    --success: #22c55e;       /* Verde vibrante */
    --warning: #f97316;       /* Naranja cálido */
    --danger: #ef4444;        /* Rojo pasional */
    --recent: #10b981;        /* Verde para estado reciente */
    --warning-state: #fbbf24; /* Amarillo para estado advertencia */
    --old-state: #ef4444;     /* Rojo para estado viejo */
    
    --background: #fdfdfd;    /* Fondo casi blanco, más suave */
    --surface: #ffffff;       /* Superficie de tarjetas y modales */
    
    --text-primary: #1e293b;  /* Texto oscuro para alta legibilidad */
    --text-secondary: #475569;/* Texto secundario para descripciones */
    --text-contrast: #ffffff; /* Texto claro para fondos oscuros */
    --border: #e2e8f0;        /* Borde sutil */
    
    /* Sombras 3D y con efecto de profundidad */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.15), 0 3px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.2), 0 5px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.25), 0 15px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 40px 80px rgba(0, 0, 0, 0.3), 0 25px 40px rgba(0, 0, 0, 0.2);
    
    /* Bordes redondeados con "peso" */
    --rounded-sm: 0.3rem;
    --rounded: 0.6rem;
    --rounded-md: 1rem;
    --rounded-lg: 1.5rem;
    --rounded-xl: 2.5rem;
    --rounded-full: 9999px;

    /* Transiciones y animaciones más dramáticas */
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- DARK MODE STYLES --- */
body.dark-mode {
    /* Paleta de colores "Nebula" (Modo Oscuro) */
    --primary: #94a3ff;       /* Un azul más brillante */
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc; /* Un azul claro más luminoso */
    --primary-super-light: #312e81;
    --secondary: #22d3ee;     /* Cyan brillante */
    --secondary-dark: #06b6d4;
    --accent: #fde047;        /* Amarillo brillante */
    --success: #4ade80;       /* Verde neón */
    --warning: #fb923c;       /* Naranja brillante */
    --danger: #f87171;        /* Rojo brillante */
    --recent: #34d399;        /* Verde más claro para modo oscuro */
    --warning-state: #fbbf24; /* Amarillo para estado advertencia */
    --old-state: #f87171;     /* Rojo más claro para modo oscuro */

    --background: #0f172a;    /* Fondo azul oscuro, muy profundo */
    --surface: #1e293b;       /* Superficie de tarjetas y modales más oscura */
    
    --text-primary: #f8fafc;  /* Texto blanco para alto contraste */
    --text-secondary: #cbd5e1;/* Texto secundario claro */
    --text-contrast: #0f172a; /* Texto oscuro para fondos claros */
    --border: #334155;        /* Borde más oscuro */

    /* Sombras más pronunciadas para el modo oscuro */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.5), 0 5px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.6), 0 15px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 40px 80px rgba(0, 0, 0, 0.8), 0 25px 40px rgba(0, 0, 0, 0.6);
}

/* Estilos base del body y tipografía */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden; /* Previene scroll horizontal accidental */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 800; /* Más peso */
    color: var(--text-primary);
    letter-spacing: -1.5px;
    transition: color var(--transition-slow);
}

/* Aplicación de las variables a los elementos en Dark Mode */
body.dark-mode .savings-card,
body.dark-mode .promo-card,
body.dark-mode .category-card,
body.dark-mode .testimonial-card,
body.dark-mode .wallet-card,
body.dark-mode .bg-white,
body.dark-mode #calendar,
body.dark-mode .modal-content {
    background-color: var(--surface); 
    border-color: var(--border);
}

body.dark-mode .text-gray-800, 
body.dark-mode .text-gray-700,
body.dark-mode .text-gray-600 {
    color: var(--text-secondary);
}

body.dark-mode .text-gray-500 {
    color: var(--text-secondary);
}

body.dark-mode .stats-number {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

body.dark-mode input, 
body.dark-mode select, 
body.dark-mode textarea {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

body.dark-mode input:focus, 
body.dark-mode select:focus, 
body.dark-mode textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

body.dark-mode .bg-gray-50 {
    background-color: var(--border);
}

body.dark-mode .fc-daygrid-day-number, 
body.dark-mode .fc-col-header-cell-cushion {
  color: var(--text-secondary);
}

body.dark-mode .fc-day-today {
  background-color: rgba(165, 180, 252, 0.15) !important;
}

body.dark-mode .text-indigo-700 {
    color: var(--primary-light);
}

body.dark-mode .bg-indigo-50 {
    background-color: rgba(165, 180, 252, 0.1);
}

body.dark-mode .hover\:bg-indigo-100:hover {
    background-color: rgba(165, 180, 252, 0.2);
}

body.dark-mode {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    background-size: 200% 200%;
    animation: gradient-background-anim 15s ease infinite;
}

@keyframes gradient-background-anim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Encabezado con efecto de cristal y gradiente animado */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: var(--transition-slow);
    animation: gradient-anim 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-anim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header h1 {
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -2px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}



/* Tarjetas de estadísticas con efecto de brillo "hero" */
.savings-card {
    background-color: var(--surface);
    box-shadow: var(--shadow);
    border-radius: var(--rounded-lg);
    transition: var(--transition-slow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.savings-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1) 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    transition: left 0.8s ease;
    transform: skewX(-20deg);
}

.savings-card:hover {
    transform: translateY(-12px) rotateX(3deg) rotateY(3deg);
    box-shadow: var(--shadow-md);
}

.savings-card:hover:before {
    left: 100%;
}

.savings-card .stats-number {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin: 0.5rem 0;
    transition: var(--transition-slow);
}

.savings-card:hover .stats-number {
    transform: scale(1.1);
    letter-spacing: 2px;
}

/* Carrusel de recomendaciones con efectos de brillo y "snap" */
.carousel-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--border);
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: thin;      /* Firefox */
    gap: 28px;            /* <<< espacio entre tarjetas */
}

/* Personalización de scrollbar para navegadores WebKit */
.carousel-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--rounded-full);
}

.carousel-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--rounded-full);
    transition: background-color var(--transition-fast);
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.promo-card {
    border: 1px solid var(--border);
    border-radius: var(--rounded-lg);
    transition: var(--transition-slow);
    overflow: hidden;
    position: relative;
    background-color: var(--surface);
    transform-style: preserve-3d;
    scroll-snap-align: start;
    min-width: 350px;
    box-shadow: var(--shadow);
    border-radius: 16px;                 /* asegura cortes limpios */
    transform: translateY(0);            /* o scale(1) si usabas scale */
}

.promo-card:hover {
    transform: translateY(-0.5px) rotateX(2deg) rotateY(2deg) scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    position: relative;
    box-shadow: 0 10px 28px rgba(0,0,0,.35);

}

.promo-card:hover:before {
    left: 100%;
}

/* Nuevo badge "HOY" con gradiente y animación */
.badge-today {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff8a00 0%, #e52e71 100%);
    color: var(--text-contrast);
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 0 0 0 var(--rounded-lg);
    z-index: 10;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Animación de pulso para promociones nuevas */
.promo-card.new .badge-today {
    animation: pulse-and-breathe 2s infinite;
}

@keyframes pulse-and-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(2deg); }
}

/* Categorías con efecto de profundidad y pop */
.category-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--rounded-lg);
    transition: var(--transition-slow);
    transform-style: preserve-3d;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* Call to Action con efecto de onda de choque */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--rounded-xl);
    overflow: hidden;
    position: relative;
    transform: translateZ(0); 
    padding: 4rem;
}

.cta-section:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.8s ease-out;
}

.cta-section:hover:before {
    width: 200%;
    height: 200%;
    opacity: 0.5;
}

.cta-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-fast);
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Tarjetas de directorio con efecto 3D y brillo */
.wallet-card {
    border-radius: var(--rounded-lg);
    overflow: hidden;
    transition: var(--transition-slow);
    border: 1px solid var(--border);
    background-color: var(--surface);
    position: relative;
    transform-style: preserve-3d;
    box-shadow: var(--shadow);
}

.wallet-card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(2deg);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Calendario moderno y limpio */
#calendar {
    border-radius: var(--rounded-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* Botones con efecto de "press" físico */
button, .btn {
    transition: var(--transition-fast);
    border-radius: var(--rounded-md); 
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

button:not(:disabled):hover, 
.btn:not(:disabled):hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}

button:not(:disabled):active,
.btn:not(:disabled):active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-sm);
}

button:focus, .btn:focus {
    outline: none;
    box-shadow: 0 0 0 5px var(--primary-light);
}

/* Formularios con focus más pronunciado */
input, select, textarea {
    border: 1px solid var(--border);
    border-radius: var(--rounded-md);
    transition: var(--transition-fast);
    background-color: var(--surface);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 5px var(--primary-light);
    outline: none;
}

/* Modales con efecto de "pop-up" */
.modal-content {
    border-radius: var(--rounded-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background-color: var(--surface);
    border: none;
    animation: modal-pop 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes modal-pop {
    from { transform: scale(0.8) translateY(50px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Efectos de carga con animación de portal */
.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid var(--border);
    border-top: 8px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite, portal-pulse 2s ease-in-out infinite;
    position: relative;
}

.loading-spinner:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: portal-core 1s ease-in-out infinite alternate;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes portal-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(10deg); }
}

@keyframes portal-core {
    from { transform: translate(-50%, -50%) scale(1); }
    to { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; }
}

/* Footer con efecto de degradado de fondo */
footer {
    position: relative; /* Mantener esta propiedad */
    overflow: hidden; /* Mantener esta propiedad */
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
    opacity: 0.5;
    z-index: 0; /* Asegurarse que está detrás del contenido */
    animation: gradient-anim-footer 20s ease infinite;
    background-size: 200% 200%;
    pointer-events: none; /* ¡ESTA ES LA SOLUCIÓN CLAVE! */
}

/* Asegurar que el contenido del footer esté sobre el pseudo-elemento */
footer > * {
    position: relative;
    z-index: 1;
}

@keyframes gradient-anim-footer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animaciones de entrada más dramáticas */
section {
    animation: fadeInScale 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Efecto de gradiente en textos importantes */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ESTILO AGREGADO: Promociones vencidas con efecto de "derretido" */
.expired {
    filter: grayscale(100%) blur(2px);
    opacity: 0.6;
    position: relative;
    pointer-events: none;
    transform-style: preserve-3d;
    animation: melt 2s ease-in-out forwards;
    transition: var(--transition-slow);
}

@keyframes melt {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(10px) rotate(5deg) scale(0.95); opacity: 0.5; }
}

.expired:after {
    content: "¡VENCIDA!";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    background: var(--danger);
    color: white;
    font-weight: 900;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    z-index: 10;
    font-size: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: var(--shadow-md);
    animation: scale-up-and-rotate 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes scale-up-and-rotate {
    from { transform: translate(-50%, -50%) rotate(-15deg) scale(0.5); opacity: 0; }
    to { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
}

.expired .badge-today {
    z-index: 20;
}

/* Para evitar que el efecto borroso se aplique al contenido del modal */
.modal-content .expired {
    filter: none;
    opacity: 1;
    animation: none;
}

.modal-content .expired:after {
    display: none;
}

/* Estados de verificación con colores significativos */
.last-verified-recent {
    color: var(--recent) !important;
}

.last-verified-warning {
    color: var(--warning-state) !important;
}

.last-verified-old {
    color: var(--old-state) !important;
}

/* Botón "Ir arriba" flotante */
#scrollToTop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    z-index: 100;
}

#scrollToTop:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Banner de cookies más moderno y dinámico */
#cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 650px;
  background-color: var(--surface);
  color: var(--text-primary);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  font-family: 'Poppins', sans-serif;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  border-radius: var(--rounded-xl);
  border: 1px solid var(--border);
  animation: fadeInPopUp 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes fadeInPopUp {
    from { transform: translateX(-50%) translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

#cookie-banner .text-content {
    flex-grow: 1;
}

#cookie-banner h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#cookie-banner p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    color: var(--text-secondary);
}

#cookie-banner .button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#cookie-banner button {
  background: var(--primary);
  border: none;
  padding: 0.9rem 2rem;
  cursor: pointer;
  border-radius: var(--rounded-md);
  font-size: 1em;
  color: var(--text-contrast);
  font-weight: 700;
  transition: var(--transition-fast);
}

#cookie-banner button:hover {
  background: var(--primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-md);
}

#cookie-banner .accept-all {
    background: var(--secondary);
}

#cookie-banner .accept-all:hover {
    background: var(--secondary-dark);
}

.logo--blanco {
  filter: brightness(0) invert(1);
}

/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    .stats-number {
        font-size: 3rem;
    }
    
    .promo-card {
        min-width: 280px;
        scroll-snap-align: center;
    }

    .cta-section {
        padding: 2rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }
    
    #cookie-banner {
        width: 95%;
        padding: 1rem;
    }

    #cookie-banner .button-group {
        flex-direction: column;
        width: 100%;
    }

    #cookie-banner button {
        width: 100%;
    }
}

/* Enlaces del footer en tema claro */
footer a:not(.footer-link) {
    color: white !important;
    transition: color var(--transition-fast);
}

/* Hover para todos los enlaces del footer */
footer a:hover {
    color: #cbd5e1 !important; /* Color gris claro similar al de Instagram */
}

/* Mantener estilos para modo oscuro */
body.dark-mode footer a {
    color: var(--text-secondary) !important;
}

body.dark-mode footer a:hover {
    color: white !important;
}

footer a:not(.footer-link) {
    color: white !important;
}

footer a:hover {
    color: #cbd5e1 !important;
}

body.dark-mode footer a {
    color: var(--text-secondary) !important;
}

body.dark-mode footer a:hover {
    color: white !important;
}


@media (max-width: 768px) {
    .stats-number {
        font-size: 3rem;
    }
    
    .promo-card {
        min-width: 280px;
        scroll-snap-align: center;
    }
    
    #cookie-banner {
        width: 95%;
        padding: 1rem;
    }

}

/* Estilos para el badge "HOY" */
.highlight-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: linear-gradient(135deg, #FF8A00 0%, #E52E71 100%);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.5rem 2.5rem;
    text-align: center;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(45deg);
    transform-origin: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: badge-pulse 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 25% 50%);
    overflow: hidden;
}

/* Efecto de brillo en el badge */
.highlight-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    transition: all 0.6s ease;
    z-index: 1;
}

/* Animación del brillo al pasar el mouse */
.highlight-badge:hover::before {
    left: 150%;
}

/* Animación de pulsación */
@keyframes badge-pulse {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 
                    0 0 0 0 rgba(229, 46, 113, 0.4); 
    }
    50% { 
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 
                    0 0 0 10px rgba(229, 46, 113, 0); 
    }
}

/* Modo oscuro - ajustar colores */
body.dark-mode .highlight-badge {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: badge-pulse-dark 2s infinite;
}

@keyframes badge-pulse-dark {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 
                    0 0 0 0 rgba(255, 75, 43, 0.4); 
    }
    50% { 
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 
                    0 0 0 10px rgba(255, 75, 43, 0); 
    }
}

/* Ajuste para dispositivos móviles */
@media (max-width: 768px) {
    .highlight-badge {
        top: 10px;
        right: -35px;
        font-size: 0.75rem;
        padding: 0.4rem 2rem;
    }
}

/* Agrega esto al final de styles.css */
#installBtn {
  left: 1rem;
  bottom: 1rem;
  right: auto; /* Anula posición derecha */
}

#iosInstructions {
  left: 1rem;
  bottom: 5rem;
  right: auto; /* Anula posición derecha */
}

#scrollToTop {
  right: 1rem;
  bottom: 1rem;
  left: auto; /* Asegura posición derecha */
}

/* En móviles, ajustar posición para no cubrir la barra inferior */
@media (max-width: 768px) {
  #installBtn {
    bottom: 2rem; /* Encima de la barra de navegación */
  }
  
  #iosInstructions {
    bottom: 9rem;
  }
}

.text-xxs {
 font-size: 0.55rem; /* ~10.5px */
 line-height: 1rem;
          }
      
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.fc .fc-toolbar-title::first-letter {
  text-transform: uppercase;
}

/* Solución para el scroll en el popover del calendario */
.fc-popover {
  max-height: 60vh; /* Altura máxima: 60% de la altura de la ventana */
  overflow-y: auto; /* Muestra el scroll vertical solo si es necesario */
}

/* --- Skeleton Loading Animation --- */
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background); /* Usa el color de fondo del tema */
  z-index: 9999;
  padding: 1rem;
  overflow: hidden;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background-color: var(--border); /* Color base del esqueleto */
  border-radius: var(--rounded);
}

/* El efecto de brillo (shimmer) */
.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 1.5s infinite;
}

/* Adaptación del brillo para el modo oscuro */
body.dark-mode .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}


/* Formas y estructura del esqueleto */
.skeleton-header {
  height: 56px; /* Altura similar al header real */
  margin-bottom: 2rem;
}
.skeleton-card {
  height: 180px;
  margin-bottom: 1.5rem;
}
.skeleton-line {
  height: 1rem;
  margin-bottom: 0.75rem;
  width: 100%;
}
.skeleton-line-sm {
  width: 85%;
}
.skeleton-line-xs {
  width: 60%;
}
.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--rounded-full);
  margin-right: 1rem;
}