/* ====== HEADER GENERAL ====== */
body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
}
.header-index-tal {
    width: 100%;
    background: #111;
    color: #fff;
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
}

/* Contenedor centrado */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

/* 👇 Solo en PC */
@media (min-width: 992px) {
    .header-container nav {
        margin-left: 2rem;
    }
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
.logo h1 span {
    color: #e53935;
}

/* ====== NAV ====== */
nav {
    flex: 1;
}
.main-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}
.main-menu li {
    position: relative;
}
.main-menu li a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    padding: 0.5rem 0;
    display: inline-block;
}
.main-menu li a:hover {
    color: #e53935;
}

/* ====== SUBMENÚ ====== */
.submenu {
    display: none;
    position: absolute;
    background: #222;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 200px;
    top: 100%;
    left: 0;
    border-radius: 0 0 6px 6px;
    z-index: 1000;
}
.submenu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #fff;
}
.submenu li a:hover {
    background: #333;
}

/* ====== USER + HAMBURGER ====== */
.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-icon {
    color: #fff;
    font-size: 1.2rem;
}
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #fff;
}

/* ====== USER DROPDOWN ====== */
.user-menu {
    position: relative;
}

.user-name {
    background: none;
    border: none;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}
.user-name:hover {
    background: #222;
    color: #e53935;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background: #222;
    border-radius: 6px;
    min-width: 180px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    flex-direction: column;
    z-index: 999;
}
.dropdown a {
    padding: 0.8rem 1rem;
    color: #fff;
    text-decoration: none;
    display: block;
}
.dropdown a:hover {
    background: #e53935;
    color: #fff;
}

.user-menu.open .dropdown {
    display: flex;
}

/* ====== MOBILE ====== */
@media (max-width: 992px) {
    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #111;
        flex-direction: column;
        z-index: 999;
    }
    nav.active {
        display: block;
    }

    .main-menu {
        flex-direction: column;
        gap: 0;
    }
    .main-menu li {
        border-top: 1px solid #222;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .main-menu li a {
        flex: 1;
        padding: 1rem;
    }

    .submenu-toggle {
        padding: 1rem;
        cursor: pointer;
        color: #aaa;
        transition: transform 0.3s ease, color 0.3s ease;
    }
    .submenu-toggle.open i {
        transform: rotate(180deg);
        color: #e53935;
    }

    .submenu {
        display: none;
        position: static;
        background: #181818;
        width: 100%;
    }
    .submenu.active {
        display: block;
    }

    .menu-toggle {
        display: block;
    }
}
