/* ============================================
   HEADER PRINCIPAL
   ============================================ */

header {
    height: 50vh;
    background-image: url(../Img/BannerPicture.png);
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.header {
    background-color: var(--color1);
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

/* ============================================
   LOGO
   ============================================ */

.header__img {
    width: auto;
    flex-shrink: 0;
}

.header__img img {
    margin-top: 5px;
    object-fit: contain;
    max-width: 140px;
    height: auto;
}

/* ============================================
   MENÚ DESKTOP (oculto en mobile)
   ============================================ */

.header__menu {
    display: none;
    align-items: center;
}

.header__menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.header__menu ul li {
    font-family: raleway-semibold;
    color: var(--color2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.header__menu ul li a {
    font-family: raleway-semibold;
    text-decoration: none;
    color: var(--color2);
    transition: color 0.2s ease;
}

.header__menu ul li:hover,
.header__menu ul li:hover a,
.header__menu ul li a:hover {
    color: var(--color3);
}

/* Ítem de Soluciones con submenú */
.header__menu ul li.has-submenu {
    position: relative;
}

.header__menu ul li.has-submenu .menu-text {
    display: inline;
}

.header__menu ul li.has-submenu .menu-arrow {
    display: inline-flex;
    align-items: center;
}

.header__menu ul li.has-submenu .logo {
    transition: transform 0.3s ease;
    display: block;
}

/* Ícono de búsqueda */
.header__menu ul li.search-icon {
    cursor: pointer;
}

.header__menu ul li.search-icon img {
    display: block;
}

/* ============================================
   INFO MODULE (Submenú de Soluciones - Desktop)
   ============================================ */

.InfoModule {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--color1);
    color: var(--color2);
    padding: 30px 10%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
    box-sizing: border-box;
}

.InfoModule.is_expanded {
    opacity: 1;
    visibility: visible;
}

.InfoModule a {
    text-decoration: none;
    color: var(--color2);
    transition: color 0.2s ease;
}

.InfoModule a:hover {
    color: var(--color3);
}

/* ============================================
   TEXTO DE HEADER (Banner principal)
   ============================================ */

.header_text__info {
    position: absolute;
    top: calc(70px + 10%);
    left: 10%;
    color: var(--color2);
    font-family: raleway-bold;
    font-size: 1.5rem;
    z-index: 1;
}

/* ============================================
   MENÚ HAMBURGUESA (Mobile)
   ============================================ */

#menuToggle {
    display: block;
    position: relative;
    z-index: 1001;
    -webkit-user-select: none;
    user-select: none;
}

#menuToggle a {
    text-decoration: none;
    color: #232323;
    transition: color 0.3s ease;
}

#menuToggle a:hover {
    color: var(--color3);
}

/* Input invisible para toggle */
#menuToggle input {
    display: block;
    width: 40px;
    height: 32px;
    position: absolute;
    top: -7px;
    left: -5px;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
    -webkit-touch-callout: none;
}

/* Líneas del hamburguesa */
#menuToggle span {
    display: block;
    width: 33px;
    height: 4px;
    margin-bottom: 5px;
    position: relative;
    background: #cdcdcd;
    border-radius: 3px;
    z-index: 1;
    transform-origin: 4px 0px;
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
                background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
                opacity 0.55s ease;
}

#menuToggle span:first-child {
    transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2) {
    transform-origin: 0% 100%;
}

/* Transformación a X cuando está activo */
#menuToggle input:checked ~ span {
    opacity: 1;
    transform: rotate(45deg) translate(-2px, -1px);
    background: #232323;
}

#menuToggle input:checked ~ span:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
}

#menuToggle input:checked ~ span:nth-last-child(2) {
    transform: rotate(-45deg) translate(0, -1px);
}

/* ============================================
   MENÚ LATERAL (Mobile)
   ============================================ */

#menu {
    position: fixed;
    width: 280px;
    top: 0;
    left: 0;
    height: 100vh;
    margin: 0;
    padding: 100px 30px 30px 30px;
    background: #ffffff;
    list-style-type: none;
    -webkit-font-smoothing: antialiased;
    transform-origin: 0% 0%;
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    overflow-y: auto;
    box-sizing: border-box;
    z-index: 1000;
}

#menu li {
    padding: 12px 0;
    font-size: 18px;
    color: #232323;
}

#menu a {
    display: block;
}

#menu a li {
    padding: 12px 0;
}

/* Mostrar menú cuando está activo */
#menuToggle input:checked ~ ul {
    transform: translateX(0);
}

/* Trigger de Soluciones en mobile */
.mobile-solutions-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-solutions-trigger .submenu-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* Submenú mobile */
.mobile-submenu {
    display: none;
    padding-left: 15px !important;
    background-color: #f5f5f5;
    margin: 5px 0;
    border-radius: 5px;
}

.mobile-submenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-submenu ul li {
    font-size: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-submenu ul li:last-child {
    border-bottom: none;
}

.mobile-submenu ul a {
    color: #232323;
}

.mobile-submenu ul a:hover li {
    color: var(--color3);
}

/* ============================================
   NAV CONTAINER
   ============================================ */

.header nav {
    width: auto;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE MENU ICON
   ============================================ */

.responseMenu .material-icons {
    color: white;
}
