:root {
    --fuenteHeading: 'Pt Sans', sans-serif;
    --fuenteParrafos: 'Open Sans', sans-serif;

    --primario: #784D3C;
    --gris: #e1e1e1;
    --blanco: #FFF;
    --negro: #000000;

    /* Colores modo claro */
    --background: #FFF;
    --text-color: #000000;
    --text-secondary: #333;
    --border-color: #e1e1e1;
    --card-bg: #FFF;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Modo Oscuro */
[data-theme="dark"] {
    --primario: #a0674f;
    --gris: #2d2d2d;
    --blanco: #1a1a1a;
    --negro: #e0e0e0;

    --background: #121212;
    --text-color: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #333;
    --card-bg: #1e1e1e;
    --shadow: rgba(255, 255, 255, 0.05);
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    font-family: var(--fuenteParrafos);
    font-size: 1.6rem;
    line-height: 2;
    background-color: var(--background);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/*Globales*/
.contenedor {
    width: min(90%, 120rem);
    margin: 0 auto;
}

a {
    text-decoration: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--fuenteHeading);
    line-height: 1.2;
    color: var(--text-color);
}

h1 {
    font-size: 4.8rem;
}

h2 {
    font-size: 4rem;
}

h3 {
    font-size: 3.2rem;
}

h4 {
    font-size: 2.8rem;
}

img {
    max-width: 100%;
}

p {
    color: var(--text-secondary);
}

/*Utilidades*/
.no-margin {
    margin: 0;
}

.no-padding {
    padding: 0;
}

.centrar-texto {
    text-align: center;
}

/*Header*/
.webp .header {
    background-image: url(../img/banner.webp);
}

.no-webp .header {
    background-image: url(../img/banner.jpg);
}

.header {
    height: 60rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

.header__texto {
    text-align: center;
    color: #ffffff !important;
    margin-top: 5rem;
    text-shadow:
        0 0 15px rgba(0, 0, 0, 1),
        0 0 25px rgba(0, 0, 0, 0.8),
        3px 3px 6px rgba(0, 0, 0, 1),
        -2px -2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700;
}

.header__texto h2,
.header__texto p {
    color: #ffffff !important;
}

@media (min-width: 768px) {
    .header__texto {
        margin-top: 15rem;
    }
}

.barra {
    padding-top: 4rem;
}

@media (min-width: 768px) {
    .barra {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

.logo {
    color: #ffffff;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(0, 0, 0, 0.8),
        2px 2px 4px rgba(0, 0, 0, 1),
        -1px -1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}

/* El logo del header siempre debe ser blanco con máximo contraste */
.header .logo {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    padding: 1rem 2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.logo__nombre {
    font-weight: 400;
    color: #ffffff !important;
}

.logo__bold {
    font-weight: bold;
    color: #ffffff !important;
}

.header .logo__nombre,
.header .logo__bold {
    color: #ffffff !important;
}

@media (min-width: 768px) {
    .navegacion {
        display: flex;
        gap: 2rem;
        align-items: center;
    }
}

.navegacion__enlace {
    display: block;
    text-align: center;
    font-size: 1.8rem;
    color: var(--blanco);
    transition: color 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Los enlaces del header siempre blancos */
.header .navegacion__enlace {
    color: #ffffff !important;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 1),
        0 2px 8px rgba(0, 0, 0, 0.9),
        2px 2px 4px rgba(0, 0, 0, 1);
    font-weight: 600;
}

.header .navegacion__enlace:hover {
    color: #ffd700 !important;
    text-shadow:
        0 0 15px rgba(255, 215, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 1),
        2px 2px 4px rgba(0, 0, 0, 1);
}

.navegacion__enlace:hover {
    color: #f0f0f0;
}

/* Mejor contraste para enlaces en modo oscuro */
[data-theme="dark"] .navegacion__enlace {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .navegacion__enlace:hover {
    color: #ffd700;
}

/* ==================== BOTÓN MODO OSCURO/CLARO ==================== */
.theme-toggle {
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid #ffffff;
    color: #ffffff;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 2rem;
    padding: 0;
    margin-left: 1rem;
    backdrop-filter: blur(5px);
}

/* El botón del header siempre con borde blanco */
.header .theme-toggle {
    border-color: #ffffff !important;
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15);
}

.header .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.25);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle__icon {
    transition: transform 0.5s ease;
    display: block;
    font-size: 2rem;
    line-height: 1;
}

/* Iconos más claros y reconocibles */
[data-theme="light"] .theme-toggle__icon::before {
    content: '☾';
    font-size: 2.2rem;
}

[data-theme="dark"] .theme-toggle__icon::before {
    content: '☀';
    font-size: 2.2rem;
}

@media (min-width: 768px) {
    .contenido-principal {
        display: grid;
        grid-template-columns: 2fr 1fr;
        column-gap: 4rem;
    }
}

.entrada {
    border-bottom: 0.1rem solid var(--border-color);
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
    margin-bottom: 2rem;
}

.entrada:last-of-type {
    margin-bottom: 0;
    border: none;
}

.boton {
    display: block;
    font-family: var(--fuenteHeading);
    color: var(--blanco);
    text-align: center;
    padding: 1rem 3rem;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 2rem;
    border: none;
}

@media (min-width: 768px) {
    .boton {
        display: inline-block;
    }
}

.boton:hover {
    cursor: pointer;
}

.boton--primario {
    background-color: var(--negro);
}

.boton--secundario {
    background-color: var(--primario);
}

.cursos {
    list-style: none;
}

.widget-curso {
    border-bottom: 0.1rem solid var(--border-color);
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.widget-curso:last-of-type {
    border: none;
    margin-bottom: 0;

}

.widget-curso__label {
    font-family: var(--fuenteHeading);
    font-weight: bold;
}

.widget-curso__info {
    font-weight: normal;
}

.widget-curso__label,
.widget-curso__info {
    font-size: 2rem;
}

/*Footer*/
.footer {
    background-color: var(--negro);
    margin-top: 4rem;
    padding-bottom: 3rem;
}

/* Asegurar contraste en footer modo oscuro */
[data-theme="dark"] .footer {
    background-color: #000000;
    border-top: 1px solid #333;
}

[data-theme="dark"] .footer .logo {
    color: #ffffff;
}

[data-theme="dark"] .footer .navegacion__enlace {
    color: #ffffff;
}

/*Sobre Nosotros*/
/* Código con CSS-Grid

@media (min-width: 768px) {
    .sobre-nosotros {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 2rem;
    }
}  */

@media (min-width: 768px) {
    .sobre-nosotros {
        display: flex;
        justify-content: space-between;
    }

    .sobre-nosotros__texto {
        flex: 0 0 calc(50% - 1rem);
    }

    .sobre-nosotros__imagen {
        flex: 0 0 calc(50% - 1rem);
    }
}

/*Cursos*/
.curso {
    padding: 3rem 0;
    border-bottom: 0.1rem solid var(--border-color);
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
    .curso {
        display: grid;
        grid-template-columns: 1fr 2fr;
        column-gap: 2rem;

    }
}

.curso:last-of-type {
    border: none;
}

.curso__label {
    font-family: var(--fuenteHeading);
    font-weight: bold;
}

.curso__info {
    font-weight: normal;
}

.curso__label,
.curso__info {
    font-size: 2rem;
}

/*Acá lo ideal sería no repetir el código, y ponerlo arriba 
junto con el de los widgets con una coma.*/

/*Entrada*/
@media (min-width: 768px) {
    .entrada {
        display: flex;
        flex-direction: column;
    }
}

/*Contacto*/
.contacto-bg {
    background-image: url(../img/contacto.jpg);
    height: 40rem;
    background-size: cover;
    background-repeat: no-repeat;
}

.formulario {
    background-color: var(--card-bg);
    margin: -5rem auto 0 auto;
    width: 95%;
    padding: 5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px var(--shadow);
    transition: background-color 0.3s ease;
}

.campo {
    display: flex;
    margin-bottom: 2rem;

}

.campo__label {
    size: bold;
    flex: 0 0 9rem;
    text-align: right;
    padding-right: 2rem;
    color: var(--text-color);
}

.campo__field {
    flex: 1;
    border: 0.1rem solid var(--border-color);
    background-color: var(--background);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.campo__field--textarea {
    height: 20rem;
}

/* ==================== ANIMACIONES ==================== */

/* Animación de entrada para elementos */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animación hover para entradas de blog */
.entrada {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entrada:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Animación hover para botones */
.boton {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.boton::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.boton:hover::before {
    width: 300px;
    height: 300px;
}

.boton--primario:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.boton--secundario:hover {
    background-color: #8b5a47;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(120, 77, 60, 0.4);
}

/* Animación para enlaces de navegación */
.navegacion__enlace {
    position: relative;
    transition: color 0.3s ease;
}

.navegacion__enlace::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--blanco);
    transition: width 0.3s ease;
}

.navegacion__enlace:hover::after {
    width: 100%;
}

.navegacion__enlace:hover {
    color: var(--gris);
}

/* Animación para cursos */
.curso,
.widget-curso {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.curso:hover,
.widget-curso:hover {
    transform: translateX(10px);
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.1);
}

/* Animación para imágenes */
.entrada__imagen picture img,
.curso__imagen img {
    transition: transform 0.5s ease;
}

.entrada:hover .entrada__imagen picture img,
.curso:hover .curso__imagen img {
    transform: scale(1.05);
}

.entrada__imagen picture,
.curso__imagen {
    overflow: hidden;
}

/* ==================== MODAL DE RESERVA ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .modal {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal--activo {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal__contenido {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 4rem;
    border-radius: 10px;
    width: 90%;
    max-width: 60rem;
    position: relative;
    animation: slideDown 0.4s ease;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal__cerrar {
    color: var(--text-color);
    float: right;
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.modal__cerrar:hover {
    color: var(--primario);
    transform: rotate(90deg);
}

.modal__titulo {
    color: var(--primario);
    margin-bottom: 2rem;
    text-align: center;
}

.formulario-reserva {
    margin-top: 2rem;
}

.formulario-reserva .campo {
    flex-direction: column;
    align-items: stretch;
}

.formulario-reserva .campo__label {
    text-align: left;
    padding-right: 0;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primario);
}

.formulario-reserva .campo__field {
    padding: 1rem;
    font-size: 1.6rem;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.formulario-reserva .campo__field:focus {
    outline: none;
    border-color: var(--primario);
    box-shadow: 0 0 0 3px rgba(120, 77, 60, 0.1);
}

/* ==================== SISTEMA DE CUPOS ==================== */
.curso__acciones {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== ALERTAS Y NOTIFICACIONES ==================== */
.alerta {
    padding: 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alerta--exito {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alerta--error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alerta--flotante {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    min-width: 30rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.notificacion {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primario);
    color: var(--blanco);
    padding: 1.5rem 3rem;
    border-radius: 50px;
    font-size: 1.6rem;
    font-weight: bold;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: top 0.3s ease;
}

.notificacion--visible {
    top: 2rem;
}

.notificacion--exito {
    background-color: #28a745;
}

.notificacion--error {
    background-color: #dc3545;
}

/* ==================== VALIDACIÓN DE FORMULARIOS ==================== */
.campo__field--error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.campo__error {
    color: #dc3545;
    font-size: 1.4rem;
    margin-top: 0.5rem;
    display: block;
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ==================== MEJORAS RESPONSIVE ==================== */
@media (max-width: 768px) {
    .modal__contenido {
        padding: 2rem;
        width: 95%;
    }

    .alerta--flotante {
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }

    .notificacion {
        width: 90%;
        font-size: 1.4rem;
        padding: 1.2rem 2rem;
    }
}

/* ==================== LOADING STATES ==================== */
.boton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.8;
    }
}

/* ==================== MENSAJES DE RESERVA ==================== */
.mensaje-reserva {
    margin-top: 2rem;
}

.mensaje-reserva .alerta p {
    margin: 0.5rem 0;
}

.mensaje-reserva .alerta p:first-child {
    font-size: 1.8rem;
    font-weight: bold;
}

/* ==================== SCROLL SUAVE ==================== */
html {
    scroll-behavior: smooth;
}

/* ==================== MEJORA DE ACCESIBILIDAD ==================== */
.boton:focus,
.campo__field:focus,
.navegacion__enlace:focus {
    outline: 3px solid var(--primario);
    outline-offset: 2px;
}