@media screen and (max-width: 520px)

{

    .fs-a1 {font-size: 28px;}
    .fs-a2 {font-size: 22px;}

}

@media screen and (max-width: 991.98px) {
    .fs-a1 {font-size: 28px;}
    .fs-a2 {font-size: 22px;}

    /* Estilos para el modal en móvil */
    .modal.right .modal-dialog {
        margin: 0;
        width: 100%;
        box-shadow: none !important;
    }

    .modal.right .modal-content {
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none !important;
        border: none;
    }

    /* Estilos para el menú dentro del modal */
    .modal .navbar-nav .nav-item {
        position: relative;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .modal .navbar-nav .nav-item .nav-link {
        color: var(--bs-primary) !important;
    }

    .modal .navbar-nav .nav-item.dropdown .nav-link {
        color: var(--bs-primary) !important;
    }

    /* Mostrar flecha para submenús */
    .modal .navbar-nav .dropdown > .nav-link::after {
        content: '\f107';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.3s ease;
        font-size: 1.2rem;
        color: #76BC21;
    }

    /* Rotar flecha cuando el submenu está activo */
    .modal .navbar-nav .dropdown.show > .nav-link::after {
        transform: translateY(-50%) rotate(180deg);
    }

    /* Estilos para el menú dropdown en móvil */
    .modal .dropdown-menu {
        display: none;
        position: static !important;
        width: 100%;
        margin: 0;
        padding: 0.5rem 0;
        border: none;
        background-color: #f8f9fa;
        box-shadow: none;
    }

    .modal .dropdown-menu.show {
        display: block;
    }

    .modal .dropdown-item {
        padding: 0.75rem 2rem;
        color: var(--bs-primary) !important;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .modal .dropdown-item:last-child {
        border-bottom: none;
    }

    .modal .dropdown-item:hover {
        background-color: rgba(118, 188, 33, 0.1);
        color: #76BC21;
    }

    /* Ajustes de espaciado para el menú móvil */
    .modal .navbar-nav .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        color: #333;
        font-weight: 500;
    }

    .modal .navbar-nav .nav-link:hover {
        color: #76BC21;
    }

    /* Ajustes para el modal */
    .modal-header {
        border-bottom: 2px solid #76BC21;
        padding: 1rem 1.5rem;
    }

    .modal-body {
        padding: 0;
    }

    .modal-footer {
        border-top: 2px solid #76BC21;
        padding: 1rem 1.5rem;
    }

    /* Estilos para el botón de cierre */
    .btn-close {
        opacity: 1;
        font-size: 1.2rem;
        color: #76BC21;
    }

    /* Ajustes para los enlaces del menú */
    .modal .navbar-nav {
        width: 100%;
        padding: 1rem 0;
    }

    .modal .nav-item {
        width: 100%;
    }

    .modal .nav-link {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Estilos específicos para el menú de Pinturas */
    .modal .dropdown-menu.show {
        background-color: #f8f9fa;
        padding: 0.5rem 0;
    }

    .modal .dropdown-menu .nav-link {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
        color: #333;
    }

    .modal .dropdown-menu .nav-link:hover {
        color: #76BC21;
        background-color: rgba(118, 188, 33, 0.1);
    }

    /* Estilos para el menú móvil */
    .mobile-megamenus .megamenu-content {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #fff;
        z-index: 1050;
        display: none;
        padding: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: none;
    }

    .mobile-megamenus .megamenu-content.show {
        display: block;
        transform: translateX(0);
        box-shadow: none;
    }

    /* Encabezado del megamenú móvil */
    .mobile-megamenus .megamenu-content .d-flex {
        position: sticky;
        top: 0;
        background: #fff;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        z-index: 2;
        box-shadow: none;
    }

    /* Contenedor del contenido scrolleable */
    .mobile-megamenus .megamenu-content .row {
        padding: 1.5rem;
        height: calc(100vh - 60px);
        overflow-y: auto;
        box-shadow: none;
    }

    .mobile-megamenus .megamenu-content h5 {
        color: var(--bs-primary);
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    /* Botón de cierre */
    .megamenu-close-mobile {
        padding: 0.5rem;
        margin: -0.5rem -0.5rem -0.5rem auto;
    }

    /* Contenido del megamenú */
    .mobile-megamenus .megamenu-content .col-12 {
        padding: 0 1.5rem;
        margin-bottom: 1.5rem;
    }

    .mobile-megamenus .megamenu-content h6 {
        color: var(--bs-primary);
        font-size: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    /* Enlaces del megamenú */
    .mobile-megamenus .megamenu-content .navbar-nav {
        margin: 0;
    }

    .mobile-megamenus .megamenu-content .navbar-nav a {
        color: var(--bs-body-color);
        padding: 0.75rem 0;
        font-size: 0.95rem;
        text-decoration: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        display: block;
        transition: color 0.2s ease;
    }

    .mobile-megamenus .megamenu-content .navbar-nav a:hover {
        color: var(--bs-primary);
    }

    .mobile-megamenus .megamenu-content .navbar-nav li:last-child a {
        border-bottom: none;
    }

    /* Ajustes para el modal principal */
    .modal.right .modal-dialog {
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        box-shadow: none !important;
    }

    .modal.right .modal-content {
        height: 100vh;
        border-radius: 0;
        overflow-y: auto;
        box-shadow: none !important;
    }

    /* Ajustes para la navegación principal en móvil */
    .modal .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .modal .navbar-nav .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        color: var(--bs-body-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Flecha del dropdown */
    .modal .dropdown-toggle::after {
        margin-left: 1rem !important;
        transition: transform 0.3s ease;
    }

    .modal .dropdown.show .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Enlaces del menú principal en móvil */
    .modal .navbar-nav .nav-link,
    .modal .navbar-nav a {
        color: var(--bs-primary) !important;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        font-weight: 500;
        text-decoration: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}