@media (min-width: 320px) and (max-width: 767px) {
  /* Oculta completamente el nav en móvil por defecto */
#main-nav {
    display: none !important;
    background: none !important;
    background-color: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* Estilos cuando el menú hamburguesa está activo (MÓVIL) */
#main-nav.active {
    display: block !important;
    background: linear-gradient(25deg, #347024, #79cd13, #79cd13, #a6f00a, #f0e10a) !important;
    position: fixed;
    top: 51px !important;
    left: 0 !important;
    right: 0 !important;
    width: calc(100% - 80px) !important;
    margin-left: 80px !important;
    z-index: 1001;
    border-radius: 0 8px 8px 0 !important;
    animation: slideIn 0.3s ease-out;
}
.menu-toggle {
    position: fixed;
    top: -16px;
    right: 8px;
    z-index: 1002;
    background: linear-gradient(25deg, #347024, #79cd13, #79cd13, #a6f00a, #f0e10a);
    color: white;
    border-radius: 8px;
    padding: 12px;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
    
}
.menu-toggle.active {
background: linear-gradient(25deg, #f0e10a, #a6f00a, #79cd13, #79cd13, #347024) !important;

}
/* Clase que se agregará con JavaScript al hacer scroll */
.menu-toggle.hide {
    transform: translateY(-100px); /* Lo mueve hacia arriba fuera de pantalla */
    opacity: 0;
}

/* Clase para cuando vuelve a aparecer */
.menu-toggle.show {
    transform: translateY(0);
    opacity: 1;
}

/* Elimina cualquier fondo del nav interno */
#main-nav nav {
    background: transparent !important;
    box-shadow: none !important;
}
#main-nav a {
    background: rgba(0,0,0,0.1) !important;
    background: linear-gradient(25deg, #347024, #79cd13, #79cd13, #a6f00a, #f0e10a) !important;
    
}
/* Estilos para los enlaces activos */
#main-nav.active a.active {
    background: linear-gradient(25deg, #347024, #79cd13, #79cd13, #a6f00a, #f0e10a) !important;
    
    margin-left: 0 !important;
    width: 100% !important;
    text-align: left;
    padding-left: 20px;
    border-bottom: 1px solid #347024;
    color: #fff !important;
    display: block;
}

}
@media (min-width: 1024px) and (max-width: 1439px) {
  /* … */
  .header {
    height: 54% !important;
    width: 100% !important;
    margin-top: 0px;
  }
  

@media (min-width: 768px) and (max-width: 1440px) {
  /* … */
  .header {
    /*height: 54% !important;*/
    height: 72% !important;
    width: 95% !important;
    margin-top: 2px;
  }
  #main-nav {
        margin: 0 auto !important;
        position: fixed !important;
        top: 0 !important;
        left: 45% !important;
        transform: translateX(-50%) !important;
        width: 836px !important;
        height: 42px !important;
        background-color: #34495e !important;
        border-radius: 9px !important;
        font-size: 0;
        z-index: 1000 !important;
        margin-left: 15% !important;
        MARGIN-TOP: 30px !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
       /* display: none;*/
    }
    
    #main-nav.active {
        display: block!important;
        top: 18px!important;
    }
    
    #main-nav a {
        display: block!important;
        width: 100% !important;
        text-align: left!important;
        padding-left: 20px!important;
        border-bottom: 1px solid #347024!important;
        color: #fff !important;
       
    }
    
    nav .animation {
     position: absolute;
    height: 100%;
    top: 0;
    z-index: 0;
    transition: all .5s ease 0s;
    border-radius: 8px;

    }
    

      /* Ajustamos las animaciones para tablet */
    #main-nav a:nth-child(1):hover ~ .animation {
        width: 116px !important;
    }
    
    #main-nav a:nth-child(2):hover ~ .animation {
        width: 120px !important;
        left: 140px !important;
    }
    
    #main-nav a:nth-child(3):hover ~ .animation {
        width: 100px !important;
        left: 277px !important;
    }
    
    #main-nav a:nth-child(4):hover ~ .animation {
        width: 130px !important;
        left: 399px !important;
    }
    
    #main-nav a:nth-child(5):hover ~ .animation {
        width: 139px !important;
        left: 545px !important;
    }
    
    #main-nav a:nth-child(6).active ~ .animation,
    #main-nav a:nth-child(6):hover ~ .animation {
    width: 139px;
    left: 685px!important;
    background-color: #c52857 !important;
}
/* Estilo para el enlace activo width: 139px !important;
        left: 685px !important;*/
#main-nav a.active {
    color: #fff!important;
    font-weight: bold!important;

}


}
@media (min-width: 1441px) and (max-width: 2560px) {
  /* … */
  #main-nav {
    display: block !important;
  }

}