/* ============================================
   CONFIGURACIÓN GENERAL
   ============================================ */
body {
    background: url('/images/bghome.png') center/cover no-repeat fixed;
    margin-bottom: 8vh !important;
}

@font-face {
    font-family: avenir-next-heavy-italic;
    src: url('/Fonts/avenir-next-heavy-italic.ttf');
    src: url('/Fonts/avenir-next-heavy-italic.ttf') format('embedded-opentype'),
         url('/Fonts/avenir-next-heavy-italic.ttf') format('truetype');
}

/* ============================================
   NAVBAR PRINCIPAL
   ============================================ */
.navbar-avatch {
    background: linear-gradient(135deg, #ee5e17 0%, #d94e0f 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   LOGO
   ============================================ */
.navbar-brand {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============================================
   MENÚ DESKTOP
   ============================================ */
.navbar-menu-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-menu-wrapper {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.user-menu-button:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-menu-button.active {
    background: rgba(0, 0, 0, 0.6);
    border-color: #ffffff;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-name {
    font-size: 15px;
    letter-spacing: 0.3px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-menu-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-link-guest {
    color: #ffffff;
    text-decoration: none;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 15px;
}

.nav-link-guest:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-link-guest.btn-register {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #ffffff;
}

.nav-link-guest.btn-register:hover {
    background: #ffffff;
    color: #ee5e17;
}

/* ============================================
   DROPDOWN MENU DESKTOP
   ============================================ */
.dropdown-menu-custom {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu-custom.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 0.875rem 1.25rem !important;
    background: linear-gradient(135deg, #ee5e17 0%, #d94e0f 100%);
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.dropdown-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 19px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dropdown-username {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.dropdown-email {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    line-height: 1.2;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.dropdown-section-title {
    padding: 0.75rem 1.5rem;
    color: #b0b0b0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-link i {
    font-size: 16px;
    width: 20px;
    color: #ee5e17;
    transition: all 0.3s ease;
}

.dropdown-link span {
    flex: 1;
}

.dropdown-link:hover {
    background: rgba(238, 94, 23, 0.15);
    padding-left: 2rem;
}

.dropdown-link:hover i {
    color: #ff7338;
    transform: scale(1.15);
}

.dropdown-link.logout-link {
    color: #ff6b6b;
}

.dropdown-link.logout-link i {
    color: #ff6b6b;
}

.dropdown-link.logout-link:hover {
    background: rgba(255, 107, 107, 0.15);
}

/* Submenu */
.dropdown-submenu {
    position: relative;
}

.submenu-trigger .submenu-arrow {
    font-size: 12px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.submenu-trigger:hover .submenu-arrow,
.submenu-trigger.active .submenu-arrow {
    transform: rotate(90deg);
}

.submenu-content {
    max-height: 0;
    overflow: hidden;
    background: rgba(238, 94, 23, 0.08);
    transition: max-height 0.3s ease;
}

.submenu-content.show {
    max-height: 200px;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem 0.75rem 3.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.submenu-link i {
    font-size: 14px;
    color: #ee5e17;
    transition: all 0.3s ease;
}

.submenu-link:hover {
    background: rgba(238, 94, 23, 0.15);
    padding-left: 4rem;
}

.submenu-link:hover i {
    color: #ff7338;
    transform: scale(1.15);
}

/* ============================================
   MENÚ HAMBURGUESA
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger span {
    width: 32px;
    height: 3px;
    background: #ffffff;
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ============================================
   MENÚ MOBILE
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #1a1a1a;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
}

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

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    background: linear-gradient(135deg, #ee5e17 0%, #d94e0f 100%);
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.mobile-username {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 0.25rem;
}

.mobile-email {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

.mobile-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.mobile-close i {
    font-size: 18px;
}

.mobile-menu-content {
    padding: 1rem 0;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
}

.mobile-link i {
    font-size: 18px;
    width: 24px;
    color: #ee5e17;
    transition: all 0.3s ease;
}

.mobile-link span {
    flex: 1;
}

.mobile-link:hover,
.mobile-link:active {
    background: rgba(238, 94, 23, 0.15);
    padding-left: 2rem;
}

.mobile-link:hover i,
.mobile-link:active i {
    color: #ff7338;
    transform: translateX(4px) scale(1.1);
}

.mobile-link.logout-link {
    color: #ff6b6b;
    margin-top: 1rem;
}

.mobile-link.logout-link i {
    color: #ff6b6b;
}

.mobile-link.logout-link:hover {
    background: rgba(255, 107, 107, 0.15);
}

.mobile-link.mobile-expandable {
    justify-content: space-between;
}

.mobile-link.mobile-expandable .mobile-link-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-link.mobile-expandable .expand-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.mobile-link.mobile-expandable.active .expand-arrow {
    transform: rotate(180deg);
}

.mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 1.5rem;
}

.mobile-section-title {
    padding: 0.75rem 1.5rem;
    color: #b0b0b0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(238, 94, 23, 0.05);
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    max-height: 300px;
}

.mobile-sublink {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem 0.875rem 3.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mobile-sublink i {
    font-size: 16px;
    color: #ee5e17;
    transition: all 0.3s ease;
}

.mobile-sublink:hover,
.mobile-sublink:active {
    background: rgba(238, 94, 23, 0.15);
    padding-left: 4rem;
}

.mobile-sublink:hover i,
.mobile-sublink:active i {
    color: #ff7338;
    transform: scale(1.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .navbar-menu-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .navbar-container {
        padding: 0 1.5rem;
    }

    .navbar-logo {
        height: 40px;
    }
}

@media (min-width: 993px) {
    .mobile-menu,
    .mobile-overlay,
    .hamburger {
        display: none !important;
    }
}

/* Scroll suave para el menú mobile */
.mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: #ee5e17;
    border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: #ff7338;
}