:root {
    --primary: #569EF0;
    --primary-dark: #2a75c0;
    --text: #333;
    --bg-body: #F4F6F8;
    --bg-sidebar: #2C3E50;
    --white: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    overflow-x: hidden;
}

/* SIDEBAR */
#sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-sidebar, #2C3E50);
    z-index: 1000;
    transition: transform 0.3s ease-in-out; /* Animación suave */
    display: flex;
    flex-direction: column;
}

/* Desktop toggled (hidden) */
body.sidebar-toggled #sidebar {
    transform: translateX(-100%);
}
body.sidebar-toggled main {
    margin-left: 0;
    width: 100%;
}
body.sidebar-toggled .fixed-nav-bar {
    width: 100%;
}

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Botón flotante */
.toggle-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    padding: 10px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.sidebar-spacer {
    flex-grow: 1;
}

.sidebar-logo-container {
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
    background: var(--white);
    border-radius: 0;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

#brand-logo {
    max-height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    padding-bottom: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 70px 20px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    text-align: left;
}

.course-icon-circle {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.course-icon-circle i {
    color: var(--primary);
    font-size: 1.5rem;
}

.course-icon-circle img {
    width: 60%;
    height: auto;
}

.header-text h3 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.2;
    color: var(--white);
}

.header-text p {
    font-size: 0.8rem;
    margin: 3px 0 0 0;
    opacity: 0.7;
    font-weight: normal;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    padding: 15px 30px;
    cursor: pointer;
    color: #b0c4de;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.nav-links li:hover,
.nav-links li.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border-left-color: var(--primary);
}

/* MAIN */
main {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    position: relative;
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

h2 + p {
    margin-block: 20px;
}

h3 + p {
    margin-block: 10px;
}



.container ul {
    list-style-type: disc !important; /* Fuerza a que salgan los puntos */
    padding-left: 40px !important;    /* Empuja la lista a la derecha para que se vea */
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.container li {
    margin-bottom: 8px;   /* Espacio entre cada punto de la lista */
    line-height: 1.6;     /* Legibilidad para formación de adultos */
}

/* SECCIONES (El arreglo del espacio vacío) */
section {
    display: none;
    padding: 40px 20px;
    /* Padding controlado, NO 100vh */
    animation: fadeIn 0.5s ease-out;
}

section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 800px;
    margin: auto;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* PORTADA */
.hero-wrapper {
    position: relative;
    height: 80vh;
    background: url('assets/img/portada.png') center/cover;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 20px;
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 20px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
}

/* ================================================================
   RECURSO: SLIDER 
   ================================================================ */

.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-block: 40px; /* Espacio generoso arriba y abajo */
    overflow: hidden;
    border-radius: 12px; /* Un toque más moderno */
}

.slider-track {
    display: flex;
    align-items: stretch; /* Hace que todas las tarjetas midan lo mismo de alto */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.slider-card {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    background: var(--white, #ffffff);
    padding: 60px 80px; /* Mucho aire para que las flechas no pisen el texto */
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Icono superior de la tarjeta */
.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Título de la tarjeta (h3) */
.slider-card h3 {
    margin-top: 0;
    margin-bottom: 15px; /* Espacio controlado con el párrafo */
    color: #333;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Texto de la tarjeta (p) */
.slider-card p {
    margin: 0 auto;
    max-width: 800px; /* Evita líneas demasiado largas en pantallas de PC */
    line-height: 1.7;
    color: #555;
    font-size: 1.05rem;
}

/* Botones de navegación */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white; /* Fondo blanco para que destaque sobre el track */
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background: var(--primary);
    color: white;
    scale: 1.1;
}

.slider-arrow.prev {
    left: 15px;
}

.slider-arrow.next {
    right: 15px;
}

/* Ajustes para móvil (Lectura en tablets/móviles) */
@media (max-width: 768px) {
    .slider-card {
        padding: 60px 40px; /* Reducimos padding lateral */
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
    }
}

/* TABS (MEJORADAS) */
.tabs-container {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #777;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tabs-content {
    padding: 30px;
    background: var(--white);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-pane.active {
    display: block;
}

/* ACORDEÓN (MEJORADO) */
/* Contenedor principal */

.accordion-container {
    margin-block: 40px;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
}

.accordion-item {
    border-bottom: 1px solid #eee;
}

.accordion-item:last-child {
    border-bottom: none;
}

/* Cabecera del acordeón */
.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    color: #333;
    transition: color 0.3s;
}

.accordion-header:hover {
    color: var(--primary, #007bff);
}

/* Icono */
.accordion-header i {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

/* Estilos cuando está ACTIVO */
.accordion-item.active .accordion-header {
    color: var(--primary, #007bff);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* Cuerpo del acordeón (El truco de la animación) */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1); /* Animación suave de apertura */
}

.accordion-item.active .accordion-body {
    max-height: 1000px; /* Un valor lo bastante alto */
    transition: max-height 0.4s ease-in;
}

.accordion-content {
    padding: 0 10px 20px 10px;
    line-height: 1.6;
    color: #555;
}

/* BARRA DE NAVEGACIÓN FIJA (STICKY FOOTER) */
.fixed-nav-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    width: calc(100% - 280px);
    /* Resta el sidebar */
    background: var(--white);
    border-top: 1px solid #e0e0e0;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 900;
    transition: width 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .fixed-nav-bar {
        width: 100%;
        padding: 15px 20px;
    }
}

/* Espacio extra al final del contenido */
main {
    padding-bottom: 100px !important;
}

.fixed-nav-bar button {
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fixed-nav-bar button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.fixed-nav-bar button:disabled,
.fixed-nav-bar button[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

    main {
        margin-left: 0;
        width: 100%;
    }

    /* Mobile toggled (visible) */
    body.sidebar-toggled #sidebar {
        transform: translateX(0);
    }

    body.sidebar-toggled #sidebar-overlay {
        display: block;
    }

    /* Responsive adjustments */
    .card, .audio-player-card {
        padding: 20px !important;
    }

    .hero-wrapper {
        margin: 10px;
        height: auto;
        min-height: 70vh;
        padding: 40px 10px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }

    .fixed-nav-bar button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .nav-links li {
        padding: 15px 20px;
    }
}

/* Highlight Card */
.highlight-card {
    display: flex;
    flex-wrap: wrap;       /* Permite que los elementos bajen a la siguiente línea */
    align-items: center;   /* Alinea verticalmente icono y h3 */
    gap: 15px;             /* Espacio entre icono y texto */
    padding: 20px;         /* Aire interno para que no pegue a los bordes */
    margin: 30px 0;
    border-left: 6px solid var(--primary);
    background: var(--white);
}

.highlight-icon {
    font-size: 2rem;
    color: var(--primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* IMPORTANTE: Usamos display: contents para que el h3 y el p 
   se comporten como hijos directos del flex principal */
.highlight-content {
    display: contents; 
}

.highlight-content h3 {
    margin: 0;             /* Quitamos márgenes para que se alinee con el icono */
    color: var(--primary);
    font-size: 1.2rem;
    flex-grow: 1;          /* Hace que el título ocupe el espacio sobrante al lado del icono */
}

.highlight-content p {
    width: 100%;           /* Forzamos al párrafo a saltar de línea y ocupar todo el ancho */
    margin-top: 8px;      /* Espacio entre el título/icono y el texto */
    margin-bottom: 0;
    font-weight: 400;      /* 600 era quizás demasiado grueso para lectura larga */
    color: #555;
    line-height: 1.6;
}

/* EVALUACIÓN FINAL (QUIZ) - ESTILO RISE MODERNIZADO */
#quiz-container,
#quiz-results {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

/* Pregunta */
#quiz-container h3,
.question-text {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    font-weight: 700;
}

/* Contenedor de opciones */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

/* Botones de las Opciones (Transformación Moderno) */
.option-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: #f8f9fa;
    /* Gris muy clarito */
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
}

.option-btn:hover {
    border-color: var(--primary);
    background: white;
    transform: translateX(5px);
}

.option-btn.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: bold;
}

/* Botones de Navegación del Quiz */
.quiz-nav {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.btn-retry {
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 10px 25px;
    margin-top: 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-retry:hover {
    background: var(--primary);
}

.quiz-btn {
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.quiz-btn:hover {
    background: var(--primary);
}

.btn-prev {
    background: #e9ecef;
    color: #666;
}

.btn-prev:hover {
    background: #dee2e6;
}

/* Resultados Gamificados */
#quiz-results {
    padding: 40px;
    text-align: center;
}

.result-icon {
    font-size: 5rem;
    display: block;
    margin: 20px auto;
    text-align: center;
}

.icon-success {
    color: #2ecc71;
    animation: bounce 1s infinite;
}

.icon-fail {
    color: #e74c3c;
    animation: shake 0.5s;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* CONFETI */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Corrección Desbordamiento Imagen */
.full-width-image {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.full-width-image img {
    width: 100%;
    height: auto;
    display: block;

}

.center-width-image {
    display: flex;             /* Activamos Flexbox */
    flex-direction: column;    /* Alineamos los hijos en columna */
    align-items: center;       /* Centramos horizontalmente los hijos */
    width: 100%;               /* El contenedor ocupa el ancho disponible */
    margin-bottom: 30px;
}

.center-width-image img {
    width: 300px;
    max-width: 100%;           /* Evita que desborde en móviles */
    height: auto;
    border-radius: 8px;
    display: block;
    overflow: hidden;
}


/* REPRODUCTOR DE AUDIO CUSTOM */
.audio-player-card {
    background: var(--white);
    padding: 30px;
    margin-bottom: 30px;
}

.audio-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.audio-icon-box {
    width: 60px;
    height: 60px;
    background: #f0f4f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.audio-details h3 {
    margin: 0 0 5px 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.audio-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* UI Controles */
.audio-controls-ui {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 50px;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.progress-container {
    flex-grow: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 0.8rem;
    font-weight: bold;
    color: #555;
    min-width: 80px;
    text-align: right;
    font-family: monospace;
}

/* ================================================================
   RECURSO: TARJETAS VOLTEABLES (FLIP CARDS)
   ================================================================ */

.flip-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 250px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.flip-card-front {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid #f0f4f8;
}

.flip-card-front h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text);
}

.flip-card-front i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.flip-card-back {
    background-color: var(--primary);
    color: white;
    transform: rotateY(180deg);
}

.flip-card-back p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: white;
}

/* ================================================================
   RECURSO: GALERÍA (CAROUSEL)
   ================================================================ */

.gallery-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 40px auto;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.gallery-carousel-container {
    overflow: hidden;
    width: 100%;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    color: white;
    padding: 60px 30px 30px;
    text-align: center;
}

.gallery-caption h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.gallery-caption p {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.gallery-arrow:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow.prev {
    left: 15px;
}

.gallery-arrow.next {
    right: 15px;
}

.gallery-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active, .gallery-dot:hover {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .gallery-slide img {
        height: 300px;
    }
    .gallery-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .gallery-caption {
        padding: 40px 20px 20px;
    }
    .gallery-caption h3 {
        font-size: 1.2rem;
    }
    .gallery-caption p {
        font-size: 0.95rem;
    }
}

/* ================================================================
   PANTALLA DE FIN (CIERRE)
   ================================================================ */
.completion-card {
    background: var(--white);
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 700px;
    margin: 40px auto;
    border-top: 6px solid #2ecc71;
    animation: fadeIn 0.8s ease-out;
}

.completion-icon {
    font-size: 6rem;
    color: #2ecc71;
    margin-bottom: 25px;
    animation: bounce 2s infinite;
}

.completion-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.completion-message {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.completion-submessage {
    font-size: 1.05rem;
    color: #777;
    line-height: 1.5;
}

/* ================================================================
   SKIP LINK (ACCESIBILIDAD)
   ================================================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    border-radius: 0 0 4px 0;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* ================================================================
   TAG (PORTADA)
   ================================================================ */
.tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ================================================================
   HINT MESSAGE (sustituye los divs con estilos en línea)
   ================================================================ */
.hint-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px auto;
    color: #64748b;
    border-left: 2px solid #e2e8f0;
    padding-left: 15px;
    width: fit-content;
    max-width: 90%;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

.hint-icon {
    font-size: 0.9rem;
    opacity: 0.8;
    flex-shrink: 0;
}

/* ================================================================
   ESTILOS DE FOCO (ACCESIBILIDAD)
   ================================================================ */
.nav-links li:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.1);
}

.flip-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 8px;
}

.accordion-header:focus-visible,
.tab-btn:focus-visible,
.gallery-arrow:focus-visible,
.slider-arrow:focus-visible,
.toggle-btn:focus-visible,
.btn-primary:focus-visible,
.fixed-nav-bar button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Hover en btn-primary */
.btn-primary {
    transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ================================================================
   MEJORAS RESPONSIVE MÓVIL
   ================================================================ */

/* Espacio para el botón flotante en móvil */
@media (max-width: 768px) {
    section {
        padding-top: 65px;
    }

    .slider-card {
        padding: 40px 20px;
    }

    .completion-card {
        padding: 40px 20px;
        margin: 20px auto;
    }

    .completion-title {
        font-size: 2rem;
    }

    .hint-message {
        font-size: 0.75rem;
    }

    /* Flip cards: altura mínima reducida en móvil */
    .flip-card {
        height: 200px;
    }

    /* Una sola columna para flip cards en móvil pequeño */
    .flip-card-grid {
        grid-template-columns: 1fr;
    }

    /* Galería: altura máxima razonable en móvil */
    .gallery-slide img {
        max-height: 280px;
        object-fit: contain;
        background: #f4f6f8;
    }

    /* Pestañas: texto más pequeño si es necesario */
    .tab-btn {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    /* Barra de navegación inferior más compacta */
    .fixed-nav-bar {
        padding: 10px 15px;
    }
}

/* Pantallas muy pequeñas (< 400px) */
@media (max-width: 400px) {
    .slider-card {
        padding: 30px 15px;
    }

    .slider-card h3 {
        font-size: 1.1rem;
    }

    .flip-card-grid {
        gap: 12px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .fixed-nav-bar button {
        padding: 8px 12px;
        font-size: 0.85rem;
        gap: 6px;
    }
}