/* Estilos para la página de inicio de CardioSof y estilos globales */

:root {
    /* Paleta de colores base (light mode) */
    --primary: #4a90e2;
    --primary-dark: #3a7bd5; /* Tono más oscuro del primario para hover */
    --secondary: #50e3c2;
    --accent: #ff6b6b;
    --text: #333;
    --text-light: #6c757d;
    --bg: #eef2f7;
    --card-bg: #eef2f7;
    --shadow-light: rgba(255, 255, 255, 0.9);
    --shadow-dark: rgba(163, 177, 198, 0.6);
    --success: #28a745;
    --warning: #ff9800;
    --danger: #d9534f;
    --white-color: #ffffff; /* Añadido de style.css */
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Modo oscuro */
    --dark-bg: #121826;
    --dark-card: #1e293b;
    --dark-text: #f8fafc;
    --dark-text-light: #cbd5e1;
    --dark-shadow-light: #0f172a;
    --dark-shadow-dark: #334155;

    --font-family: 'Poppins', sans-serif; /* Añadido de style.css */
    --calendar-icon-invert-filter: 0; /* Por defecto, no invertir para tema claro */
}

.dark-mode {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --secondary: #34d399;
    --accent: #f87171;
    --text: var(--dark-text);
    --text-light: var(--dark-text-light);
    --bg: var(--dark-bg);
    --card-bg: var(--dark-card);
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    font-family: var(--font-family); /* Usar variable */
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 60px;
    transition: background 0.4s, color 0.4s;
    line-height: 1.7; /* Añadido de style.css */
}

/* --- Estilos Neomorfistas Generales (Consolidados de landing.css y style.css) --- */
.neomorph, .neumorph-card { /* Combinado */
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow:  8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    border: none;
    transition: var(--transition);
    padding: 2rem; /* Añadido de neumorph-card */
}

.neomorph:hover, .neumorph-card:hover { /* Combinado */
    box-shadow:  4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    transform: translateY(-5px);
}

.neumorph-card-inset { /* De style.css */
    background-color: var(--card-bg); /* Usar variable */
    border-radius: 20px;
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light); /* Usar variables */
    padding: 1.5rem;
}

.btn-neomorph, .neumorph-button { /* Combinado */
    border-radius: 15px; /* Ajustado de 10px a 15px para consistencia con btn-neomorph */
    background: var(--card-bg);
    box-shadow:  5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    border: none;
    padding: 12px 28px; /* Ajustado de 24px a 28px para consistencia con btn-neomorph */
    color: var(--primary); /* Usar variable */
    transition: var(--transition);
    font-weight: 600;
}

.btn-neomorph:hover, .neumorph-button:hover { /* Combinado */
    box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
    color: var(--primary-dark); /* Ajustado para usar variable */
}

.btn-neomorph:active, .neumorph-button:active, .neumorph-button.active { /* Combinado */
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

.btn-primary-neomorph {
    background: var(--primary);
    color: var(--white-color); /* Usar variable */
    font-weight: 600;
    box-shadow:  5px 5px 15px rgba(74, 144, 226, 0.4);
}

.btn-primary-neomorph:hover {
    background: var(--primary-dark);
    color: var(--white-color); /* Usar variable */
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.2), inset -2px -2px 5px rgba(255,255,255,0.2);
}

.form-control-neumorph { /* De style.css */
    background-color: var(--card-bg) !important; /* Usar variable */
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 20px !important;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light) !important; /* Usar variables */
    color: var(--text) !important; /* Usar variable */
    transition: box-shadow 0.3s ease;
}

.form-control-neumorph::placeholder { /* Estilo para el placeholder */
    color: var(--text-light) !important; /* Usar variable para el color del texto ligero */
    opacity: 1; /* Asegurar que el placeholder no sea transparente */
}

.form-control-neumorph::-webkit-input-placeholder { /* Para navegadores basados en Webkit */
    color: var(--text-light) !important;
    opacity: 1;
}

.form-control-neumorph::-moz-placeholder { /* Para Firefox */
    color: var(--text-light) !important;
    opacity: 1;
}

.form-control-neumorph:-ms-input-placeholder { /* Para Internet Explorer */
    color: var(--text-light) !important;
    opacity: 1;
}

.form-control-neumorph:focus {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light), 0 0 0 2px var(--primary) !important; /* Usar variable */
    outline: none;
}



/* Estilo para el input de tipo date con icono personalizado */
::-webkit-calendar-picker-indicator {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="%23bbbbbb" d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>');
}
/* --- Navbar --- */
.navbar {
    background: transparent !important;
    padding: 20px 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark-mode .navbar-brand { color: var(--primary) !important; }
.dark-mode .nav-link { color: var(--dark-text) !important; }
.dark-mode .nav-link:hover, .dark-mode .nav-link.active {
     background: linear-gradient(145deg, var(--dark-shadow-dark), var(--dark-shadow-light));
}

.nav-link {
    color: var(--text) !important;
    font-weight: 500;
    margin: 0 8px;
    border-radius: 15px;
    padding: 10px 18px !important;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background: linear-gradient(145deg, #dce3ec, var(--white-color)); /* Usar variable */
}

.navbar-toggler-icon {
    /* Default color for light mode (Bootstrap's default is usually dark) */
    /* No specific filter needed for light mode if Bootstrap's default is fine */
}

.dark-mode .navbar-toggler-icon {
    filter: invert(1) hue-rotate(180deg); /* Invert colors for dark mode */
}


/* --- Theme Switcher --- */
.theme-switch-wrapper { display: flex; align-items: center; margin-left: 15px; }
.theme-switch { display: inline-block; height: 34px; position: relative; width: 60px; }
.theme-switch input { display: none; }
.slider { background: var(--card-bg); box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: var(--transition); border-radius: 34px; }
.slider:before { background: var(--primary); bottom: 4px; content: ""; height: 26px; left: 4px; position: absolute; transition: var(--transition); width: 26px; border-radius: 50%; }
input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(26px); background: var(--white-color); } /* Usar variable */
.slider i { position: absolute; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text); }
.slider .fa-sun { left: 8px; }
.slider .fa-moon { right: 8px; color: var(--dark-text); }
.dark-mode .slider .fa-moon { color: var(--text); }


/* --- Hero Section (landing.css specific) --- */
.hero { padding: 100px 0 60px; }
.hero h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; color: var(--text-light); }
.hero-img-container { position: relative; max-width: 600px; margin: 0 auto; min-height: 350px; }

/* Estilos del carrusel */
.hero-carousel {
    position: absolute; /* Position carousel absolutely within container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.hero-img-container { position: relative; max-width: 600px; margin: 0 auto; min-height: 350px; }

/* Estilos del carrusel */
.hero-carousel {
    position: absolute; /* Position carousel absolutely within container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.hero-carousel .hero-img {
    position: absolute;
    top: 0;
    left: 4px;
    width: 98%;
    height: 98%;
    max-width: 98%;
    max-height: 98%;
    object-fit: cover;
    border-radius: 20px;
    background-color: var(--card-bg);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}
.hero-carousel .hero-img.active {
    opacity: 1; /* Show active image */
    z-index: 2; /* Active image on top */
}
.hero-carousel .hero-img.active {
    opacity: 1; /* Show active image */
    z-index: 2; /* Active image on top */
}

/* --- Warning Section (landing.css specific) --- */
.warning-section { background: linear-gradient(135deg, rgba(255, 248, 225, 0.3) 0%, rgba(255, 243, 224, 0.3) 100%); border-radius: 20px; padding: 25px; margin: 40px 0; border-left: 5px solid var(--warning); }
.dark-mode .warning-section { background: linear-gradient(135deg, rgba(255, 248, 225, 0.1) 0%, rgba(255, 243, 224, 0.1) 100%); }
.warning-icon { color: var(--warning); font-size: 2.5rem; margin-right: 20px; }

/* --- Feature Cards (landing.css specific) --- */
.feature-icon { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; background: var(--card-bg); box-shadow:  5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light); font-size: 2rem; color: var(--primary); }
.feature-card { height: 100%; padding: 30px 20px; border-radius: 20px; }

/* --- Steps Section (landing.css specific) --- */
.steps-section { padding: 80px 0; }
.step-item { display: flex; margin-bottom: 30px; align-items: flex-start; }
.step-number { width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: var(--white-color); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.5rem; margin-right: 20px; flex-shrink: 0; }
.step-content h3 { color: var(--text); margin-bottom: 10px; }
.step-content p { color: var(--text-light); margin-bottom: 0; }

/* --- About Section (landing.css specific) --- */
.about-section {
    background-color: #f8f9fa; /* Color claro de Bootstrap por defecto */
    transition: background-color 0.4s;
}

.dark-mode .about-section {
    background-color: var(--dark-bg);
}

/* --- Footer (landing.css specific) --- */
footer { background: #2c3e50; color: #f8fafc; padding: 60px 0 20px; margin-top: 60px; border-radius: 30px 30px 0 0; }
.dark-mode footer { background: #0f172a; }
.footer-links h5 { color: var(--white-color); margin-bottom: 20px; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--dark-text-light); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--white-color); }
.social-icon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); color: var(--white-color); margin-right: 10px; transition: var(--transition); }
.social-icon:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 40px; }
.footer-bottom p { color: var(--dark-text-light) !important; } /* Asegurar que el texto del footer sea legible en dark mode */


/* --- Animaciones (landing.css specific) --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.8s ease forwards; animation-play-state: paused; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* --- Responsividad (Consolidado de landing.css y style.css) --- */
@media (max-width: 991.98px) { /* Usar el breakpoint más amplio de style.css */
    .navbar-collapse { background: var(--card-bg); border-radius: 20px; padding: 20px; margin-top: 15px; box-shadow: 5px 5px 15px var(--shadow-dark), -5px -5px 15px var(--shadow-light); }
    
    /* Sidebar responsivity from style.css */
    .sidebar {
        left: -280px;
        transition: left 0.3s ease-in-out;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar.active {
        left: 0;
    }
}

/* Media query para pantallas más pequeñas (ej. móviles) */
@media (max-width: 767.98px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    .hero-img-container { min-height: 250px; }
    .warning-section { margin: 20px 0; padding: 15px; }
    .warning-icon { font-size: 2.5rem; margin-right: 10px; }
    .feature-card { padding: 20px 15px; }
    .feature-icon { width: 60px; height: 60px; font-size: 1.5rem; margin-bottom: 15px; }
    .steps-section { padding: 40px 0; }
    .step-item { flex-direction: column; align-items: center; text-align: center; }
    .step-number { margin-right: 0; margin-bottom: 15px; }
    .step-content h3 { color: var(--text); margin-bottom: 10px; }
    .step-content p { color: var(--text-light); margin-bottom: 0; }
    .about-section .row { flex-direction: column-reverse; } /* Invertir orden en móviles */
    .about-section .col-lg-6 { margin-bottom: 20px; }
    footer { padding: 30px 0 15px; margin-top: 30px; }
    .footer-links h5 { margin-bottom: 10px; }
    .footer-bottom { padding-top: 15px; margin-top: 20px; }
}

/* Estilos para tablas en modo oscuro */
.dark-mode .table {
    --bs-table-color: var(--dark-text); /* Color del texto de la tabla */
    --bs-table-bg: var(--dark-card); /* Fondo de la tabla */
    --bs-table-border-color: var(--dark-shadow-dark); /* Color del borde de la tabla */
    --bs-table-striped-bg: var(--dark-bg); /* Fondo de filas impares (striped) */
    --bs-table-striped-color: var(--dark-text); /* Color del texto de filas impares */
    --bs-table-active-bg: var(--dark-shadow-dark); /* Fondo de fila activa/hover */
    --bs-table-active-color: var(--dark-text); /* Color del texto de fila activa/hover */
    --bs-table-hover-bg: var(--dark-shadow-dark); /* Fondo de fila al pasar el ratón */
    --bs-table-hover-color: var(--dark-text); /* Color del texto de fila al pasar el ratón */
}

.dark-mode .table-hover tbody tr:hover {
    color: var(--bs-table-hover-color);
    background-color: var(--bs-table-hover-bg);
}

.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
}

.dark-mode .table thead {
    color: var(--dark-text);
    background-color: var(--dark-card);
    border-bottom: 1px solid var(--dark-shadow-dark);
}

.dark-mode .table th,
.dark-mode .table td {
    border-color: var(--dark-shadow-dark);
}

/* Estilos para Tagify con Neumorfismo y compatibilidad con Dark Mode */
.tagify {
    background-color: var(--card-bg);
    border: none;
    border-radius: 10px; /* Consistente con form-control-neumorph */
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    color: var(--text);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    padding: 8px 12px; /* Ajustar padding para que se vea bien */
}

.tagify:focus-within {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light), 0 0 0 2px var(--primary);
    outline: none;
}

.tagify__tag {
    background-color: var(--primary); /* Color primario para las etiquetas */
    color: var(--white-color); /* Texto blanco para las etiquetas */
    border-radius: 8px;
    padding: 4px 8px;
    margin: 3px;
    display: inline-flex;
    align-items: center;
    box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.tagify__tag:hover {
    background-color: var(--primary-dark);
    box-shadow: inset 1px 1px 2px var(--shadow-dark), inset -1px -1px 2px var(--shadow-light);
}

.tagify__tag__removeBtn {
    color: var(--white-color);
    opacity: 0.7;
    margin-left: 5px;
    transition: opacity 0.3s ease;
}

.tagify__tag__removeBtn:hover {
    opacity: 1;
}

.tagify__input {
    color: var(--text);
    background-color: transparent; /* El fondo lo da el contenedor .tagify */
    /* Eliminar cualquier borde o sombra que Tagify pueda añadir por defecto al input */
    border: none !important;
    box-shadow: none !important;
}

.tagify__input::placeholder {
    color: var(--text-light);
    opacity: 1;
}

/* Ajustes para el modo oscuro */
.dark-mode .tagify__tag {
    background-color: var(--primary); /* Asegurar que el color primario se adapte */
    color: var(--dark-text); /* O un color que contraste bien en dark mode */
    box-shadow: 2px 2px 4px var(--dark-shadow-dark), -2px -2px 4px var(--dark-shadow-light);
}

.dark-mode .tagify__tag:hover {
    background-color: var(--primary-dark);
    box-shadow: inset 1px 1px 2px var(--dark-shadow-dark), inset -1px -1px 2px var(--dark-shadow-light);
}

.dark-mode .tagify__tag__removeBtn {
    color: var(--dark-text);
}

.tagify__tag>div::before {
    inset: unset !important;
}



/* Ajustes para pantallas pequeñas (iPhone 12 Pro y similares) */
@media (max-width: 420px) {
  /* Ajustes generales del contenido */
  .main-content {
    padding: 0.5rem !important;
    width: 100% !important;
    overflow-x: hidden;
  }
  
  /* Tarjetas neumórficas */
  .neumorph-card {
    padding: 1rem !important;
    margin: 0.5rem 0 !important;
  }
  
  /* Formularios */
  .form-control-neumorph {
    padding: 12px 10px !important;
    font-size: 15px !important;
  }
  
  /* Columnas (para que ocupen todo el ancho) */
  .col-md-6 {
    width: 100% !important;
    padding: 0 !important;
  }
  
  /* Botones */
  .btn, .btn-primary {
    padding: 12px !important;
    font-size: 15px !important;
    
  }
  
  /* Textos */
  h1 {
    font-size: 1.8rem !important;
    margin-bottom: 1rem !important;
  }
  
  h4 {
    font-size: 1.3rem !important;
  }
  
  /* Tabla de historial */
  #measurements-history-table {
    font-size: 14px;
    overflow-x: auto;
    display: block;
    -webkit-overflow-scrolling: touch;
  }
  
  .col-6 {
    width: 100%;
  }
}



/* ========== INICIO DE NUEVOS ESTILOS PARA MÓVIL ========== */
/* Ajustes para pantallas pequeñas (iPhone 12 Pro y similares) */
@media (max-width: 420px) {
  /* Ajustes generales del contenido */
  .main-content {
    padding: 0.5rem !important;
    width: 100% !important;
  }
  
  /* Tarjetas neumórficas */
  .neumorph-card {
    padding: 1rem !important;
    margin: 0.5rem 0 !important;
  }
  
  /* Formularios */
  .form-control-neumorph {
    padding: 12px 10px !important;
    font-size: 15px !important;
  }
  
  /* Columnas (para que ocupen todo el ancho) */
  .col-md-6 {
    width: 100% !important;
    padding: 0 !important;
  }
  
  /* Botones */
  .btn, .btn-primary {
    padding: 12px !important;
    font-size: 15px !important;
  }
  
  /* Textos */
  h1 {
    font-size: 1.8rem !important;
    margin-bottom: 1rem !important;
  }
  
  h4 {
    font-size: 1.3rem !important;
  }
  
  /* Tabla de historial */
  #measurements-history-table {
    font-size: 14px;
    overflow-x: auto;
    display: block;
    -webkit-overflow-scrolling: touch;
  }
  
  .col-6 {
    width: 100%;
}
  
}

/* Prevenir desbordamiento en todos los móviles */
@media (max-width: 991.98px) {
  body {
    overflow-x: hidden;
  }
  
  .main-content {
    max-width: 100vw;
  }
}
/* ========== FIN DE NUEVOS ESTILOS PARA MÓVIL ========== */

/* Estilos para list-group-item en modo oscuro */
.dark-mode .list-group-item {
    background-color: var(--dark-card);
    color: var(--dark-text);
    border-color: var(--dark-shadow-dark);
}

/* Estilos para text-muted en modo oscuro */
.dark-mode .text-muted {
    color: var(--dark-text-light) !important;
}

/* --- Dropdown Menu Styles --- */

/* Estilos para Dropdown Menu (Modo Claro) */
.dropdown-menu {
    background-color: var(--card-bg);
    border: none;
    box-shadow: 5px 5px 15px var(--shadow-dark), -5px -5px 15px var(--shadow-light);
    border-radius: 15px; /* Consistencia con otros elementos */
    padding: 0.5rem 0;
}

.dropdown-item {
    color: var(--text);
    padding: 10px 20px; /* Espaciado consistente */
    transition: background-color 0.3s, color 0.3s;
    background-color: transparent;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #dce3ec; /* Un color sutil de hover */
    color: var(--text);
}

/* Estilos para Dropdown Menu en modo oscuro */
.dark-mode .dropdown-menu {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-shadow-dark);
    box-shadow: 5px 5px 15px var(--dark-shadow-dark);
}

.dark-mode .dropdown-item {
    color: var(--dark-text);
}

.dark-mode .dropdown-item:hover, .dark-mode .dropdown-item:focus {
    background-color: var(--dark-shadow-light);
    color: var(--dark-text);
}

.dark-mode .dropdown-divider {
    border-top: 1px solid var(--dark-shadow-dark);
}

/* Ensure long words break within content */
header .neo h1,
main .neomorph article h1,
main .neomorph article h2,
main .neomorph article p,
main .neomorph article li {
    overflow-wrap: break-word;
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    color: var(--text);
    font-size: 0.9rem;
}

.cookie-consent-banner a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.cookie-consent-banner a:hover {
    text-decoration: underline;
}

.cookie-consent-banner button {
    /* Reusing neumorphic button styles */
    border-radius: 15px;
    background: var(--card-bg);
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    border: none;
    padding: 10px 20px;
    color: var(--primary);
    transition: var(--transition);
    font-weight: 600;
    cursor: pointer;
}

.cookie-consent-banner button:hover {
    box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
    color: var(--primary-dark);
}

.cookie-consent-banner button:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

/* Dark mode adjustments */
.dark-mode .cookie-consent-banner {
    background: var(--dark-card);
    color: var(--dark-text);
}

.dark-mode .cookie-consent-banner button {
    background: var(--dark-card);
    box-shadow: 5px 5px 10px var(--dark-shadow-dark), -5px -5px 10px var(--dark-shadow-light);
    color: var(--primary);
}

.dark-mode .cookie-consent-banner button:hover {
    box-shadow: inset 5px 5px 10px var(--dark-shadow-dark), inset -5px -5px 10px var(--dark-shadow-light);
    color: var(--primary-dark);
}

.neo{
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    border: none;
}




.fodongo pre.diagram{
    background:#0c2445; color:#eaf1ff; padding:14px; border-radius:10px; overflow:auto; font-family:monospace;
}

.fodongo body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.fodongo .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.fodongo header {
    background-color: var(--primary);
    color: var(--white-color);
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.fodongo .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fodongo .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fodongo .logo i {
    font-size: 2rem;
}

.fodongo .logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.fodongo nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.fodongo nav a {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 8px;
}

.fodongo nav a:hover, .fodongo nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.fodongo .hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white-color);
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.fodongo .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.05"><text x="50%" y="50%" font-size="80" text-anchor="middle" dominant-baseline="middle" fill="white">☮</text></svg>');
    opacity: 0.1;
}

.fodongo .hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    position: relative;
}

.fodongo .hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px;
    position: relative;
}

.fodongo .btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white-color);
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.fodongo .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Card Styles */
.fodongo .card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.fodongo .card:hover {
    transform: translateY(-5px);
}

.fodongo .card h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
}

.fodongo .card h4 {
    color: var(--secondary);
    margin: 20px 0 15px;
    font-size: 1.3rem;
}

.fodongo .card-icon {
    font-size: 2.8rem;
    color: var(--secondary);
    margin-bottom: 20px;
    text-align: center;
}

/* Section Styles */
.fodongo .section-title {
    text-align: center;
    margin: 50px 0 40px;
    color: var(--primary);
    font-size: 2.3rem;
    position: relative;
}

.fodongo .section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto;
    border-radius: 2px;
}

.fodongo .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Info Section */
.fodongo .info-section {
    margin: 60px 0;
}

.fodongo .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Table Styles */
.fodongo .wellness-table, .fodongo .nutrition-table, .fodongo .tech-table, .fodongo .exercise-table, .fodongo .guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

.fodongo .wellness-table th, .fodongo .wellness-table td, 
.fodongo .nutrition-table th, .fodongo .nutrition-table td, 
.fodongo .tech-table th, .fodongo .tech-table td, 
.fodongo .exercise-table th, .fodongo .exercise-table td, 
.fodongo .guide-table th, .fodongo .guide-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: var(--text);
}

.fodongo .wellness-table th, 
.fodongo .nutrition-table th, 
.fodongo .tech-table th, 
.fodongo .exercise-table th, 
.fodongo .guide-table th {
    background-color: var(--primary);
    color: var(--white-color);
    font-weight: 600;
}

.fodongo .wellness-table tr:hover, 
.fodongo .nutrition-table tr:hover, 
.fodongo .tech-table tr:hover, 
.fodongo .exercise-table tr:hover, 
.fodongo .guide-table tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Tabs */
.fodongo .tabs {
    display: flex;
    flex-wrap: wrap;
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.fodongo .tab {
    padding: 15px 25px;
    background: var(--card-bg);
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}


.fodongo .tab:hover {
    background: linear-gradient(145deg, #dce3ec, var(--white-color));
}

.dark-mode .fodongo .tab:hover, .dark-mode .fodongo .tab.active {
    background: linear-gradient(145deg, var(--dark-shadow-dark), var(--dark-shadow-light));
}




.fodongo .tab.active {
    border-bottom: 3px solid var(--accent);
    font-weight: 600;
}

.fodongo .tab-content {
    display: none;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 0 0 16px 16px;
}

.fodongo .tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Footer */
.fodongo footer {
    background-color: var(--primary);
    color: var(--white-color);
    padding: 50px 0 25px;
    margin-top: 70px;
}

.fodongo .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 35px;
    margin-bottom: 35px;
}

.fodongo .footer-section h3 {
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.fodongo .footer-section p, .fodongo .footer-section a {
    margin-bottom: 12px;
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.fodongo .footer-section a:hover {
    color: var(--white-color);
}

.fodongo .social-icons {
    display: flex;
    gap: 18px;
    margin-top: 18px;
}

.fodongo .social-icons a {
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.fodongo .social-icons a:hover {
    transform: translateY(-3px);
}

.fodongo .copyright {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: var(--white-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Wellness specific styles */
.fodongo .technique-demo {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: var(--shadow-light);
}

.fodongo .technique-demo h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

.fodongo .steps {
    padding-left: 20px;
    margin: 15px 0;
}

.fodongo .steps li {
    margin-bottom: 10px;
}

.fodongo .progress-container {
    background: var(--white-color);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: var(--shadow-light);
}

.fodongo .progress-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.fodongo .progress-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Tech specific styles */
.fodongo .tech-demo, .fodongo .exercise-demo {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.fodongo .tech-demo h4, .fodongo .exercise-demo h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

.fodongo .comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.fodongo .comparison-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

/* Timeline */
.fodongo .timeline {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
}

.fodongo .timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.fodongo .timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.fodongo .timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: var(--white-color);
    border: 4px solid var(--accent);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.fodongo .left {
    left: 0;
    text-align: right;
}

.fodongo .right {
    left: 50%;
}

.fodongo .left::after {
    right: -13px;
}

.fodongo .right::after {
    left: -13px;
}

.fodongo .timeline-content {
    padding: 20px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 16px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

/* Exercise specific styles */
.fodongo .intensity-indicator {
    display: flex;
    margin: 15px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.fodongo .intensity-level {
    flex: 1;
    padding: 10px;
    text-align: center;
    color: var(--white-color);
    font-weight: 600;
}

/* Guide specific styles */
.fodongo .algorithm {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: var(--shadow-light);
}

.fodongo .algorithm h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

.fodongo .reference {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-light);
    margin-top: 10px;
}

/* Text color styles */
.fodongo p {
    color: var(--text);
}

.fodongo dl, .fodongo ol, .fodongo ul {
    color: var(--text) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fodongo .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .fodongo nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .fodongo .hero h2 {
        font-size: 2.2rem;
    }
    
    .fodongo .hero p {
        font-size: 1.1rem;
    }
    
    .fodongo .wellness-table, .fodongo .nutrition-table, .fodongo .tech-table, .fodongo .exercise-table, .fodongo .guide-table {
        display: block;
        overflow-x: auto;
    }

    .fodongo .tabs {
        flex-direction: column;
    }

    .fodongo .comparison {
        grid-template-columns: 1fr;
    }

    .fodongo .timeline::after {
        left: 31px;
    }

    .fodongo .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .fodongo .timeline-item::after {
        left: 18px;
    }

    .fodongo .left, .fodongo .right {
        left: 0;
        text-align: left;
    }

    .fodongo .intensity-indicator {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .fodongo .logo h1 {
        font-size: 1.5rem;
    }
    
    .fodongo nav ul {
        gap: 10px;
    }
    
    .fodongo .hero h2 {
        font-size: 1.9rem;
    }

    .fodongo .section-title {
        font-size: 1.9rem;
    }

    .fodongo .card {
        padding: 20px;
    }
}


/* ========== Sistema de Búsqueda ========== */

/* --- Botón de Búsqueda en la Barra de Navegación --- */
.search-button {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: auto; /* Empuja el botón a la derecha en el nav */
}

.search-button:hover {
    color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.search-button svg {
    width: 20px;
    height: 20px;
}

/* --- Contenedor Principal de Búsqueda (Overlay) --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    display: block; /* Cambiado de none a block */
    visibility: hidden; /* Oculto por defecto */
    opacity: 0;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    backdrop-filter: blur(5px);
    transition: visibility 0s linear 0.3s, opacity 0.3s linear; /* Transición para suavizar */
}

.search-overlay.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s; /* Sin retraso al activarse */
}

.search-overlay.active {
    display: flex;
}

/* --- Contenedor del Buscador --- */
.search-container {
    width: 90%;
    max-width: 600px;
    background-color: var(--bg);
    border-radius: 20px;
    border: 1px solid #81d258;
    padding: 1.5rem;
    position: relative;
    animation: slide-down 0.4s ease-out;
}

@keyframes slide-down {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Campo de Entrada --- */
.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px; /* Espacio para el ícono */
    border: none;
    border-radius: 15px;
    background-color: var(--bg);
    color: var(--text);
    font-size: 1.1rem;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    outline: none;
    transition: all 0.3s ease;
}

.search-input-wrapper svg {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 20px;
    height: 20px;
}

/* --- Resultados de Búsqueda --- */
.search-results {
    margin-top: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px; /* Para que la barra de scroll no se pegue */
}

.search-result-item {
    padding: 15px;
    margin-bottom: 1rem;
    border-radius: 10px;
    background-color: var(--card-bg);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    text-decoration: none;
    display: block;
    color: var(--text);
    transition: all 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    color: var(--primary);
}

.search-result-item h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.search-result-item p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.search-result-item mark {
    background-color: var(--primary-light);
    color: var(--text);
    padding: 2px 3px;
    border-radius: 3px;
    font-weight: bold;
}

/* --- Mensaje de "No Resultados" --- */
.no-results-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* --- Botón de Cierre --- */
.search-close-button {
    position: absolute;
    top: 1px;
    right: 5px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-close-button:hover {
    color: var(--danger);
}

/* --- Responsividad --- */
@media (max-width: 768px) {
    .search-container {
        padding: 1rem;
    }
    .search-input {
        padding: 12px 15px;
        padding-left: 45px;
        font-size: 1rem;
    }
    .search-input-wrapper svg {
        left: 15px;
    }
}

/* --- Botón Flotante Doctor Dashboard --- */
.floating-doctor-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 60px;
    height: 60px;
    background-color: #0d6efd; /* Azul primario de Bootstrap */
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    line-height: 60px; /* Para centrar el ícono verticalmente */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    transition: all 0.3s ease-in-out;
}

.floating-doctor-btn:hover {
    background-color: #0b5ed7; /* Tono más oscuro al pasar el mouse */
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}