/* ================= HEADER ================= */
.header-profesional {
    background: #111;
    border-bottom: 1px solid rgba(255, 30, 0, 0.3);
    position: relative;
}
.header-profesional .top-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 54px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    position: relative;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 42px;
    width: auto;
}
.main-nav {
    display: flex;
    align-self: stretch;
}
.main-nav > ul {
    list-style: none;
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
}
.main-nav > ul > li {
    display: flex;
    align-self: stretch;
}
.main-nav > ul > li > a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
}
.main-nav > ul > li > a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff1e00;
    opacity: 0;
}
.main-nav > ul > li > a:hover::after,
.main-nav > ul > li > a.active::after {
    opacity: 1;
}

/* ================= DROPDOWN ================= */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #222;
}
.header-profesional:has(.has-dropdown:hover) > .nav-dropdown,
.nav-dropdown.show {
    display: block;
}
.nav-dropdown-inner {
    padding: 0.6rem 1rem;
    display: flex;
    gap: 1.5rem;
}
.nav-dropdown a {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-dropdown a:hover {
    color: #ff1e00;
}

/* Mobile-only inline dropdown (hidden on desktop) */
.nav-dropdown-mobile {
    display: none;
}

.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    align-self: center;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .header-profesional .top-bar {
        padding: 1rem 1.25rem;
    }
    .hamburger {
        display: block;
        z-index: 1001;
    }
    .main-nav {
        align-self: auto;
        display: block;
    }
    .main-nav > ul {
        display: none;
        flex-direction: column;
        gap: 0;
        background: #111;
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        border: 1px solid #222;
        border-radius: 6px;
        overflow: hidden;
        z-index: 1000;
    }
    .main-nav.active > ul {
        display: flex;
    }
    .main-nav > ul > li {
        border-bottom: 1px solid #222;
    }
    .main-nav > ul > li:last-child {
        border-bottom: none;
    }
    .main-nav > ul > li > a {
        padding: 0.8rem 1rem;
        margin-bottom: 0;
        color: #fff;
        display: block;
        width: 100%;
        font-weight: 700;
        text-align: left;
    }
    .main-nav > ul > li > a::after {
        display: none;
    }
    .main-nav > ul > li > a:hover {
        background: #1a1a1a;
        color: #ff1e00;
    }
    /* Hide desktop dropdown on mobile */
    .nav-dropdown {
        display: none !important;
    }
    .nav-dropdown-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hamburger { font-size: 1.8rem; }
    .main-nav > ul { width: 180px; right: 0.5rem; }
    .main-nav > ul > li > a { font-size: 0.95rem; padding: 0.7rem 0.9rem; }
}

/* ================= GLOBAL SEARCH ================= */
.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0 0.6rem;
    transition: color 0.2s;
    align-self: center;
}
.search-btn:hover { color: #fff; }

.global-search {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 15vh 1rem 2rem;
    flex-direction: column;
    align-items: center;
}
.global-search.open { display: flex; }

.global-search-inner {
    width: 100%;
    max-width: 480px;
    position: relative;
}
.global-search-input {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 1rem;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    background: #151515;
    color: #fff;
    border: 1px solid #333;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.global-search-input:focus { border-color: #ff1e00; }
.global-search-input::placeholder { color: #555; }

.global-search-close {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s;
}
.global-search-close:hover { color: #fff; }

.global-search-results {
    width: 100%;
    max-width: 480px;
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 0.5rem;
    background: #151515;
    border: 1px solid #222;
    border-radius: 10px;
}
.global-search-results:empty {
    display: none;
}

.gs-group {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 0.8rem 0.2rem;
}
.gs-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}
.gs-item:hover, .gs-item.gs-selected { background: #222; }

.gs-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    flex-shrink: 0;
}
.gs-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}
.gs-name {
    font-family: 'Barlow', sans-serif;
    font-size: 0.9rem;
    color: #ccc;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gs-cat {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.gs-page-icon {
    flex-shrink: 0;
}
.gs-arrow {
    color: #555;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.2s;
}
.gs-item:hover .gs-arrow { color: #ff1e00; }
.gs-empty {
    padding: 1rem;
    color: #555;
    font-size: 0.85rem;
    text-align: center;
}
