/* ESTILO GLOBAL */
body {
    font-family: 'Roboto', sans-serif;
    background: #1A1A1A;
    color: #333333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-top: 60px; /* Espacio para nav fija */
}

/* MENU DE NAVEGACIÓN */
.menu-navegacion {
    background: #1A1A1A;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px; /* Aumentado para centrado y match con otras secciones */
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-navegacion a {
    color: #F5F5F5;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: color 0.3s;
    white-space: nowrap;
    padding: 0.5rem;
}

.menu-navegacion a:hover {
    color: #A85A48;
}

/* Hamburger Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #F5F5F5;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    left: 20px;
}

/* Side Menu */
.side-nav {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: #1A1A1A;
    transition: left 0.3s ease;
    z-index: 999;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.side-nav a {
    width: 100%;
    text-align: center;
    padding: 1rem;
    color: #F5F5F5;
    font-size: 1rem;
}

.side-nav a:hover {
    background: rgba(168, 90, 72, 0.2);
}

.closebtn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: #F5F5F5;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 998;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-links {
        display: none; /* Oculta links horizontales en mobile */
    }
    .menu-navegacion {
        justify-content: flex-start; /* Espacio para hamburger */
    }
}

/* Resto del CSS (hero, categorias, cursos, etc.) se mantiene igual al anterior... */

/* HERO SECTION */
.hero {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #F5F5F5;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    margin-top: 0; /* Quitado margin-top, usa padding-top en body */
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(168, 90, 72, 0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* SELECCIÓN DE CATEGORÍA */
.categorias {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 3rem 2rem;
    position: relative;
    text-align: center;
}

.categorias h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #F5F5F5;
    text-shadow: 0 0 10px rgba(168, 90, 72, 0.5);
}

.selector-categorias {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tarjeta-movida {
    background: rgba(51, 51, 51, 0.8);
    border: 10px solid rgba(168, 90, 45, 1.3);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(245, 245, 245, 1.05);
}

.tarjeta-movida:hover {
    transform: translateY(10px) scale(1.03);
    border-color: #A85A48;
    box-shadow: 0 10px 30px rgba(168, 90, 72, 0.3);
    background: rgba(245, 245, 245, 1.05);
}

.tarjeta-movida img {
    width: 100%;
    max-width: 200px; /* Responsive: escala hacia abajo si la columna es pequeña */
    height: auto;
    object-fit: cover;
    border-radius: 50%;
    border: 0px solid rgba(168, 90, 72, 0.5);
    margin-bottom: 1rem;
    transition: all 0.5s ease;
}

.tarjeta-movida:hover img {
    transform: scale(1.1);
}

.tarjeta-movida h3 {
    color: #A85A48;
    margin: 0.5rem 0;
    font-size: 1.3rem;
    text-shadow: 0 0 5px rgba(168, 90, 72, 0.5);
}

.tarjeta-movida p {
    color: #333333;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* ESTILO PARA TARJETA SELECCIONADA */
.tarjeta-movida.seleccionada {
    background: rgba(245, 245, 245, 0.95) !important;
    border-color: #A85A48 !important;
    box-shadow: 0 10px 30px rgba(168, 90, 72, 0.4) !important;
    transform: translateY(-5px) scale(1.02) !important;
}

.tarjeta-movida.seleccionada img {
    transform: scale(1.1) !important;
    filter: drop-shadow(0 0 10px rgba(168, 90, 72, 0.5)) !important;
}

.tarjeta-movida.seleccionada h3 {
    color: #A85A48 !important;
    text-shadow: 0 0 8px rgba(168, 90, 72, 0.7) !important;
}

/* BOTÓN "¡EXPLORAR ESTA ÁREA!" Y "CERRAR DETALLES" */
.btn {
    background: linear-gradient(45deg, #A85A48, #e52e71);
    color: #F5F5F5;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(168, 90, 72, 0.6);
    transition: all 0.3s;
    width: auto;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.btn:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 25px rgba(229, 46, 113, 0.6);
}

/* CONTENIDO DETALLADO */
.contenido-detallado {
    background: #1A1A1A;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    color: #333333;
    display: none;
}

.contenido-detallado h2 {
    color: #F5F5F5;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(168, 90, 72, 0.5);
}

.contenido-detallado ul, .contenido-detallado ol {
    text-align: left;
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.contenido-detallado li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* CURSOS */
.cursos {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 3rem 2rem;
    position: relative;
    text-align: center;
}

.titulo-cursos {
    text-align: center;
    font-size: 2.5rem;
    margin: 3rem 0 1rem;
    color: #F5F5F5;
    text-shadow: 0 0 20px rgba(168, 90, 72, 0.3);
}

.grid-cursos {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columnas en desktop */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.curso {
    background: rgba(51, 51, 51, 0.8);
    border: 10px solid rgba(168, 90, 45, 1.3);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(245, 245, 245, 1.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 300px;
}

.curso:hover {
    transform: translateY(10px) scale(1.03);
    border-color: #A85A48;
    box-shadow: 0 10px 30px rgba(168, 90, 72, 0.3);
    background: rgba(245, 245, 245, 1.05);
}

.icono-curso {
    width: 100%;
    max-width: 200px; /* Responsive: escala hacia abajo si la columna es pequeña */
    height: auto;
    object-fit: cover;
    border-radius: 50%;
    border: 0px solid rgba(168, 90, 72, 0.5);
    margin-bottom: 1rem;
    transition: all 0.5s ease;
}

.img-icono {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.curso:hover .img-icono {
    transform: scale(1.1);
}

.contenido-curso {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    width: 100%;
}

.imagen-grande-contenedor img {
    /* Permite que la imagen ocupe todo el ancho disponible */
    max-width: 100%;
    /* Mantiene la proporción de la imagen */
    height: auto;
    /* Asegura que no se salga del contenedor */
    display: block;
}

.titulo-curso {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    color: #A85A48;
    text-shadow: 0 0 5px rgba(168, 90, 72, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    word-wrap: break-word;
    width: 100%;
}

.descripcion-curso {
    color: #F5F5F5;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.btn-abrir {
    background: linear-gradient(45deg, #A85A48, #e52e71);
    color: #F5F5F5;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(168, 90, 72, 0.6);
    transition: all 0.3s;
    width: auto;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.btn-abrir:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 25px rgba(255, 42, 109, 0.6);
}

/* MODAL */
.modal-curso {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-contenido {
    background: linear-gradient(135deg, #333333, #4a6572);
    margin: 5% auto;
    padding: 3rem;
    border-radius: 30px;
    width: 80%;
    max-width: 1000px;
    border: 3px solid #A85A48;
    box-shadow: 0 0 50px rgba(168, 90, 72, 0.5);
    position: relative;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cerrar-modal {
    color: #A85A48;
    float: right;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.cerrar-modal:hover {
    color: #ff2a6d;
    transform: rotate(90deg);
}

.modal-contenido h2 {
    text-align: left;
    color: #A85A48;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(168, 90, 72, 0.5);
}

.grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.item-modal {
    background: rgba(245, 245, 245, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    color: #F5F5F5;
    border: 1px solid rgba(168, 90, 72, 0.3);
    transition: all 0.3s;
    text-align: left;
}

.item-modal:hover {
    transform: translateY(-5px);
    border-color: #A85A48;
    box-shadow: 0 10px 25px rgba(168, 90, 72, 0.3);
    background: rgba(168, 90, 72, 0.1);
}

.item-modal h3 {
    color: #A85A48;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.item-modal p {
    color: #F5F5F5;
    line-height: 1.5;
    font-size: 1rem;
}

/* BOTÓN FLOTANTE DE CIERRE */
.btn-cerrar-flotante {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    background: rgba(51, 51, 51, 0.9);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 300px;
    animation: flotarAlmo 3s ease-in-out infinite;
    display: none;
}

.btn-cerrar-flotante:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 8px 30px rgba(5, 217, 232, 0.6);
}

/* ========================================
   AJUSTES RESPONSIVE MÍNIMOS - PARA QUE SEA SIMILAR A DESKTOP
   ======================================== */

/* Ajustes alineados entre categorías y cursos */

@media (max-width: 1200px) {
    .selector-categorias,
    .grid-cursos {
        grid-template-columns: repeat(3, 1fr) !important; /* Igual para ambos */
    }
    .menu-navegacion div {
        justify-content: space-between; /* Ajuste para evitar cortes en tablets */
    }
}

@media (max-width: 992px) {
    .selector-categorias,
    .grid-cursos {
        grid-template-columns: repeat(2, 1fr) !important; /* Igual */
    }
    .hero {
        padding: 3rem 1.5rem !important;
        margin-top: 0 !important;
    }
    .hero h1 {
        font-size: 2.2rem !important;
    }
    .hero p {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px; /* Más padding en mobile si la barra es más alta por wrap */
    }
    #logo-dorin img {
        width: 0px !important;
        height: auto !important;
    }
    .menu-navegacion {
        padding: 0.5rem 1.0rem !important;
        justify-content: space-between; /* Para posicionar hamburger y logo */
    }
    .hamburger {
        display: block; /* Muestra en mobile */
    }
    .side-nav {
        display: flex; /* Activa el side menu */
    }
    .menu-navegacion div:not(.side-nav) {
        display: none; /* Oculta links en desktop mode para mobile */
    }
    .categorias, .cursos {
        padding: 2.5rem 1.5rem !important;
    }
    .categorias h2, .titulo-cursos {
        font-size: 1.8rem !important;
    }
    .selector-categorias,
    .grid-cursos {
        grid-template-columns: repeat(2, 1fr) !important; /* Igual, mantiene 2 para similitud */
        gap: 1.5rem !important;
    }
    .tarjeta-movida img,
    .icono-curso {
        width: 180px !important;
        height: 180px !important;
    }
    .tarjeta-movida h3,
    .titulo-curso {
        font-size: 1.2rem !important;
    }
    .tarjeta-movida p,
    .descripcion-curso {
        font-size: 0.95rem !important;
    }
    .curso,
    .tarjeta-movida {
        padding: 1.5rem !important;
        min-height: 280px !important;
        justify-content: center;
        align-items: center;
    }
    .btn, .btn-abrir {
        padding: 9px 25px !important;
        font-size: 1rem !important;
    }
    .modal-contenido {
        width: 90% !important;
        padding: 2.5rem !important;
        margin: 5% auto !important;
    }
    .cerrar-modal {
        font-size: 2.2rem !important;
    }
    /* Fondos fijos a scroll para evitar glitches en mobile */
    .hero,
    .categorias,
    .cursos {
        background-attachment: scroll !important;
    }
}

@media (max-width: 480px) {
    #logo-dorin img {
        width: 0px !important;
    }
    .hero {
        margin-top: 0 !important;
        padding: 3rem 1.2rem !important;
    }
    .hero h1 {
        font-size: 2rem !important;
    }
    .selector-categorias,
    .grid-cursos {
        grid-template-columns: 1fr !important; /* Solo aquí a 1 para muy pequeños, igual para ambos */
    }
    .tarjeta-movida img,
    .icono-curso {
        width: 160px !important;
        height: 160px !important;
    }
    .curso,
    .tarjeta-movida {
        min-height: 250px !important;
        padding: 0.02rem !important;
    }
    .titulo-curso {
        font-size: 1.2rem !important; /* Ajustado para visibilidad */
    }
    .btn, .btn-abrir {
        padding: 8px 22px !important;
        font-size: 0.95rem !important;
    }
    .modal-contenido {
        padding: 2rem !important;
        width: 80% !important;
    }
    .btn-cerrar-flotante {
        left: 50%;
        transform: translateX(-50%);
        bottom: 10px;
        max-width: 280px;
    }
}.btn, .btn:link, .btn:visited {
    text-decoration: none !important;
}
.contenido {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 3rem 2rem;
    position: relative;
    text-align: center;
}

.contenido h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #F5F5F5;
    text-shadow: 0 0 10px rgba(168, 90, 72, 0.5);
}
/* ✅ FORZAR MENÚ HORIZONTAL EN TODOS LOS DISPOSITIVOS */
.menu-navegacion {
    background: #1A1A1A;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Asegura que no se contraiga en móviles */
    flex-wrap: nowrap; /* ← Impide que los enlaces se apilen */
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
    flex-wrap: nowrap; /* ← Clave: evita el salto a múltiples líneas */
    white-space: nowrap; /* ← Evita que el texto se parta */
}

.menu-navegacion a {
    color: #F5F5F5;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: color 0.3s;
    padding: 0.5rem;
    min-width: fit-content; /* ← Ajusta al contenido mínimo */
}

/* ✅ ELIMINAR COMPORTAMIENTO RESPONSIVE ANTIGUO */
@media (max-width: 768px) {
    .hamburger,
    .side-nav,
    .overlay {
        display: none !important;
    }

    /* Asegurar que el menú no desaparezca en móvil */
    .nav-links {
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .menu-navegacion {
        justify-content: center !important;
        padding: 1rem;
    }

    body {
        padding-top: 80px; /* Un poco más de espacio para el menú fijo */
    }
}
@media (max-width: 480px) {
    .menu-navegacion a {
        font-size: 0.8rem;
        gap: 4px;
        padding: 0.4rem;
    }
    .nav-links {
        gap: 0.5rem;
    }
}
@media (max-width: 600px) {
    .tarjeta-movida {
        width: 100%;
        max-width: 280px; /* ✅ NUEVO: ancho máximo reducido para ser más estrechas */
        margin: 0 auto 1rem; /* ✅ Centrado automático con margen inferior */
        display: block;
        text-align: center;
        min-height: 120px;
        padding: 0.8rem;
        border-width: 7px;
    }
}