@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        scroll-behavior: smooth;
    }

    /* HERO */

    #mainContainer {
        display: flex;
    }

    .enlacesInNav {
        display: flex;
        justify-content: center;
        gap: 0.7rem;
        padding-top: 1.5rem;
        font-family: 'Poppins';
    }

    .underlinedCabecera {
        width: 80vw;
        position: absolute;
        left: 50%;
        transform: translate(-50%);
    }

    .enlacesInNav a {
        font-size: small;
        color: var(--colorBlanco);
    }

    .enlacesInNav a:active {
        color: var(--colorNaranjita);
    }

    .logoInNav {
        display: none;
    }

    .headerContainerInMain {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
    }

    .headerContainerInMain #grabadoMuseo {
        width: 120vw;
        position: absolute;
        left: -3%;
        top: 10%;
        z-index: -1;
    }

    .headerContainerInMain #logoPrincipal {
        margin-top: 2rem;
        width: 60vw;
    }

    .contenedorH1 {
        margin-top: -5rem;
        font-family: 'Capi';
        width: 48ch;
        font-size: x-small;
        line-height: 2.75rem;
        color: var(--colorNaranjita);
    }

    .contenedorH1 span {
        font-size: 17.5vw;
        font-weight: normal;
        color: var(--colorRosita);
        text-shadow: -0.5px -0.5px 0px var(--colorNaranjita);
    }

    .articleContainerInMain {
        color: var(--colorBlanco);
        margin: 0 2rem;
        text-align: center;
    }

    .articleContainerInMain p {
        text-align: center;
        margin-bottom: 3rem;
        font-family: 'Poppins';
        font-size: 0.9rem;
    }

    .articleContainerInMain a {
        background: var(--colorBoton);
        padding: 1rem;
        color: var(--colorBlanco);
        border-radius: 12px;
        font-family: 'Fraunces';
    }

    .articleContainerInMain a:hover {
        scale: 1.1;
        background-color: var(--colorNaranjita);
    }

    .espacioParaImagenInMain {
        width: 100vw;
        height: 13rem;
        overflow: hidden;
        margin-top: 2.5rem;
        margin-bottom: -1.5rem;

        position: relative;
    }

    .imagenParalajeHero {
        width: 150%;
        height: auto;
        object-fit: contain;
        position: absolute;
        top: -50%;
        left: -20%;
    }

    /* sobre noosotros */
    #sobrenosotros {
        background-color: var(--colorBlanco);
    }

    .inicioNosotros {
        background-color: var(--colorRosita);
        height: 12.5dvh;
        position: relative;
    }

    .picoDecorativo {
        width: 40vw;
        position: absolute;
        bottom: -2%;
        left: 50%;
        transform: translateX(-50%);
    }

    .venus {
        position: absolute;
        width: 100vw;
        left: -15%;
        bottom: -310%;
    }

    .contenedorContenidoNosotros {
        margin-top: 7rem;
    }

    .contenedorContenidoNosotros h2 {
        text-align: right;
        font-family: 'Orelega One';
        font-weight: lighter;
        font-size: 1.8rem;
        margin-right: 1rem;
        color: var(--colorAzulIndigoClaro);
    }

    .contenedorContenidoNosotros .parrafosSobreNosotros {
        margin: 0 2rem;
        margin-top: 8.5rem;
        font-family: 'Fraunces';
        font-size: 1.1rem;
        color: var(--colorGris);
    }

    .parrafosSobreNosotros p:last-child {
        width: 19ch;
        margin-top: 2rem;
    }

    .parrafosSobreNosotros p {
        text-indent: 1rem;
    }

    #museoFinalNosotros {
        display: none;
    }

    .finalNosotros {
        position: relative;
    }

    #columnaFinalNosotros {
        width: 50%;
        position: absolute;
        right: -7%;
        bottom: -7%;
        z-index: 3;
    }

    .aurigaImagen {
        margin-left: -1rem;
        margin-top: -2rem;
        width: 77%;
        z-index: 2;
    }

    .rotar180 {
        transform: rotate(180deg);
        width: 40vw;
        position: absolute;
        bottom: -15%;
        left: 30%;
        z-index: 2;
    }

    .contenedorH1 h1,
    .contenedorH1 span {
        font-family: 'Capi' !important;
    }

    /* metodologia */

    .title {
        background: var(--colorHuevo);
        padding: 3rem;
        padding-bottom: 0rem;
        padding-left: 2rem;
        padding-top: 4rem;
    }

    .title h2 {
        font-family: 'Orelega One';
        color: var(--colorAzulUltraMarina);
        font-weight: lighter;
        font-size: xx-large;
    }

    .central-circle,
    .orbit,
    .imagenNinfaContenedor {
        display: none;
    }

    #metodologia {
        background: var(--colorBlanco);
        position: relative;
    }

    .contenedorMetodo {
        display: flex;
    }

    .contenedorMetodo:nth-child(even) {
        flex-direction: row-reverse;
    }

    .contenedorMetodo:last-of-type {
        padding-bottom: 2rem;
    }

    .contenedorImagen {
        margin: 0 0.4rem;
        display: grid;
        place-items: center;
        z-index: 2;
    }

    .contenedorImagen img {
        width: 20vw;
        height: 20vw;
        /* border: 2px solid var(--colorRosita);
        border-radius: 50%; */
        padding: 0.5rem;
        /* background: var(--colorHuevo); */
    }

    .contenedorTexto {
        margin: 0 1rem;
        z-index: 2;
    }

    .contenedorTexto h2 {
        font-family: 'Fraunces';
        margin-bottom: -0.5rem;
        color: var(--colorAzulIndigoClaro);
        font-weight: 500;
    }

    .contenedorTexto p {
        color: var(--colorAzulUltraMarina);
        font-family: 'Poppins';
    }

    .marcoFlores,
    .cabezaAngel {
        position: absolute;
        width: 40vw;
    }

    .marcoFlores {
        opacity: 40%;
        top: 23.5%;
        left: -70%;
        width: 175vw;
        z-index: 1;
    }

    .cabezaAngel {
        width: 110vw;
        bottom: 0;
        right: 0;
        opacity: 50%;
    }

    /* modalidades  */

    #modalidades {
        background-image: url('/public/img/miscelaneas/patronazul_DERECHA.png');
        background-position: -100vw -5vw;
        padding-top: 13rem;
        background-size: 350vw;
        background-color: #170c66;
        background-repeat: no-repeat;
    }

    #modalidades img:first-of-type {
        width: 50%;
        margin: 0 auto;
        display: block;
        padding-bottom: 3.2rem;
    }

    #contenidoModalidades {
        background: var(--colorAzulIndigoClaro);
        border-radius: 36px;
        padding: 2rem 1rem;
    }

    .titulos * {
        margin: 0;
    }

    .titulos p {
        color: var(--colorBorderMetologiaBotones);
        font-family: 'Fraunces';
        font-weight: 500;
        font-size: large;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    .titulos h3 {
        color: var(--colorRosita);
        font-family: 'Orelega One';
        font-weight: 300;
        font-size: xx-large;
        margin-bottom: 1rem;
    }

    .cardsContainer section {
        background: var(--colorBlanco);
        border-radius: 36px;
        box-shadow: 5px 7px 5px hsla(0, 0%, 0%, 0.309);
        padding-bottom: 3rem;
        margin-bottom: 1.5rem;
    }

    .cardsContainer section:first-of-type {
        margin-bottom: 3rem;
    }

    .cardsContainer li {
        font-family: 'Fraunces';
        margin-bottom: 1rem;
    }

    .cardsContainer span {
        color: var(--colorNaranjita);
    }

    .ContenedorMasInfo {
        text-align: center;
        padding-top: 1rem;
    }

    .ContenedorMasInfo a {
        background: var(--colorRosita);
        color: var(--colorAzulUltraMarina);
        padding: 1rem;
        font-family: 'Fraunces';
        border-radius: 16px;
        box-shadow: 5px 7px 5px hsla(0, 0%, 0%, 0.309);
    }

    .enunciado {
        text-align: center;
        margin: 0;
        padding: 0;
        position: relative;
    }

    .enunciado * {
        margin: 0 !important;
        padding: 0 !important;
    }

    .enunciado img {
        width: 100% !important;
        height: 5rem;
        object-fit: cover;
        border-radius: 36px 36px 0 0;
        opacity: 0.7;
    }

    .enunciado h4 {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        color: white;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        font-family: 'Orelega One';
        font-size: x-large;
        font-weight: 100;
        z-index: 2;
    }

    .parteDeAbajo {
        transform: rotate(180deg);
        width: 50%;
        margin: 0 auto;
        display: block;
        padding-bottom: 2.2rem;
    }

    /* CONTACTO */

    #contacto {
        background-image: url('/public/img/miscelaneas/patronazul_DERECHA.png');
        background-position: -100vw -0vw;
        padding-top: 6rem;
        background-size: 350vw;
    }

    .navigation p {
        font-family: 'Orelega One';
        color: var(--colorNaranjita);
        font-size: x-large;
        font-weight: lighter;
        width: 16ch;
        margin-left: 1.5rem;
    }

    .review {
        position: absolute;
        transition: opacity 0.5s ease-in-out;
        opacity: 1;
        display: block;
        background: var(--colorBlanco);
        margin: 2.4rem;
        padding: 1rem;
        border-radius: 24px;
        font-family: 'Poppins';
        padding-bottom: 2rem;
    }

    .estrellas {
        width: 100px;
        height: 100px;
        background-image: url(/public/img/miscelaneas/estrellas.svg);
        background-repeat: repeat-x;
        background-size: calc(100% / 5) 100%;
        margin-right: -0.5rem;
    }

    .review.hidden {
        opacity: 0;
        pointer-events: none;
        /* Optional: Prevent interaction with hidden elements */
    }

    .cabeceraReview {
        margin-top: -2.24rem;
        margin-left: -1rem;
        margin-bottom: -2rem;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .cabeceraReview h4 {
        color: var(--colorGris);
        font-size: small;
    }

    .review p {
        margin-bottom: -0.7rem;
    }

    .cabeceraReview>img {
        aspect-ratio: 153/138;
        width: 15vw;
        margin-right: -1rem;
    }

    .review.hidden.display-none {
        display: none;
    }

    .review:last-of-type {
        background: red;
        display: none;
    }

    .prevContainer {
        position: relative;
    }

    #prevBtn {
        transform: rotate(-90deg);
        position: absolute;
        top: 11.3rem;
        width: 2rem;
    }

    .review-container {
        padding-bottom: 3rem;
    }

    .nextContainer {
        position: relative;
    }

    #nextBtn {
        transform: rotate(-90deg);
        position: absolute;
        right: 0;
        top: 3.35rem;
        width: 2rem;
    }

    .contactoContainer {
        margin-top: 25rem;
        position: relative;
        background: var(--colorBlanco);
        position: relative;
    }

    .picoContacto {
        top: -5%;
        left: 50%;
        transform: translate(-50%);
        width: 50%;
        position: absolute;
    }

    .contactoContainer header h3 {
        font-family: 'Orelega One';
        color: var(--colorAzulIndigoClaro);
        font-size: xx-large;
        padding: 1.5rem;
        font-weight: lighter;
    }


    .contactoContainer form * {
        margin-bottom: 0.25rem;
        font-size: large;
    }

    .contactoContainer form option {
        font-size: small;
    }

    .contactoContainer form *:not(label) {
        border: none;
        padding: 0.8rem;
        margin-left: 0.75rem;
    }

    .custom-select select {
        width: 100%;
    }

    .contactoContainer form {
        background: var(--colorHuevo);
        padding: 2rem;
        display: flex;
        flex-direction: column;
        margin: 0 1rem;
        margin-top: -1rem;
        border-radius: 24px;
    }

    .contactoContainer form label {
        font-family: 'Orelega One';
        color: var(--colorBorderMetologiaBotones);
    }

    textarea {
        height: 5rem;
    }

    .contactoContainer form button[type="submit"] {
        display: block;
        margin: 0 auto;
        margin-top: 1rem;
        background: var(--colorRosita);
        padding: 1rem 2rem;
        box-shadow: 5px 5px 5px hsla(0, 0%, 0%, 0.316);
        border-radius: 24px;
        color: var(--colorAzulUltraMarina);
        font-family: 'Fraunces';
        z-index: 1000;
    }

    .contactoContainer form input,
    .contactoContainer form textarea {
        z-index: 90;
    }

    .contactoContainer form+figure {
        background: url(/public/img/miscelaneas/patronazul_DERECHA.png);
        background-position: -100vw -5vw;
        background-size: 350vw;
        height: 4rem;
        margin: 0;
    }

    .contactoContainer form+figure img:first-of-type {
        width: 20rem;
        position: absolute;
        left: -4rem;
        bottom: 0%;
        z-index: 0;
        width: 21rem;
        z-index: 100;
    }

    .contactoContainer form+figure img:nth-of-type(2) {
        width: 13rem;
        position: absolute;
        right: -10%;
        bottom: 32rem;
    }

    .contactoContainer {
        height: min-content;
    }



    /* cambios tamaño iconos */
    .img_0 img {
        width: 35vw;
        height: auto;
        padding: 0.01rem;
        margin-right: -1rem;
    }

    .img_1 img {
        width: 21vw;
        height: auto;
        margin-left: -1rem;
    }

    .img_2 img {
        width: 25vw;
        height: auto;
    }

    .img_3 img {
        width: 22vw;
        height: auto;
        margin-right: 0.3rem;
        margin-left: -2rem;
    }

    .img_3+article p {
        width: 22ch;
    }

    .contenedorMetodo:nth-of-type(7) {
        height: 30vh;
        margin-bottom: 2.5rem;
    }

    .img_4 img {
        padding-left: 0.8rem;
        width: 25vw;
    }

    .contenedorMetodo:nth-of-type(8) {
        margin-top: 1rem;
    }

    .img_5 img {
        width: 23vw;
    }

    .img_7 img {
        width: 22vw;
        height: auto;
        margin-right: 0.5rem;
    }

    .contenedorTexto p {
        text-indent: 0.5rem;
    }

    .final {
        display: none;
    }

    .spinner {
        width: 40px;
        height: 40px;

        position: absolute;
        margin: 100px auto;
        bottom: 15%;
        left: 35%;
    }

    .double-bounce1,
    .double-bounce2 {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: var(--colorAzulIndigoClaro);
        opacity: 0.6;
        position: absolute;
        top: 0;
        left: 0;

        -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
        animation: sk-bounce 2.0s infinite ease-in-out;
    }

    .double-bounce2 {
        -webkit-animation-delay: -1.0s;
        animation-delay: -1.0s;
    }

    @-webkit-keyframes sk-bounce {

        0%,
        100% {
            -webkit-transform: scale(0.0)
        }

        50% {
            -webkit-transform: scale(1.0)
        }
    }

    @keyframes sk-bounce {

        0%,
        100% {
            transform: scale(0.0);
            -webkit-transform: scale(0.0);
        }

        50% {
            transform: scale(1.0);
            -webkit-transform: scale(1.0);
        }
    }

    .mail {
        background: none !important;
        font-size: medium !important;
        font-family: 'Poppins';
        position: relative;
        margin-left: 2rem;
        font-style: italic;
    }

    .mail img {
        position: absolute;
        left: -5%;
    }

    .mail:hover {
        scale: 1.0 !important;
        font-size: medium !important;
    }

    .emailContainer {
        width: 100vw;
        display: grid;
        place-content: center;
        margin-top: 2rem;
        margin-left: -2rem;
    }

    .emailContainer a {
        display: flex;
        align-items: center;
    }

    /* Estilos para el modal de login en pantallas pequeñas */
    .login-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .login-modal-content {
        background: var(--colorAzulIndigoClaro);
        padding: 2rem;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        position: relative;
        width: 70vw;
        font-family: 'Orelega One';
    }

    .login-modal-content form {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .login-modal-content form label {
        color: var(--colorBlanco);
        margin-bottom: 0.2rem;
        font-size: larger;
        align-self: flex-start;
    }

    .login-modal-content form input {
        border: none;
        border-radius: 2px;
        height: 2rem;
        margin-bottom: 1rem;
        padding-left: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .login-modal-content form button[type="submit"] {
        width: fit-content;
        margin: 0 auto;
        font-family: 'Orelega One';
        padding: 0.5rem 1rem;
        font-size: medium;
        border: none;
        border-radius: 16px;
        box-shadow: 5px 5px 3px hsla(0, 0%, 0%, 0.483);
        background: var(--colorRosita);
        color: var(--colorAzulUltraMarina);
        cursor: pointer;
    }

    .login-modal-content .close-container {
        position: absolute;
        top: -1rem;
        left: -1rem;
        background: var(--colorAzulIndigoClaro);
        border-radius: 50%;
    }

    .login-modal-content .close-btn {
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--colorBlanco);
        background: var(--colorRojo);
        border: none;
        border-radius: 50%;
        padding: 0.2rem 0.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    /* Estilos para el toast de error en pantallas pequeñas */
    .error-toast {
        position: fixed;
        top: 20px;
        right: 10px;
        left: 10px;
        z-index: 10001;
        animation: slideInRight 0.3s ease-out;
    }

    .toast-content {
        background: #dc2626;
        color: var(--colorBlanco);
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: 'Poppins';
        font-size: 0.9rem;
        min-width: auto;
        border-left: 4px solid #991b1b;
    }

    .toast-icon {
        font-size: 1.2rem;
    }

    .toast-message {
        flex: 1;
    }

    .toast-close {
        background: none;
        border: none;
        color: var(--colorBlanco);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color 0.2s;
    }

    .toast-close:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes slideOutRight {
        from {
            transform: translateX(0);
            opacity: 1;
        }

        to {
            transform: translateX(100%);
            opacity: 0;
        }
    }
}