/* Header */

@media screen and (max-width: 1050px) {
    .main-header .logo {
        padding-left: 30px !important;
    }

    .main-menu {
        padding-right: 30px !important;
    }

    .main-menu li {
        margin-left: 5px !important;
    }
}

.main-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgba(22, 34, 57, 0.95);
    height: 80px;
    position: fixed;
    z-index: 12;
    width: 100%;
    top: 0;
    padding: 0 60px; /* Puedes ajustar este valor para margen interior */
}


main {
    margin-top: 80px;
    /* keep the 80px value */
}

.main-header .logo {
    float: left;
    line-height: 80px;
    padding-left: 60px;
}

.main-header .logo a {
    font-size: 36px;
    text-transform: uppercase;
    font-weight: 800;
    color: #fff;
}

.main-header .logo a em {
    font-style: normal;
    color: #f5a425;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -270px;
    width: 250px;
    height: 100vh;
    /* Asegura que use todo el alto de la pantalla */
    background-color: rgba(22, 34, 57, 0.98);
    padding: 80px 20px 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.4s ease;
    z-index: 12;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Permite desplazarse si hay mucho contenido */
}

.mobile-menu ul,
.mobile-menu .user-info {
    flex-shrink: 0;
    /* Evita que se compriman demasiado */
}

.mobile-menu * {
    max-width: 100%;
    box-sizing: border-box;
}


.main-menu li {
    display: inline-block;
    line-height: 79px;
    margin-left: 15px;
    position: relative;
}

.main-menu li:first-child {
    margin-left: 0px;
}

.main-menu li a {
    padding: 10px 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #fff;
    border: 2px solid transparent;
    transition: all 0.5s;
}

.main-menu li.has-submenu a:after {
    content: '\f107';
    font-family: "FontAwesome";
    margin-left: 5px;
}

.main-menu li.has-submenu ul li a:after {
    display: none;
}

.main-menu li .sub-menu {
    position: absolute;
    width: 100vw;
    /* Ocupar todo el ancho de la ventana en móviles */
    max-width: 260px;
    /* Limita el ancho en pantallas grandes */
    background-color: #18233a;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s;
    overflow-y: initial;
    /* Activar scroll si hay muchos elementos */
    max-height: 300px;
    /* Puedes ajustar según el caso */
    z-index: 100;
}


.main-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
}

.main-menu li .sub-menu li {
    display: block;
    line-height: 20px;
    margin-left: 0px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #121b2f;
}

.main-menu li .sub-menu li:first-child {
    padding-top: 15px;
}

.main-menu li .sub-menu li:last-child {
    margin-bottom: 0px;
    border-bottom: none;
}

.main-menu li .sub-menu li a {
    font-size: 12px;
    font-weight: 500;
    padding: 0px 15px;
    letter-spacing: 0.5px;
    border: none;
    transition: all 0.5s;
}

.main-menu li .sub-menu li a:hover {
    color: #f5a425;
    border: none;
}

.main-nav li:hover a,
.main-nav li.active a {
    border: 2px solid #f5a425;
}

@media (max-width: 950px) {

    .main-nav li:hover a,
    .main-nav li.active a {
        border: 2px solid transparent;
        border-bottom: 1px solid rgba(250, 250, 250, 0.25);
    }
}

/* Ícono hamburguesa */
.menu-link {
    display: none;
    font-size: 26px;
    color: white;
    position: absolute;
    top: 5px;
    right: 10px;
    z-index: 13;
    cursor: pointer;
}

/* Menú lateral derecho (mobile) */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -270px;
    width: 250px;
    height: 100%;
    background-color: rgba(22, 34, 57, 0.98);
    padding: 80px 20px 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.4s ease;
    z-index: 12;
}

.mobile-menu.open {
    right: 0;
}

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

.mobile-menu li {
    margin-bottom: 25px;
}

.mobile-menu a {
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s;
}

.mobile-menu a:hover {
    color: #f5a425;
}

/* Mostrar solo en pantallas pequeñas */
@media (max-width: 950px) {
    .main-menu {
        display: none;
    }

    .menu-link {
        display: block;
    }
}

.user-info {
    color: white;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.upload-label {
    font-size: 14px;
    color: #f5a425;
    cursor: pointer;
    display: inline-block;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: background 0.3s;
}

.upload-label:hover {
    background: rgba(255, 255, 255, 0.2);
}