/* Hover solo en escritorio */
@media (min-width: 769px) {
    .header nav ul li:hover > ul {
        display: flex;
    }
    .header nav ul li.submenu > ul li.submenu:hover > ul {
        display: flex;
    }
}

@media  screen and (max-width: 768px) {
    * {
        box-sizing: border-box;
    }

    /* -------------------------------------- */
    /* Estilos del Header para Móviles */
    /* -------------------------------------- */

    .header-content {
        padding: 15px 20px;
    }
    .menu-toggle {
        display: block;
    }
    .header nav {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    }
    .header nav ul {
        flex-direction: column;
        gap: 0;
    }
    .header nav ul li {
        width: 100%;
    }
    .header nav ul li a {
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
    }
    .header nav.active {
        max-height: 600px;
    }
    /* Submenús móviles */
    .header nav ul li ul {
        position: static;
        display: none;
        box-shadow: none;
        background: #f9f9f9;
        padding-left: 20px;
        min-width: unset;
    }
    .header nav ul li ul ul {
        padding-left: 20px;
    }
    .header nav ul li.submenu.submenu-open > ul {
        display: block;
    }

    /* CAMBIO 2 (Móvil): También se aplica el hover aquí si es táctil, o simplemente para consistencia visual */
    .header nav ul li ul li a:active {
        background-color: #fce4ec; 
        color: #e91e63;
    }

    /* -------------------------------------- */
    /* Estilos del banner*/
    /* -------------------------------------- */
    #organizacion-de-eventos-banner {
        height: 52vh;
    }

    .banner-background-image {
        width: 100%;
        left: 0;
        filter: brightness(0.7); /* Estado final fijo: más oscuro */
    }

    .banner-overlay {
        margin: 0;
    }

    .banner-overlay::before {
        background-color: rgba(88, 87, 87, 0.75); /* Capa gris oscura (estado final) */
        background-image: none; /* Sin patrón */
    }

    .banner-text-initial {
        opacity: 0; /* Oculta el texto gris */
    }

    .banner-text-hover {
        opacity: 1; /* Muestra el texto naranja (estado final) */
        max-width: 80vw;
        top: 40%;
    }

    .sub-text {
        top: 58%;
        font-size: 1.6em;
        opacity: 1; /* Siempre visible */
    }

    .animation-dots {
        top: 66%;
        opacity: 1; /* Siempre visibles */
    }

    /* Mantener la animación de los puntos */
    .dot-1 {
        animation: dot-pulse 3s infinite ease-in-out;
        animation-delay: 0s;
    }

    .dot-2 {
        animation: dot-pulse 3s infinite ease-in-out;
        animation-delay: 1s;
    }

    .dot-3 {
        animation: dot-pulse 3s infinite ease-in-out;
        animation-delay: 2s;
    }

    /* Eliminar las animaciones automáticas entre estados */
    .banner-container,
    .banner-container::after,
    .banner-text-initial,
    .banner-text-hover,
    .sub-text {
        animation: none !important;
    }


    /* -------------------------------------- */
    /* Estilos del servicio descripcion */
    /* -------------------------------------- */
    #organizacion-de-eventos-descripcion {
        height: 65vh;
    }
    .service-description-animated-container-2 {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        position: relative;
    }

    .animated-chef-image-2 {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 2;
        background-color: #f7f7f7;
        transition: opacity 1.8s ease-in-out;
        opacity: 1;
    }

    .animated-chef-image-2 img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 15px;
    }

    .animated-text-content-2 {
        position: relative;
        height: 20vh;
        z-index: 3;
        opacity: 0;
        transition: opacity 1.8s ease-in-out;
        padding: 40px 15px;
        margin-top: 60px;
        margin: -10px auto 0;
    }

    .animated-text-content-2 h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .animated-text-content-2 p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* --- Animación automática con Intersection Observer --- */
    @keyframes fadeInOutImage {
        0% { opacity: 1; }
        60% { opacity: 0; }
        100% { opacity: 0; }
    }

    @keyframes fadeInText {
        0% { opacity: 0; }
        60% { opacity: 1; }
        100% { opacity: 1; }
    }

    .service-description-animated-section-2.in-view .animated-chef-image-2 {
        animation: fadeInOutImage 6s forwards;
    }

    .service-description-animated-section-2.in-view .animated-text-content-2 {
        animation: fadeInText 6s forwards;
    }

    /* -------------------------------------- */
    /* Estilos de beneficios */
    /* -------------------------------------- */
    .beneficios-container {
        flex-direction: column;
        gap: 20px;
    }

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

    .beneficios-header h2 {
        font-size: 1.6rem;
    }

    .beneficios-header p {
        font-size: 1rem;
    }

    /* -------------------------------------- */
    /* Estilos de como se ofrece */
    /* -------------------------------------- */
    .how-offer-section {
        padding: 40px 20px;
        border-radius: 0;
        min-height: auto; /* La altura se ajustará al contenido */
    }

    /* Ocultar elementos decorativos en móvil */
    .how-offer-section::before,
    .how-offer-section::after {
        display: none;
    }

    .how-offer-container {
        flex-direction: column; /* Apila los elementos */
        text-align: center; /* Centra el texto */
        padding: 0;
    }

    .how-offer-text-content {
        margin-left: 0; /* Elimina el margen */
        padding: 0 10px; /* Padding para el texto */
        align-items: center; /* Centra el texto */
        order: 1; /* El texto va primero */
        margin-bottom: 30px;
    }
    .how-offer-text-content h2 {
        font-size: 1.9rem;
        margin-bottom: 15px;
    }
    .how-offer-text-content p {
        font-size: 1rem;
        max-width: 100%;
    }

    /* Imagen circular en móvil (inicialmente oculta, sin ocupar espacio) */
    .how-offer-image-wrapper {
        order: 2; /* La imagen va después del texto */
        height: 0; /* No ocupa espacio inicialmente */
        padding: 0;
        opacity: 0;
        transform: translateY(20px); /* Para una animación de entrada */
        transition: opacity 2.0s ease-out, transform 2.0s ease-out, height 2.0s ease-out, padding 2.0s ease-out;
        visibility: hidden;
    }

    .how-offer-image-wrapper img {
        width: 250px; /* Tamaño de imagen más pequeño para móvil */
        height: 250px;
        box-shadow: none; /* Quitamos la sombra para un look más limpio en móvil */
    }

    /* Clase para mostrar la imagen y ocupar espacio */
    .how-offer-section.is-visible .how-offer-image-wrapper {
        height: auto; /* Ocupa el espacio que necesita */
        padding: 20px 0; /* Agrega padding cuando es visible */
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }


    /* -------------------------------------- */
    /* Estilos del Formulario */
    /* -------------------------------------- */
    .contact-form-container {
        height: auto;
        width: auto;
        padding: 40px 20px;
    }

    /* Cambia a una columna vertical */
    .contact-form-wrapper {
        flex-direction: column;
        height: auto;
        padding: 0;
    }

    /* Ajusta el contenido del formulario para ocupar todo el ancho */
    .contact-form-content {
        width: 100%;
        padding: 0;
    }

    /* Oculta la imagen en móviles */
    .contact-form-image-box {
        display: none;
    }

    /* Ajusta el tamaño del título principal */
    .contact-form-title {
        font-size: 40px;
        margin-bottom: 15px;
    }

    /* Ajusta el subtítulo y el espacio */
    .contact-form-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }

    /* Ajusta los estilos de los campos del formulario */
    .contact-form label {
        font-size: 15px;
    }

    /* Ajusta el padding y la separación de los campos */
    .contact-form .form-group {
        margin-bottom: 20px;
    }

    /* Ajusta la línea divisoria */
    .form-divider {
        margin: 30px 0;
    }

    /* -------------------------------------- */
    /* Estilos del footer completo */
    /* -------------------------------------- */
    .main-footer, .footer-top-bg, .footer-bottom-bg {
        padding: 0;
    }
    
    .footer-top {
        flex-direction: column;
        align-items: center;
        height: auto;
        padding: 40px 15px;
    }
    
    .footer-content-wrapper,
    .footer-logo-social,
    .footer-links-container,
    .footer-contact-info {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .footer-links-container {
        flex-direction: column;
        gap: 20px;
        margin: 30px 0;
    }
    
    .footer-logo-social {
        margin-bottom: 20px;
        margin: 50px auto 0;
    }
    
    .social-icons {
        justify-content: center;
        margin: 50px auto 0;
    }

    .footer-contact-info {
        padding: 20px;
        border-radius: 20px;
        width: 100%;
    }

    .footer-bottom {
        flex-direction: center;
        gap: 5px;
    }
    
    /*----------MODAL-------------*/
    /*----------------------------*/
    /*----------------------------*/
    .modal-content-custom {
        padding: 30px 20px; 
        max-width: 95%;
        margin: 20px; 
    }

    .modal-title-custom {
        font-size: 45px; /* Ligeramente más grande que en el ejemplo anterior, aprovechando el ancho extra hasta 768px */
    }
    
    .modal-check-mark {
        width: 80px;
        height: 80px;
        margin: 15px auto;
    }

    .modal-check-mark::after {
        font-size: 50px; /* Ajusta el tamaño del check */
    }

    .close-button-custom {
        font-size: 26px; 
        top: 10px;
        right: 15px;
    }
}