/* Estilos generales del header */
.Header {
    position: sticky;
    top: 0;
    left: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.75rem 1.625rem;
    font-family: 'Titillium Web';
}

.Header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(45deg, #E94F27 0%, #FFD401 100%);
}

.Header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-topLogo img {
    max-height: 3.5rem;
}

.Menu-toggleBtn {
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.Menu-toggleBtn:is(:hover, :focus) {
    background: none;
}

.Menu-toggleIcon--close {
    display: none;
}

.MainMenu {
    position: fixed;
    top: 5rem;
    left: 100%;
    width: 100%;
    max-width: 75%;
    height: auto;
    padding: 0.375rem 0.63rem;
    transition: transform 0.3s ease;
    z-index: 1000;
    background: var(--clr-white);
    box-shadow: 0 0 0 0 white, 0 0 0 0 white, 0 0 0 0 white, 0 0 0 0 white, 0 0 0 0 white;
    max-height: calc(100vh - 10rem);
    max-height: calc(100dvh - 10rem);
    overflow-Y: scroll;
    /*scrollbar-width: thin;*/
    /*scrollbar-color: rgba(148, 156, 161, 0.40) var(--clr-light-gray);*/
}

.MainMenu::-webkit-scrollbar {
  width: 8px;
}

/* Fondo del scrollbar */
.MainMenu::-webkit-scrollbar-track {
  background: var(--clr-light-gray);
  border-right: 5px solid #fff;
}

/* Barra deslizante */
.MainMenu::-webkit-scrollbar-thumb {
  background: rgba(148, 156, 161, 0.40);
  border-radius: 2px;
  border-right: 5px solid #fff;
}

.MainMenu.is-open {
    transform: translateX(-100%);
    box-shadow: -264px 422px 139px 0 rgba(0, 0, 0, 0.00), -169px 270px 127px 0 rgba(0, 0, 0, 0.01), -95px 152px 108px 0 rgba(0, 0, 0, 0.05), -42px 67px 80px 0 rgba(0, 0, 0, 0.09), -11px 17px 44px 0 rgba(0, 0, 0, 0.10);
}

.MainMenu-mobileLogo {
    display: none;
}

.MainMenu ul {
    list-style: none;
    margin: 0;
}

.MainMenu .is-active > a {
  color: var(--clr-dark-orange) !important;
  text-decoration: underline !important;
}

.NavigationList li {
    position: relative;
}

.NavigationList a,
.PrimaryMenu > li:nth-child(1) > ul > li > a {
  padding: 0.88rem 0;
  text-decoration: none;
  font-size: 0.75rem;
  display: block;
  color: #949CA1;
}

.NavigationList a:is(:hover, :focus),
.PrimaryMenu > li:nth-child(1) > ul > li > a:is(:hover, :focus) {
  color: var(--clr-medium-orange);
}

.NavigationList .depth-1 a {
  padding: 0.5rem;
}

.NavigationList .depth-0 > a,
.PrimaryMenu > li:nth-child(1) > ul > li > a {
    text-transform: uppercase;
    font-weight: 600;
    color: var(--clr-medium-gray);
}

.PrimaryMenu > li:nth-child(1) > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.PrimaryMenu > li:nth-child(1) > ul > li:nth-child(-n+3) > a::before {
  content: '';
  display: inline-block;
  min-width: 1.5rem;
  min-height: 1.5rem;
}

.PrimaryMenu > li:nth-child(1) > ul > li:nth-child(1) > a::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M23 6V17H22C22 18.11 21.11 19 20 19C18.89 19 18 18.11 18 17H6C6 18.11 5.11 19 4 19C2.89 19 2 18.11 2 17H1V6H3V15H21V6H23Z' fill='%235B6068'/%3E%3C/svg%3E") no-repeat center;
}

.PrimaryMenu > li:nth-child(1) > ul > li:nth-child(2) > a::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M18 16H16V15H8V16H6V15H2V20H22V15H18V16ZM20 8H17V6C17 4.9 16.1 4 15 4H9C7.9 4 7 4.9 7 6V8H4C2.9 8 2 8.9 2 10V14H6V12H8V14H16V12H18V14H22V10C22 8.9 21.1 8 20 8ZM15 8H9V6H15V8Z' fill='%235B6068'/%3E%3C/svg%3E") no-repeat center;
}

.PrimaryMenu > li:nth-child(1) > ul > li:nth-child(3) > a::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M19.66 9.64L19.3 8.7L21.16 8C20.24 5.88 18.6 4.18 16.54 3.14L15.74 4.92L14.82 4.5L15.62 2.7C14.5 2.26 13.28 2 12 2C10.94 2 9.92 2.22 8.96 2.5L9.64 4.34L8.7 4.7L8 2.84C5.88 3.76 4.18 5.4 3.14 7.46L4.92 8.26L4.5 9.18L2.7 8.38C2.26 9.5 2 10.72 2 12C2 13.06 2.22 14.08 2.5 15.04L4.34 14.36L4.7 15.3L2.84 16C3.76 18.12 5.4 19.82 7.46 20.86L8.26 19.08L9.18 19.5L8.38 21.3C9.5 21.74 10.72 22 12 22C13.06 22 14.08 21.78 15.04 21.5L14.36 19.66L15.3 19.3L16 21.16C18.12 20.24 19.82 18.6 20.86 16.54L19.08 15.74L19.5 14.82L21.3 15.62C21.74 14.5 22 13.28 22 12C22 10.94 21.78 9.92 21.5 8.96L19.66 9.64ZM14.3 17.54C11.24 18.8 7.72 17.36 6.46 14.3C5.2 11.24 6.64 7.72 9.7 6.46C12.76 5.2 16.28 6.64 17.54 9.7C17.8437 10.4273 18.0008 11.2075 18.0023 11.9957C18.0038 12.7838 17.8495 13.5646 17.5485 14.293C17.2475 15.0214 16.8055 15.6833 16.2481 16.2405C15.6906 16.7977 15.0286 17.2393 14.3 17.54Z' fill='%235B6068'/%3E%3C/svg%3E") no-repeat center;
}

.NavigationList .menu-item-has-children > a {
  border-bottom: 1px solid rgb(91 96 104 / 40%);
  transition: border 0.4s;
}

.NavigationList .menu-open > a {
  border: none;
}

 /*Dropdowns */
.Menu-dropdownToggle {
  background: none;
  border: none;
  position: absolute;
  right: 0;
  top: 0.9rem;
  cursor: pointer;
  padding: 0.45rem 0.31rem;
}

.Menu-dropdownToggle svg {
    display: block;
    width: 0.625rem;
    height: 0.38644rem;
    transition: transform 0.2s;
}

.Menu-dropdownToggle:is(:hover,:focus) {
    background: none;
}

.PrimaryMenu .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.PrimaryMenu .menu-open > .sub-menu {
    max-height: 80vh;
}

 /*Estilos para escritorio */
@media (min-width: 992px) {
    .Header {
        padding: 0 2rem;
    }
    
    .Header-top {
        display: none;
    }
    .Menu-toggleBtn {
        display: none;
    }
    
    .MainMenu {
        position: static;
        height: auto;
        display: flex;
        flex-direction: column-reverse;
        max-width: unset;
        overflow: visible;
        background-color: transparent;
        padding: 0;
    }
    
    .MainMenu-primary {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 0;
    }
    
    .PrimaryMenu {
        display: flex;
        gap: 2.81rem;
    }
    
    .PrimaryMenu > li {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.13rem;
        margin: 0;
    }
    
    .PrimaryMenu > li > a {
        padding: 0.69rem 0;
        border: none !important;
    }
    
    .PrimaryMenu > li:last-child > a {
        padding: 0.69rem 3rem;
        border: 1px solid var(--clr-dark-gray) !important;
    }
    
    .PrimaryMenu > li:nth-child(1) > ul > li:nth-child(-n+3) {
        min-height: 20rem;
    }
    
    .PrimaryMenu > li:nth-child(1) > ul > li:nth-child(-n+3) > a {
        margin-bottom: 1rem;
    }
    
    .PrimaryMenu > li:nth-child(1) > ul > li:nth-child(4) {
        padding-top: 2rem;
    }
    
    .PrimaryMenu > li:nth-child(1) > ul > li:nth-child(n+4) {
        margin-bottom: 1rem;
    }
    
    .NavigationList .depth-1 a {
        padding: 0;
    }
    .NavigationList .depth-1 ul {
        display: grid;
        gap: 0.75rem;
    }
    
    .MainMenu-mobileLogo {
        display: block;
    }
    
    .MainMenu-mobileLogo img {
        max-height: 4rem;
    }
    
    .Menu-dropdownToggle {
        position: relative;
        top: unset;
    }
    
    .sub-menu .Menu-dropdownToggle {
        display: none;
    }
    
    .PrimaryMenu .sub-menu {
        max-height: unset;
    }
    
    .PrimaryMenu > li > .sub-menu {
        position: absolute;
        top: 76px;
        left: 0;
        width: max-content;
        max-width: unset;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 2.5rem;
        max-height: 16rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) translateX(-50%);
        transition: all 0.3s ease;
        z-index: 10;
        display: flex;
        flex-flow: column wrap;
        column-gap: 1rem;
    }
    
    .PrimaryMenu > li:first-child > .sub-menu {
        position: fixed;
        top: 118px;
        left: 50%;
        width: clamp(100vh, 67.5rem, 67.5rem);
        max-height: 29rem;
    }
    
    .PrimaryMenu > li:nth-child(1) > ul > li > a {
        border: none;
        display: grid;
        justify-items: start;
        padding: 0;
    }
    
    .PrimaryMenu > li:hover > .sub-menu,
    .PrimaryMenu > li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) translateX(-50%);
    }
    
    .PrimaryMenu > li:nth-child(n+2) .sub-menu {
        row-gap: 1rem;
        column-gap: 4.5rem;
    }
    
    .PrimaryMenu > li:nth-child(n+2) .sub-menu > li > a {
        color: var(--clr-dark-gray);
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .MainMenu-secondaryWrapper {
        margin-left: calc(-100vw / 2 + 100% / 2);
        margin-right: calc(-100vw / 2 + 100% / 2);
        max-width: 100vw;
        width: auto;
        background-color: var(--clr-dark-gray);
    }
    
    ul.SecondaryMenu {
        display: flex;
        justify-content: flex-end;
        gap: 1.69rem;
        margin: auto;
    }
    
    .SecondaryMenu li {
        margin: 0;
    }
    
    .SecondaryMenu a {
        color: var(--clr-light-gray) !important;
        padding: 0.3rem;
        font-weight: 300 !important;
    }
}