
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dropdown, .dropdown-center, .dropend, .dropstart, .dropup, .dropup-center {
    position: static !important;
}

body {
    margin: 0;
    padding: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

.ico-header {
    position: fixed;
    top: 0;
    left: 0;
    background: #F5F9EF;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-mobile {
    display: none;
}

.header-desktop {
    width: 100%;
}

.ico-nav {
    width: 100vw;
    display: flex;
    justify-content: center;
    position: relative;
}

.ico-nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 120px;

    max-width: 1400px;  
    width: 100%;
    padding: 0 32px;   
}

.ico-menu {
    display: flex;
    list-style: none;
    gap: clamp(12px, 1.5vw, 24px);
    margin: 0;
    padding: 0;
    align-items: center;
}

.ico-menu.left {
    justify-content: flex-end;
}

.ico-menu.right {
    justify-content: flex-start;
}



.ico-menu li {
    padding: 8px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ico-menu li a {
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.85rem, 1.1vw, 1.2rem);
    font-weight: 600;
    color: #555;
    transition: all 0.3s ease;
    position: relative;
}

.ico-menu li:hover {
    background: #dcdcdc;
}

.ico-menu li:hover a {
    color: #525151;
    font-weight: bold;
}

.ico-menu li a.active {
    color: #852221;
    font-weight: bold;
}

.ico-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #852221;
    border-radius: 2px;
}

.logo-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
}

.logo-center img {
    width: 60px;
    height: auto;
    filter: drop-shadow(7px 7px 5px rgba(73, 73, 73, 0.4));
    transition: all 0.3s ease-out;
}

.logo-center img:hover {
    transform: scale(1.08);
    filter: drop-shadow(4px 4px 5px rgba(73, 73, 73, 0.7));
}

.mega-dropdown {
    position: absolute;
    background: white;
    width: 100%;
    height: 0;
    opacity: 0;
    left: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; 
    grid-auto-rows: minmax(80px, auto);
    z-index: 9;
    top: 100px;
}

.mega-dropdown a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px 12%;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
}

.mega-dropdown a:hover {
    background: #c6ecff;
    border-left: 5px solid #852221;
}

.mega-dropdown.open {
    height: auto;
    overflow: visible;
    opacity: 1;
}

.header-logo-mobile {
    display: flex;
    align-items: center;
}

.header-logo-mobile img {
    width: 50px;
    height: auto;
}

.mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: transparent;
}

.btn-hamburguesa {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

.btn-hamburguesa span {
    width: 30px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.btn-hamburguesa.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.btn-hamburguesa.active span:nth-child(2) {
    opacity: 0;
}

.btn-hamburguesa.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

#mobileMenu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    opacity: 0;
    background: #ffffff;
    transition: height 0.4s ease, opacity 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#mobileMenu.open {
    height: calc(100vh - 80px);
    opacity: 1;
    overflow-y: auto;
}

#mobileMenu ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

#mobileMenu ul > li {
    text-align: center;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

#mobileMenu ul > li > a {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    padding: 18px 20px;
    transition: all 0.3s ease;
    position: relative;
}

#mobileMenu ul > li:hover,
#mobileMenu ul > li:active {
    background: #f7f7f7;
}

#mobileMenu ul > li > a.active {
    color: #852221;
    font-weight: bold;
    background: #f0f0f0;
}

#mobileMenu ul > li > a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #852221;
    border-radius: 0 2px 2px 0;
}

.dropdown-mobile {
    position: relative;
}

.dropbtn-mobile {
    display: block;
    padding: 18px 20px;
    cursor: pointer;
    position: relative;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.dropbtn-mobile::after {
    content: "▾";
    font-size: 1rem;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.dropdown-mobile.open .dropbtn-mobile::after {
    transform: rotate(180deg);
}

.dropdown-content-mobile {
    display: none;
    background: #f9f9f9;
    overflow: hidden;
}

.dropdown-mobile.open .dropdown-content-mobile {
    display: block;
}

.dropdown-content-mobile li {
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
}

.dropdown-content-mobile li:last-child {
    border-bottom: none;
}

.dropdown-content-mobile li a {
    display: block;
    padding: 16px 30px;
    font-size: 1rem;
    font-weight: 500;
    color: #555;
}

.dropdown-content-mobile li a.active {
    color: #852221;
    font-weight: bold;
    background: #e8e8e8;
}

@media (max-width: 1200px) {
    .ico-menu {
        padding: 0 3%;
        gap: 8px;
    }
    
    .ico-menu li a {
        font-size: 1rem;
    }
    
    .logo-center img {
        width: 50px;
    }
}

@media (max-width: 1000px) {
    .header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 80px;
        padding: 0 20px;
    }
    
    .header-desktop {
        display: none;
    }
    .mega-dropdown {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .header-mobile {
        padding: 0 15px;
        height: 70px;
    }
    
    .header-logo-mobile img {
        width: 40px;
    }
    
    #mobileMenu {
        top: 70px;
    }
    
    #mobileMenu.open {
        height: calc(100vh - 70px);
    }
    
    #mobileMenu ul > li > a {
        font-size: 1rem;
        padding: 16px 15px;
    }
    
    .dropbtn-mobile {
        font-size: 1rem;
        padding: 16px 15px;
    }
    
    .dropdown-content-mobile li a {
        font-size: 0.95rem;
        padding: 14px 25px;
    }
    .dropdown-content-mobile li a{
        padding: 10px 0;
    }
}

@media (max-width: 400px) {
    .header-mobile {
        padding: 0 10px;
        height: 65px;
    }
    
    .header-logo-mobile img {
        width: 35px;
    }
    
    .btn-hamburguesa span {
        width: 25px;
    }
    
    #mobileMenu ul > li > a {
        font-size: 0.95rem;
        padding: 14px 10px;
    }
    
    .dropdown-content-mobile li a {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

#mobileMenu {
    -webkit-overflow-scrolling: touch;
}