/*
Theme Name: Astra Child
Theme URI: https://tu-sitio.com/
Description: Tema hijo para Astra.
Author: Tu Nombre
Author URI: https://tu-sitio.com/
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/**********************************************************************************************/
/**********************************************************************************************/
/**********************************************************************************************/
/* --- PAGINA DE PRODUCTOS --- */
/**********************************************************************************************/
/**********************************************************************************************/
/**********************************************************************************************/

body:not(.home) .ast-container {
    margin-top: 50px;
}

.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail{
	border-radius:20px !important;
}

/* Evita que el scroll del body se active cuando el menú móvil está abierto */
body.menu-overlay-active {
    overflow: hidden;
}


/**********************************************************************************************/
/**********************************************************************************************/
/**************************** HEADER COVER  *******************************/
/**********************************************************************************************/
/**********************************************************************************************/
/* 1) Asegura que el cover recorte lo que sobresalga */
.wp-block-cover.alignfull {
    overflow: hidden;
}

/* 2) Convierte el fondo en un semicírculo perfecto */
.wp-block-cover.alignfull .wp-block-cover__background.has-background-gradient {
    display: block;
    /* para que el border-radius abarque todo el área */
    width: 100%;
    height: 100%;

    /*
    — 50% del ancho → radio horizontal
    — 100% de la altura → radio vertical
    Juntos crean una media elipse en el borde inferior
  */
    border-bottom-left-radius: 45% 20%;
    border-bottom-right-radius: 45% 20%;
}

.wp-block-cover .wp-block-cover__image-background,
.wp-block-cover video.wp-block-cover__video-background,
.wp-block-cover-image .wp-block-cover__image-background,
.wp-block-cover-image video.wp-block-cover__video-background {
    display: block;
    /* para que el border-radius abarque todo el área */
    width: 100%;
    height: 100%;

    /*
    — 50% del ancho → radio horizontal
    — 100% de la altura → radio vertical
    Juntos crean una media elipse en el borde inferior
  */
    border-bottom-left-radius: 45% 20%;
    border-bottom-right-radius: 45% 20%;
}

@media (max-width: 768px) {

    /* Hero cover background (gradiente) */
    .wp-block-cover.alignfull .wp-block-cover__background.has-background-gradient {
        border-bottom-left-radius: 40% 10%;
        border-bottom-right-radius: 40% 10%;
    }

    /* Imagen o vídeo de fondo */
    .wp-block-cover .wp-block-cover__image-background,
    .wp-block-cover video.wp-block-cover__video-background,
    .wp-block-cover-image .wp-block-cover__image-background,
    .wp-block-cover-image video.wp-block-cover__video-background {
        border-bottom-left-radius: 40% 10%;
        border-bottom-right-radius: 40% 10%;
    }
}



/**********************************************************************************************/
/**********************************************************************************************/
/**************************** bloque de categorias homepage   *******************************/
/**********************************************************************************************/
/**********************************************************************************************/

/* Estilos para el bloque de categorías de la homepage */
.categorias-homepage-wrapper {
    display: grid;
    gap: 10px;
    /* Espacio entre los elementos de la cuadrícula */
    margin-bottom: 40px;
    /* Espacio debajo del bloque */
    max-width: 1200px;
    /* Ancho máximo para centrar el bloque */
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px
}

.categoria-item {
    border-radius: 10px;
    /* Borde redondeado para el contenedor, aunque las imágenes ya lo tengan */
    overflow: hidden;
    /* Asegura que el contenido interno (imagen) respete el border-radius */
    transition: transform 0.3s ease-in-out;
    /* Transición suave al pasar el ratón */
}

.categoria-item:hover {
    transform: translateY(-5px);
    /* Pequeño efecto de elevación al pasar el ratón */
}

.categoria-item a {
    display: block;
    /* Para que el enlace ocupe todo el espacio del div */
    line-height: 0;
    /* Elimina espacio extra debajo de la imagen si lo hubiera */
}

.categoria-item img {
    width: 100%;
    /* La imagen ocupa el 100% del ancho de su contenedor */
    height: auto;
    /* Mantiene la proporción de la imagen */
    display: block;
    /* Elimina espacio extra debajo de la imagen */
    border-radius: 10px;
    /* Si tus imágenes no vienen redondeadas, esto las redondearía */
    /* Asegúrate de que tus imágenes sean aproximadamente rectangulares para un mejor ajuste */
}

/* Disposición para Desktop y Tablet (2 filas, 3 columnas) */
@media (min-width: 768px) {
    .categorias-homepage-wrapper {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columnas de igual ancho */
    }
}

/* Disposición para Móvil (3 filas, 2 columnas) */
@media (max-width: 767px) {
    .categorias-homepage-wrapper {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columnas de igual ancho */
    }

    /* .categoria-item img { */
    /* Puedes ajustar el tamaño o aspecto de las imágenes para móvil si es necesario */
    /* } */
}


/**********************************************************************************************/
/**********************************************************************************************/
/**************************** bloque productos por categoria     *****************************/
/**********************************************************************************************/
/**********************************************************************************************/

/* Swiper Container - Se adapta al ancho del contenedor principal del tema */
.astra-child-product-carousel-section {
    position: relative;
    /* Mantenemos relativo para posicionar elementos internos si es necesario */
    padding: 30px 20px;
    /* Padding vertical, los laterales ya los maneja Swiper si tiene gap */
    box-sizing: border-box;
    /* Asegura que el padding no añada más ancho */
    /* Para centrar la sección si el contenedor padre tiene un ancho fijo y el slider no es full-width */
    overflow: hidden;
    /* Importante para que el swiper no se desborde si el theme tiene padding */
    margin-left: -20px !important;
    margin-right: -20px !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    max-width: 100vw !important;
    width: 100vw !important;
}

/* Color de fondo para las secciones impares (1ra, 3ra, 5ta, etc.) */
.astra-child-product-carousel-section:nth-of-type(odd) {
    background-color: #ffffff;
}

/* Color de fondo para las secciones pares (2da, 4ta, 6ta, etc.) */
.astra-child-product-carousel-section:nth-of-type(even) {
    background-color: #f7f4f9;
    /* Blanco puro */
}

.astra-child-product-carousel-section a {
    text-decoration: none !important;
}


/* Centrar el título de la categoría */
.astra-child-carousel-category-title {
    text-align: left;
    margin-bottom: 20px;
    font-size: 1.8em !important;
    /* Ajustado ligeramente más grande */
    color: #333;
    padding: 0 15px;
    /* Pequeño padding horizontal para que no toque los bordes */
    font-weight: 700;
    /* Negrita para el título */
    text-transform: uppercase;
}

/* Estilos de cada slide de producto */
.astra-child-product-slide {
    display: flex;
    flex-direction: column;
    /* Asegura que los elementos se apilen verticalmente */
    justify-content: space-between;
    /* Distribuye espacio entre el título, imagen, precio y botón */
    align-items: center;
    /* Centra horizontalmente el contenido dentro del slide */
    height: auto;
    /* Permite que la altura se ajuste al contenido */
    border-radius: 20px;
    overflow: hidden;
}

.astra-child-product-slide-inner {
    text-align: center;
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Asegura que el contenido interno ocupe todo el slide */
    justify-content: space-between;

}

.astra-child-product-image-link img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    /* Centrar la imagen y darle margen inferior */
    border-radius: 30px;
    /* Bordes suaves para las imágenes */
}

.astra-child-product-title {
    font-size: 1em !important;
    /* Ligeramente más grande */
    font-weight: 500 !important;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1;
    /* Permite que el título ocupe el espacio disponible */
    min-height: 3em;
    /* Asegura un alto mínimo para que los títulos de una línea no desplacen el precio */
    display: flex;
    /* Usamos flex para centrar verticalmente el texto si es de una línea */
    align-items: center;
    justify-content: center;
}

.astra-child-product-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.astra-child-product-title a:hover {
    color: #0073e6;
    /* Color de hover para los enlaces */
}

.astra-child-product-price {
    font-size: 1.2em;
    /* Ligeramente más grande */
    font-weight: 600;
    color: #000;
    /* Color distintivo para el precio */
    margin-bottom: 15px;
    margin-top: -25px;
}

.astra-child-product-button {
    margin-top: -10px !important;
}

.astra-child-product-button .button {
    display: inline-block;
    background-color: #0073e6;
    /* Color de tu botón principal */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    /* Eliminar borde por defecto de algunos temas */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Sombra para el botón */
}

.astra-child-product-button a {
    padding: 10px 20px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    color: #fff !important;
    background-color: #ff00c0 !important;
    white-space: nowrap;
}


.astra-child-product-button .button:hover {
    background-color: #005bb5;
    /* Color de hover para el botón */
    transform: translateY(-2px);
    /* Pequeño efecto de elevación al pasar el ratón */
}

/* Paginación de Swiper */
.swiper-pagination {
    position: relative !important;
    /* Asegura que la paginación sea visible si el contenedor padre tiene overflow: hidden */
    margin-top: 25px !important;
    /* Añade espacio entre los slides y la paginación */
}

.swiper-pagination-bullet {
    background-color: #c2c2c2 !important;
    padding: 4px;
}

.swiper-pagination-bullet-active {
    background: transparent !important;
    /* Color del punto activo */
    padding: 5px;
    border: 1px solid #000;
}

/* Estilos para el botón "Ver más [Categoría]" */
.astra-child-carousel-view-more {
    text-align: right;
    margin-top: 20px;
}

.astra-child-carousel-view-more .button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.astra-child-carousel-view-more .button:hover {
    background-color: #e0e0e0;
    color: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* --- Ajustes Generales para compatibilidad con Astra y Gutenberg --- */
/* Asegura que los bloques de shortcode no tengan márgenes negativos o anchos forzados */
.entry-content .wp-block-shortcode {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
}

/* Ajustes si Astra u otros plugins añaden padding global que afecte nuestros bloques */
.entry-content .wp-block-group.has-global-padding,
.entry-content .wp-block-cover.has-global-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
}



/* Media Queries para responsividad específica del slider */
@media (max-width: 768px) {
    .astra-child-product-carousel-section {
        padding: 20px 10px;
        /* Reducir el padding para móviles y añadir padding lateral */
        margin-left: -20px !important;
        margin-right: -20px !important;
    }

    .astra-child-carousel-category-title {
        font-size: 1.8em;
        /* Título más pequeño en móviles */
    }
}



/**********************************************************************************************/
/**********************************************************************************************/
/**********************************************************************************************/
/* --- Estilos para tu Footer Personalizado --- */
/**********************************************************************************************/
/**********************************************************************************************/
/**********************************************************************************************/

:root {
    --gray-bg: #f4f4f4;
    --text-dark: #333;
    --text-muted: #555;
    --divider: #e0e0e0;
    --whatsapp: #25d366;
    --font-base: 'Nunito', Arial, sans-serif;
}

/* ============================= */
/* Footer general                */
/* ============================= */
#mi-footer {
    font-family: var(--font-base);
    color: var(--text-dark);
    position: relative;
    margin-top: 0;
}

/* ============================= */
/* 1) Sección de características */
/* ============================= */
.footer-features {
    position: relative;
    background: var(--gray-bg);
    padding: 80px 2% 40px;
    overflow: hidden;
}

/* curva “joroba” SVG en top */
.footer-features .l-section-shape.pos_top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    color: var(--gray-bg);
}

.footer-features .l-section-shape.pos_top svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* lista flex de ítems */
.features-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    margin-top: 80px;
    /* separa de la curva */
}

/* desktop: 6 columnas */
.feature-item {
    flex: 1 1 calc(16.666% - 24px);
    max-width: calc(16.666% - 24px);
    text-align: center;
}

.feature-item img {
    display: block;
    margin: 0 auto 8px;
    width: 80px;
    height: 80px;
}

.feature-item figcaption {
    font-size: 14px;
    line-height: 1.3;
}

/* tablet: 3 columnas → 2 filas */
@media (max-width: 768px) {
    .feature-item {
        flex: 1 1 calc(33.333% - 24px);
        max-width: calc(33.333% - 24px);
    }
}

/* móvil: 2 columnas → 3 filas */
@media (max-width: 480px) {
    .feature-item {
        flex: 1 1 calc(50% - 24px);
        max-width: calc(50% - 24px);
    }
}

/* ============================= */
/* 2) Sección de información     */
/* ============================= */
.footer-info {
    background: var(--gray-bg);
    text-align: center;
    padding: 24px 2% 40px;
}

/* separador */
.footer-divider {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 0 auto 24px;
    width: 80%;
}

/* menú de enlaces */
.footer-nav .footer-links {
    display: inline-flex;
    gap: 24px;
    padding: 0;
    margin: 0 0 16px;
    list-style: none;
}

.footer-nav .footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

/* contacto */
.footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.icon-phone {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('<?php echo get_stylesheet_directory_uri(); ?>/images/phone-icon.svg') no-repeat center;
    background-size: contain;
}

/* copyright */
.footer-copy {
    font-size: 14px;
    color: var(--text-muted);
}

/* Estilos para el header en páginas que NO son la homepage */
#custom-masthead.other-page-header {
    background-color: #01459b !important; /* Aplica el color azul deseado */
    position: fixed; /* Asegura que mantenga la posición fija */
    width: 100%; /* Ocupa todo el ancho */
    top: 0; /* Se posiciona en la parte superior */
    left: 0;
    padding: 15px 0;
    z-index: 9999;
    box-shadow: none; /* Sin sombra inicialmente */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0; /* Sin bordes redondeados inicialmente */
    margin-top: 0; /* Sin margen superior */
}

/* Estilos para el header cuando se hace scroll en "otras" páginas */
#custom-masthead.other-page-header.scrolled {
    position: fixed; /* Mantiene la posición fija */
    left: 50%;
    transform: translateX(-50%);
    width: 97%; /* Se encoge un poco */
    margin-top: 20px; /* Se separa del borde superior */
    border-radius: 40px; /* Bordes redondeados */
    background-color: rgba(255, 255, 255, 0.95) !important; /* Fondo blanco semi-transparente */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* Sombra */
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-radius 0.3s ease, margin 0.3s ease;
}

/* Color de los enlaces del menú cuando se hace scroll en "otras" páginas */
#custom-masthead.other-page-header.scrolled .main-navigation-custom li a {
    color: #002147; /* Azul marino oscuro */
}

/* Color de los enlaces del menú al pasar el ratón cuando se hace scroll en "otras" páginas */
#custom-masthead.other-page-header.scrolled .main-navigation-custom li a:hover {
    color: #003366; /* Un tono ligeramente más claro al pasar el mouse */
}

/* Asegúrate de que el texto del menú sea legible en el fondo azul inicial de "otras" páginas */
#custom-masthead.other-page-header .main-navigation-custom li a {
    color: #fff; /* Cambia el color del texto a blanco para contraste */
}

#custom-masthead.other-page-header .main-navigation-custom li a:hover {
    color: #eee; /* Un blanco más claro al pasar el mouse */
}

/* Si el botón "Contratar" también necesita ajustar color en otras páginas */
#custom-masthead.other-page-header .header-button-wrapper .btn-contratar {
    background-color: #eb4c88; /* Mantén el color original del botón o ajusta si es necesario */
    color: #fff;
}

/* Ajuste para el botón de hamburguesa en móvil si el header tiene color */
@media (max-width: 768px) {
    #custom-masthead.other-page-header {
        background-color: #01459b !important;
    }
    #custom-masthead.other-page-header .menu-toggle-bar {
        background-color: #fff; /* Blanco para las barras del menú hamburguesa */
    }

    /* Comportamiento scrolled para móvil en otras páginas */
    #custom-masthead.other-page-header.scrolled {
        background-color: rgba(255, 255, 255, 0.98) !important;
        margin-top: 0px;
        border-radius: 0; /* En móvil, quizás no quieres bordes redondeados al hacer scroll */
    }

    #custom-masthead.other-page-header.scrolled .menu-toggle-bar {
        background-color: #002147; /* Color de la barra de hamburguesa en scroll en otras páginas (móvil) */
    }
}

/**********************************************************************************************/
/**********************************************************************************************/
/**************************** HEADER  *******************************/
/**********************************************************************************************/
/**********************************************************************************************/
#custom-masthead.scrolled {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 97%;
    margin-top: 20px;
    border-radius: 40px;
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-radius 0.3s ease, margin 0.3s ease;
}

#custom-masthead.scrolled .main-navigation-custom li a {
    color: #002147;
    /* Azul marino oscuro */
}

#custom-masthead.scrolled .main-navigation-custom li a:hover {
    color: #003366;
    /* Un tono ligeramente más claro al pasar el mouse */
}

@media (max-width: 768px) {
    #custom-masthead.scrolled {
        background-color: rgba(255, 255, 255, 0.98) !important;
        margin-top: 0px;
    }

    #custom-masthead {
        background-color: transparent !important;
        position: fixed;
        width: 100%;
        top: 10px !important;
        left: 0;
        padding: 15px 0;
        z-index: 9999;
        box-shadow: none;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    #custom-masthead.scrolled .menu-toggle-bar {
        background-color: #002147;
        /* Blanco o lo que prefieras */
    }
}


#custom-masthead {
    background-color: transparent !important;
    position: fixed;
    width: 100%;
    top: 30px;
    left: 0;
    padding: 15px 0;
    z-index: 9999;
    box-shadow: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-wrapper img {
    height: 70px;
    width: auto;
    display: block;
    object-fit: contain;
}

.main-navigation-custom {
    flex-grow: 1;
    text-align: center;
}

.main-navigation-custom ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-navigation-custom li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-navigation-custom li a:hover {
    color: #f0f0f0;
}

/* Solo aplica el subrayado a los links que NO tienen submenú */
.main-navigation-custom li:not(.menu-item-has-children) a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: #f0f0f0;
    transition: width 0.3s ease-out;
}

/* La línea aparece al pasar el cursor */
.main-navigation-custom li:not(.menu-item-has-children) a:hover::after {
    width: 100%;
}

.header-button-wrapper .btn-contratar {
    background-color: #eb4c88;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.header-button-wrapper .btn-contratar:hover {
    background-color: #d63d76;
    transform: translateY(-2px);
}

.header-button-wrapper .btn-contratar .emoji {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 1024px) {
    .main-navigation-custom ul {
        gap: 15px;
    }

    .main-navigation-custom li a {
        font-size: 15px;
    }

    .header-button-wrapper .btn-contratar {
        font-size: 15px;
        padding: 10px 20px;
    }

    .logo-wrapper img {
        height: 60px;
    }
}

@media (max-width: 768px) {
    /* Oculta los elementos de escritorio en móvil */
    .desktop-menu,
    .desktop-button {
        display: none !important;
    }

    /* Asegura que el contenedor del header sea relativo para posicionar el logo absolutamente */
    .custom-header-container {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        text-align: left;
        padding: 0 20px;
    }

    /* Logo Wrapper - para centrarlo horizontalmente en móvil */
    .logo-wrapper {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        width: auto;
        max-width: 50%;
    }

    /* Estilos para el botón hamburguesa (visible en móvil) */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1000;
        position: relative;
        align-items: center;
    }

    /* Mejoras en el estilo de las barras del menú hamburguesa */
    .menu-toggle-bar {
        width: 100%;
        height: 4px;
        background-color: #fff;
        /* Color gris oscuro para mejor visibilidad */
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
        transform: translateY(12px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
        transform: translateY(-12px) rotate(-45deg);
    }

    /* Contenedor del menú móvil (el que se despliega) */
    .mobile-menu-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #f0f0f0;
        /* Fondo gris claro */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 998;
        overflow-y: auto;
    }

    .mobile-menu-container.menu-open {
        display: block !important;
    }

    /* Estilos del menú móvil (lista de ítems) */
    .main-navigation-custom.mobile-menu ul {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
    }

    .main-navigation-custom.mobile-menu li {
        width: 90%;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .main-navigation-custom.mobile-menu li:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .main-navigation-custom.mobile-menu li a {
        font-size: 18px;
        color: #333;
        /* Color gris oscuro para mejor contraste */
        display: block;
        padding: 5px 0;
    }

    .main-navigation-custom.mobile-menu li a:hover {
        color: #002147;
        /* Color un poco más oscuro al pasar el ratón */
    }

    /* Elimina la línea de subrayado del link en móvil */
    .main-navigation-custom.mobile-menu li a::after {
        display: none;
    }

    /* Oculta los submenús por defecto en móvil */
    .main-navigation-custom.mobile-menu ul ul {
        display: none;
        list-style: none;
        padding: 0;
        margin: 10px 0 0 15px;
        /* Indentación a la izquierda */
        text-align: left;
    }

    /* Estilos de los ítems del submenú en móvil */
    .main-navigation-custom.mobile-menu ul ul li {
        width: 100%;
        border: none;
        /* Elimina bordes para submenús */
        padding-bottom: 0;
        margin-bottom: 5px;
        text-align: left;
    }

    .main-navigation-custom.mobile-menu ul ul li a {
        font-size: 16px;
        color: #555;
        /* Color de texto para submenús */
        padding: 5px 0;
        display: block;
    }

    .main-navigation-custom.mobile-menu ul ul li a:hover {
        color: #003366;
    }

    /* Clase para mostrar el submenú (gestionada por JavaScript) */
    .main-navigation-custom.mobile-menu ul li.submenu-open > ul {
        display: block;
    }

    /* Ajustes adicionales para tamaños más pequeños */
    @media (max-width: 480px) {
        .logo-wrapper img {
            height: 45px;
        }

        .menu-toggle {
            width: 35px;
            height: 35px;
        }
    }
}


/* --- ESTILOS PARA ESCRITORIO (min-width: 769px) --- */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    #mobile-menu-container {
        display: none !important;
    }

    .desktop-menu {
        display: block !important;
        flex-grow: 1;
        text-align: left;
    }

    .desktop-button {
        display: flex !important;
    }

    .custom-header-container {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 30px;
    }

    .logo-wrapper {
        position: static;
        left: auto;
        transform: none;
        z-index: auto;
        width: auto;
        max-width: none;
    }

    /* Alinea los menús a la izquierda */
    .main-navigation-custom ul {
        justify-content: flex-start;
    }

    /* Estilos para los menús con submenús en ESCRITORIO */
    .main-navigation-custom ul li {
        position: relative;
    }

    /* Menús padres en negrita y espacio para la flecha */
    .main-navigation-custom ul li.menu-item-has-children > a {
        font-weight: bold;
        padding-right: 20px; /* Este espacio es clave para que no se superpongan */
        position: relative;
    }

    /* Flecha al lado derecho del texto */
    .main-navigation-custom ul li.menu-item-has-children > a::after {
        content: '\25BE'; /* Símbolo de la flecha ▼ */
        font-size: 10px;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        transition: transform 0.3s ease;
    }

    /* Gira la flecha al pasar el cursor */
    .main-navigation-custom ul li.menu-item-has-children:hover > a::after {
        transform: translateY(-50%) rotate(180deg);
    }


    /* Estilos para los submenús */
    .main-navigation-custom ul ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        animation: fadeIn 0.3s ease-out;
        z-index: 9999;
    }

    .main-navigation-custom ul ul li {
        border: none;
        margin: 0;
    }

    .main-navigation-custom ul ul li a {
        color: #002147;
        padding: 10px 20px;
        display: block;
        white-space: nowrap;
        transition: background-color 0.2s ease;
    }

    .main-navigation-custom ul ul li a:hover {
        background-color: #f0f0f0;
    }

    .main-navigation-custom ul li:hover > ul {
        display: block;
    }

    #custom-masthead:not(.scrolled) .main-navigation-custom ul ul li a {
        color: #002147;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* --- ESTILOS ADICIONALES PARA MENU MOVIL --- */
@media (max-width: 768px) {
    /* Menús padres en negrita en el menú móvil */
    .main-navigation-custom.mobile-menu li.menu-item-has-children > a {
        font-weight: bold;
        position: relative;
        padding-right: 25px; /* Deja espacio para la flecha */
    }

    /* Añade una flecha a los menús padres en móvil */
    .main-navigation-custom.mobile-menu li.menu-item-has-children > a::after {
        content: '\25BE'; /* Símbolo de flecha ▼ */
        font-size: 10px;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%) rotate(0deg);
        transition: transform 0.3s ease;
    }

    /* Gira la flecha cuando el submenú está abierto */
    .main-navigation-custom.mobile-menu li.submenu-open > a::after {
        transform: translateY(-50%) rotate(180deg);
    }
}