:root {
    --primario: #FFAA59;
    --secundario: #016C90;
    --blanco: #FFFFFF;
    --texto: black;
    --background:#c2edfb;
    --border-radius: 10px;
    --border-radius-text: 5px;
    --width-text: 750px;
}

* {
    margin: 0;
    font-size: 100%; 
    box-sizing: border-box; 
}

body {
    font: 1rem/1.6 Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--texto);
}
*, *:before, *:after {
    box-sizing: inherit; 
}

h2,h3 {
    color: var(--primario);
    text-shadow: 1px 1px var(--texto);
    box-shadow: 3px 3px var(--secundario);
    background-color: var(--secundario);
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    border-style: solid;
    border-color: var(--background);
    border-radius: var(--border-radius);
    padding: 5px;
    border-width: 3px;
    letter-spacing: 2px;
    width: fit-content;
    margin: 1rem auto;
    padding: 0.5rem 2rem;
}
p {
    text-align: justify;
    line-height: 1.5;
    color: var(--texto);
    font-size: 1.2rem;
    font-family: sans-serif;
    margin: auto;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background-color: var(--secundario);
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 9999;
}

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

.link {
    text-decoration: none;
    color: var(--secundario);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 2rem;
}

.logo img {
    width: 150px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.logo img:hover {
    transform: scale(1.1);
}

nav.main-menu {
    margin-right: 2rem;
}
nav.main-menu ul {
    display: flex;
    list-style: none;
    gap: 0.8rem;
    margin-top: 0.5rem;
}
nav.main-menu li a {
    border-radius: var(--border-radius-text);
    padding: 0.5rem;
    border-style: solid;
    box-shadow: 2px 2px var(--background);
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: bolder;
    cursor: pointer;
    align-items: center;
    margin: auto;
    transition: color 0.3s;
}
nav.main-menu li.menu a {
    border-bottom: 1px var(--secundario);
    background-color: var(--primario);
    color: var(--secundario);
    text-shadow: 1px 1px  var(--background);
    max-width: 100px;
}

nav.main-menu li.ruta a {
    background-color: var(--secundario);
    color: var(--primario);
    text-shadow: 1px 1px  var(--texto);
    max-width: 250px;
}

nav .menu a:hover {
    color: var(--texto);
}

nav .ruta a:hover {
    color: var(--background);
}

.banner {
    display: flex;
    width: 100vw;
	max-width: 100%;
	height: 75vh;
    justify-content: center;
    padding: 0rem;
    margin: 0rem;
    margin-bottom: 1rem;
	
	position: relative; 
}

.banner img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    box-shadow: 4px 7px 4px 4px var(--secundario);
    filter:saturate(1.2) opacity(0.8);
    z-index: -3;
    object-fit: cover;
}

.banner-texto {
    position: absolute;
    top: 50%;
    left: 50%;
    transform:  translate(-50%, -50%);
    width: 90%;
    margin-bottom: 1rem;
    z-index: 3;
}

.banner-texto h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primario);
    text-shadow: 2px 2px var(--texto);
    text-align: center;
}

.content-container {
    max-width: 1100px;
    margin: 0.5rem auto;
    padding: 0 0.5rem;
}
section {
    padding: 1.5rem 2rem;
    margin-top: -4rem;
}

.about-image-style {
    height: auto;
    border-radius: 70%;
    margin: 1rem 0;
    display: block;
    max-width: 180px;
    margin: 1rem auto;
    box-shadow: 5px 5px var(--secundario);

}
.images-style {
    width: 100%;
    height: auto;
    max-width: 480px;
    display: block;
    margin: 1rem auto;
    filter: saturate(1.2);
    border-radius: var(--border-radius);
    box-shadow: 5px 5px var(--secundario);
}

#home h3 {
    max-width: var(--width-text);  
    font-size: 1.3rem;
}

#about h4 {
    color: var(--secundario);
    text-shadow: 1px 1px var(--background);
    border: solid 1px var(--texto);
    box-shadow: 1px 1px var(--texto);
    background-color: var(--primario);
    max-width: 200px;
    font-size: 1.5rem;
    border-radius: var(--border-radius-text);
    font-weight: bold;
    align-items: center;
    margin: auto;
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 0rem;    
}

.read-more-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.read-more-toggle {
    display: none;

}

.about-large-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease-in-out;
    width: 100%; 
}

.read-more-toggle:checked ~ .about-large-text {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
}

.read-more-button {
    display: inline-block;
    color: var(--texto);
    border-radius: var(--border-radius); 
    border: 1px solid var(--secundario);
    padding: 0.5rem 1.5rem; 
    margin-top: 0.5rem; 
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.read-more-button:hover {
    transform: translateY(-2px); 
    color: var(--secundario);
    border: 1px solid var(--primario);
}

.read-more-button::before {
    content: "Leer más";
}

.read-more-toggle:checked ~ .read-more-button::before {
    content: "Leer menos";
}

.tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tarjeta {
    perspective: 1000px;
    position: relative;
    height: 200px;
    cursor: pointer;
    width: 250px;
    margin: 1rem auto;
}

.cara {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--texto);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    transition: transform 0.8s;
}
.cara .cara_numero {
    font-weight: bolder;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1;
}

.tarjeta .frente {
    background-color: var(--secundario);
    border: 1px solid var(--primario);
    text-align: center; 
    line-height: 1.3; 
}

.tarjeta .frente .texto {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primario);
    text-shadow: 2px 2px var(--texto);
}

.tarjeta .reverso {
    transform: rotateY(180deg);
    text-align: left;
    font-size: 1rem;
    color: var(--texto);
    background-color: var(--primario);
    font-weight: bold;
    line-height: 1.4;
    display: flex;
    flex-direction: column; 
    justify-content: space-between; 
    align-items: flex-start; 
}
.tarjeta .reverso ul {
    list-style:disc;
    padding: 0; 
    margin-bottom: 1rem; 
    flex-grow: 1; 
}
.tarjeta .reverso ul li {
        width: 100%;
}
.tarjeta:hover .frente {
    transform: rotateY(180deg);
}

.tarjeta:hover .reverso {
    transform: rotateY(360deg);
}

.recursos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    width: 100%;
    margin: 1rem auto;
}

.recurso {
    margin: 0 auto;
    perspective: 1000px;
    position: relative;
    height: 180px;
    width: 350px;
    cursor: pointer;
}

.recurso .frente {
    background-color: var(--primario);
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--secundario);
    text-shadow: 1px 1px var(--texto);
    border: 1px solid var(--secundario);
    text-align: center;
}

.recurso .reverso {
    transform: rotateY(180deg);
    text-align: left;
    font-size: 1rem;
    color: var(--blanco);
    background-color: var(--secundario);
    font-weight: bold;
    line-height: 1.4;
    display: flex;
    flex-direction: column; 
    justify-content: space-between; 
    align-items: flex-start; 
}
.recurso .reverso ul {
    list-style: disc; 
    padding: 0; 
    margin-bottom: 1rem; 
    flex-grow: 1; 
}
.recurso .reverso ul li {
    width: 100%;
    margin-bottom: 0.5rem; 
    color: var(--blanco); 
}
.recurso .reverso .ver_mas, .tarjeta .reverso .ver_mas {
    width: 100%;
}
.recurso .reverso .ver_mas a, .tarjeta .reverso .ver_mas a {
    display: block; 
    text-align: center; 
    text-decoration: none;
    color: var(--blanco);
    background-color: rgba(0,0,0,0.2);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    width: fit-content;
    float: right;
}
.recurso .reverso .ver_mas a:hover {
    background-color: rgba(0,0,0,0.4);
}

.recurso:hover .frente {
    transform: rotateY(180deg);
}

.recurso:hover .reverso {
    transform: rotateY(360deg);
}
.content-container-suscripcion {
    display: flex; /* Activa Flexbox */
    justify-content: center; /* Centra los elementos horizontalmente */
    margin-top: auto; /* Añade un espacio de 20px arriba */
    flex-direction: column; /* Apila los elementos verticalmente */
    align-items: center; /* Centra los elementos horizontalmente */
    gap: 20px; /* Añade un espacio de 20px entre los elementos */
    padding: 40px 0; /* Añade un poco de espacio vertical arriba y abajo */
}
.boton-contacto {
    display: inline-block;
    padding: 10px 20px;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background-color: var(--secundario); /* Color de fondo */
    color: var(--blanco); /* Color del texto */
    font-weight: bolder;
    text-align: center;
    text-decoration: none; /* Quita el subrayado del enlace */
    border-radius: 5px; /* Bordes redondeados */
    border: 2px solid var(--primario); /* Borde de 2px de color primario */
    cursor: pointer; /* Cambia el cursor al pasar por encima */
}

.boton-contacto:hover {
    background-color: var(--primario); /* Color de fondo al pasar el mouse */
}
.cuadro-suscripcion {
    border: 1px solid var(--secundario); /* Borde del cuadro */
    padding: 20px; /* Espacio interior */
    border-radius: 8px; /* Bordes redondeados */
    box-shadow: 0 2px 4px var(--primario); /* Sombra sutil */
    max-width: 500px; /* Ancho máximo del cuadro */
    background-color: var(--blanco); /* Color de fondo ligero */
}

.formulario-suscripcion {
    display: flex; /* Habilita Flexbox */
    flex-direction: column; /* Apila los elementos verticalmente */
    gap: 15px; /* Espacio entre los elementos */
}

.formulario-suscripcion label {
    font-weight: bolder;
    text-align: center; /* Centra el texto del label */
    color: var(--secundario);
    font-size: 20px;
}

.formulario-suscripcion input[type="email"] {
    padding: 10px;
    border: 1px solid var(--secundario);
    border-radius: 5px;
    width: 100%; /* El input ocupa todo el ancho disponible */
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
}

.boton-suscripcion {
    padding: 10px 20px;
    background-color: var(--primario);
    color: var(--secundario);
    font-weight: bolder;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px; /* Tamaño de fuente del botón */
}

.boton-suscripcion:hover {
    background-color: var(--secundario);
    color: var(--blanco);
}
#contacto {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 3rem 1rem; 
    max-width: 960px; 
    margin: 0 auto; 
    box-sizing: border-box; 
}

#contacto h2 {
    width: 100%;
    max-width: 700px; 
    margin: 0 auto 2.5rem auto; 
    padding: 1rem 1.5rem; 
    color: var(--blanco);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); 
    
    font-size: clamp(1rem, 2vw, 1.15rem);
    text-align: center;
    border: 2px solid var(--primario); 
    border-radius: var(--borde-radio);
    background-color: var(--secundario);
    box-shadow: var(--sombra-suave);
    line-height: 1.2;
    box-sizing: border-box;
}

.contacto-form {
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
    width: 100%; 
    max-width: 600px; 
    padding: 2.5rem; 
    background-color: var(--blanco); 
    border-radius: var(--borde-radio);
    box-shadow: var(--sombra-suave);
    box-sizing: border-box;
}

.contacto-form label {
    display: block; 
    margin-bottom: 0; 
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--texto); 
    line-height: 1;;
}

.contacto-form input,
.contacto-form textarea {
    padding: 1rem 1.2rem; 
    border: 1px solid var(--secundario); 
    border-radius: var(--borde-radio);
    font-size: 1rem;
    width: 100%; 
    box-sizing: border-box; 
    font-family: inherit; 
    outline: none; 
    transition: border-color 0.3s ease, box-shadow 0.3s ease; 
}

.contacto-form input:focus,
.contacto-form textarea:focus,
.contacto-form select:focus {
    border-color: var(--primario); 
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); 
}

.contacto-form textarea {
    resize: vertical; 
    min-height: 120px; 
}


.contacto-form select {
    appearance: none; 
    -webkit-appearance: none; 
    -moz-appearance: none; 
    padding: 1rem 1.2rem;
    border: 1px solid var(--secundario);
    border-radius: var(--borde-radio);
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--blanco);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); 
    background-repeat: no-repeat;
    background-position: right 1rem center; 
    background-size: 1.2em; 
    cursor: pointer;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contacto-form select::-ms-expand {
    display: none; 
}

.contacto-form button {
    background-color: var(--primario); 
    color: var(--blanco); 
    font-size: 1.2rem;
    font-weight: bold;
    padding: 1rem 2rem; 
    border: none;
    border-radius: var(--borde-radio);
    align-self: center; 
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 1rem; 
    max-width: 250px; 
    width: 100%; 
}

.contacto-form button:hover {
    background-color: #0056b3; 
    transform: translateY(-3px); 
    box-shadow: var(--sombra-suave);
}

.contacto-form button:active {
    transform: translateY(0); 
    box-shadow: none;
}

.autor-cita { 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem; 
    padding: 1.5rem 2rem;
   
    max-width: 100%; 
    text-align: center; 
  
    align-items: center;
}

.autor-cita p {
    font-size: 1.15rem; 
    color: var(--texto);
    font-style: italic; 
    line-height: 1.6;
    margin: 0; 
}

.autor-cita q {
    quotes: "“" "”" "‘" "’"; 
}

nav .menu :hover {
    color: var(--texto);
}

nav .ruta :hover {
    color: var(--background);
}

h1 {
    font-size:2.5rem;
    color: var(--primario);
    text-shadow: 2px 2px var(--texto);
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 0rem;
}

.logo button {
    border-radius: var(--border-radius-text);
    padding: 0.5rem 1rem;
    border-bottom: 1px var(--primario);
    border-style: solid;
    background-color: var(--secundario);
    box-shadow: 6px 4px 6px 4px var(--blanco);
    color: var(--primario);
    text-shadow: 2px 2px  var(--texto);
    font-weight: bold;
    cursor: pointer;
    align-items: center;
    font-size: 1.5rem;
    max-width: auto;
    margin-left: 700px;
}

.content {
    padding: 1rem 0;
    margin:auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%
}
.content div:first-child {
    display: table;
}
.content div {
    width: 50%;
}
.content div h1 {
    vertical-align: middle;
    height: inherit;
    display: table-cell;
}
.content div h2 {
    padding: 0.5rem 1rem;
}
.content div nav ul {
    list-style-type: disc;
    list-style-position: inside;
    flex-direction: column;
    justify-content: center;
    background-color:inherit;
}
.content a {
    font-size: 1.25rem;
    color: var(--primario);
    text-shadow: 1px 1px var(--texto);
    text-decoration: none;
    font-weight: bolder;
    cursor: pointer;
    transition: color 0.3s;
}

.navegacion-lecciones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem auto;
    max-width: 900px;
    width: 100%;
}

.navegacion-lecciones a {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0.8rem 1.5rem; 
    max-width: 250px;
    border-radius: var(--border-radius-text);
    border: 2px solid var(--primario);
    background-color: var(--secundario);
    box-shadow: 4px 4px 0px var(--background);
    color: var(--primario);
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px var(--texto);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease; 
    box-sizing: border-box;
}

.leccion-anterior,
.siguiente-leccion {
    
    display: flex;
    align-items: center;
}

.navegacion-lecciones a:hover {
    background-color: var(--primario);
    color: var(--secundario);
    text-shadow: none;
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px var(--background);
}

div ul {
    list-style: disc;
    line-height: 200%;
    margin: 1em 0 1em 0; 
    
    text-align: justify;
    align-items: center
}
div ul li {
    display: list-item;
    text-align: justify;
    font-size: 1.1rem;
    color: var(--texto);
    align-items: center;
    margin: auto;
    justify-content: center;
    max-width: auto;
}
div dl {
    display: block;
    margin: 1em 0 1em 0; 
    text-align: justify;
    background-color:#d4eff8;
    align-items: center;
    margin: auto;
    justify-content: center;
    max-width: auto;
}
div dl dt {
    font-size: 1.3rem;
    color: var(--secundario);
    font-weight: bold;
}    
div dl dt dd {

    font-size: 1.2rem;
    color: var(--texto);
   
}

span {
    color: var(--secundario);
    font-weight: bold;
}
em {
    color: var(--secundario);
    font-weight: bolder;
    font-style: italic;
}
mark {
    background-color: var(--secundario);
    color: var(--background);
    font-weight: bold;
}
table {
    border-collapse: collapse;
    margin: 1rem auto;
    width: 100%;
    max-width: 750px;
    text-align: justify;
    border: 2px solid var(--texto);
    box-shadow: 3px 3px 3px 3px var(--secundario);
}
.comandos { 
    width: 100%;
    max-width: 1500px;
}
td, th {
    border: 2px solid var(--secundario);
    padding: 0.5rem 0.25rem;
    text-align: left;
    vertical-align: top;
    
}

/* Subscription Form Messages */
#subscription-message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    line-height: 1.4;
}

#subscription-message.success {
    background-color: #e6f7e6;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

#subscription-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Loading State */
.boton-suscripcion {
    position: relative;
}

.boton-suscripcion .button-text,
.boton-suscripcion .button-loader {
    transition: opacity 0.3s ease;
}

.boton-suscripcion .button-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Form Improvements */
.formulario-suscripcion {
    position: relative;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #subscription-message {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
}

th {
    background-color: var(--secundario);
    color: var(--background);
    text-align: center;
    font-weight: bold;
}
.diferencia {
    color: var(--texto);
    background-color: var(--primario);
    font-weight: bold;
}
.roles{
    font-size: 1.1rem; ;
    font-weight: bolder;
    background-color: var(--blanco);
    width: 25%;
   
}
.web {
    background-color: var(--blanco);
}


footer {
    width: 100%;
    margin-top: 2rem;
}

.footer {
    background-color: #016C90;
    color: white;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer .logo {
    margin-left: 2rem;
    width: 33%;
}

.footer .logo img {
    width: 150px;
    height: auto;
}

.footer p {
    text-align: center;
    margin: 0;
    color: white;
    font-size: 1rem;
    flex-grow: 1;
    width: 33%;
}

.footer address {
    margin-right: 2rem;
    text-align: right;
    font-size: 0.8rem;
    font-style: normal;
    width: 33%;
}

.footer address a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer address a:hover {
    color: #FFAA59;
    text-decoration: underline;
}

.copyright {
    background-color: #c2edfb;
    padding: 1.25rem 0;
}

.copyright p {
    color: #016C90;
    font-weight: bold;
    margin: 0;
    font-size: 0.8rem;
    text-align: center;
}
.error-404 h1 {
     margin: 2rem auto 1rem auto;
     height: auto;
     width: auto;
     display: flex;
     justify-content: center;
     align-items: center;
    font-size: 7rem;
}


/* Flash messages */
.message {
padding: 12px 16px;
margin: 1rem 0;
border-radius: 6px;
font-weight: 600;
display: block;
}

.message-success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
border-left: 6px solid #28a745;
}

.message-error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
border-left: 6px solid #dc3545;
}


@media (min-width: 721px) and (max-width: 1024px) {
   .contenedor {
        width: 95%; 
    }

    
    .content div {
        width: 100%;
    }
    p, div ul li, div dl {
        font-size: 1rem;
    }
    header {
        flex-direction: column;
        height: auto;
    }
    .logo {
        margin: 0;
    }
    nav.main-menu {
        margin: 1rem 0;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .banner {
        height: 40vh;
    }
    .banner-texto h1 {
        font-size: 1.75rem;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer .logo {
        margin: 0;
        width: auto;
    }
    
    .footer p {
        width: 90%;
        margin: 1rem 0;
    }
    
    .footer address {
        margin: 1rem 0 0 0;
        width: 90%;
        text-align: center;
    }
}


@media (max-width: 720px) {
    h1 {
        font-size: 1.5rem;
    }
    h2, h3 {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }
    form input, form textarea, form select {
        width: 100%;
    }
    .logo img {
        width: 100px;
        height: auto;
    }

    header {
        flex-direction: column;
        height: auto;
    }
    .logo {
        margin: 0;
    }
    nav.main-menu {
        margin: 0.5rem 0;
        display: none; /* oculto por defecto en móviles */
        width: 100%;
    }

    /* Botón hamburguesa visible solo en móviles */
    .menu-toggle-label {
        display: flex !important; /* sobreescribe inline para mostrar en móvil */
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        cursor: pointer;
        color: var(--primario);
        background-color: var(--secundario);
        border: 2px solid var(--primario);
        border-radius: var(--border-radius-text);
        padding: 0.4rem 0.8rem;
        font-weight: bold;
        margin: 0.5rem 0;
    }
    .menu-toggle-label i {
        font-size: 1.25rem;
    }

    /* Mostrar menú cuando el toggle está activo */
    #menu-toggle:checked ~ nav.main-menu {
        display: block;
    }
    nav.main-menu ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        padding: 0 1rem;
    }
    nav.main-menu li a {
        display: block;
        width: 100%;
        text-align: center;
    }

    .recursos {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .recurso {
        width: 100%;
        max-width: 250px;
        margin: 1.5rem auto;
    }
    .content div {
        width: 100%;
    }
    /* generales */
    .hide-xs {
        display: none;
    }

    /* Footer apilado en móviles */
    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    .footer .logo {
        margin: 0;
        width: auto;
        display: flex;
        justify-content: center;
    }
    .footer p {
        width: 90%;
        margin: 0.75rem 0;
        font-size: 0.95rem;
    }
    .footer address {
        width: 90%;
        margin: 0.5rem 0 0 0;
        text-align: center;
        font-size: 0.85rem;
    }
}