/* ==========================================
   HEADER BASE
   ========================================== */
.site-header {
    background-color: #0f0f11;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 100000;
    padding: 15px 0;
    overflow: visible !important;
    isolation: isolate;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible !important;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.header-logo {
    height: 80px;
    width: auto;
    display: block;
    object-fit: contain;
}

.main-nav,
.header-actions,
.lang-selector {
    overflow: visible !important;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 100002;
}

/* ==========================================
   PESQUISA DESKTOP + AUTOCOMPLETE
   ========================================== */
.desktop-search-box {
    display: flex;
    align-items: center;
    background: #1a1a1e;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 5px 12px;
    position: relative;
    overflow: visible !important;
    z-index: 100003;
}

.desktop-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 4px 8px;
    font-size: 0.9rem;
    width: 160px;
    transition: width 0.3s;
}

.desktop-search-box input:focus {
    width: 220px;
}

.desktop-search-box button {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    min-width: 30px;
    min-height: 30px;
}

.header-search-results {
    display: none;
    background: rgba(17, 17, 21, .98);
    border: 1px solid #34343b;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .55);
    overflow: hidden;
    z-index: 100010;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.header-search-results.show {
    display: block;
}

.desktop-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(360px, 78vw);
}

.header-search-result {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 9px 12px;
    color: #efeff2;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.055);
    background: transparent;
    transition: background .14s ease, color .14s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.header-search-result:last-child {
    border-bottom: 0;
}

.header-search-result:hover,
.header-search-result.active,
.header-search-result:focus-visible {
    background: #24242b;
    color: #fff;
    outline: none;
}

.header-search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #19191f;
    border: 1px solid #303038;
    color: #e63946;
    font-size: .8rem;
}

.header-search-result-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9rem;
    font-weight: 700;
}

.header-search-empty {
    padding: 14px 16px;
    color: #8d8d96;
    font-size: .86rem;
}

.mobile-search-trigger {
    display: none;
    background: #1a1a1e;
    border: 1px solid #333;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* ==========================================
   DROPDOWN DE IDIOMAS
   ========================================== */
.lang-selector {
    position: relative;
    z-index: 100006;
}

.lang-btn {
    background: #1a1a1e;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 100007;
}

.lang-dropdown {
    display: none;
    position: absolute !important;
    top: calc(100% + 9px) !important;
    right: 0 !important;
    left: auto !important;
    background: #1a1a1e;
    border: 1px solid #333;
    border-radius: 8px;
    list-style: none;
    min-width: 180px;
    margin: 0;
    padding: 5px 0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.68);
    overflow: visible !important;
    pointer-events: auto !important;
    z-index: 100020 !important;
}

.lang-dropdown.show {
    display: block !important;
    pointer-events: auto !important;
}

.lang-dropdown li,
.lang-dropdown a {
    pointer-events: auto !important;
}

.lang-dropdown a {
    display: block;
    padding: 10px 14px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.lang-dropdown a:hover,
.lang-dropdown a:focus-visible {
    background: #25252b;
    color: #fff;
    outline: none;
}

/* Botão Marcar Sessão */
.btn-book {
    background-color: #e63946;
    color: #fff;
    padding: 10px 22px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-book:hover {
    background-color: #c12a36;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================
   PESQUISA MOBILE
   ========================================== */
.mobile-search-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0f0f11;
    border-bottom: 1px solid #333;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    z-index: 100008;
    overflow: visible !important;
}

.mobile-search-panel.active {
    display: block;
}

.mobile-search-inner {
    padding: 15px 5%;
    overflow: visible;
}

.mobile-search-input-wrapper {
    display: flex;
    align-items: center;
    background: #18181c;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 15px;
    gap: 10px;
}

.mobile-search-input-wrapper .search-icon {
    color: #777;
    font-size: 1rem;
}

.mobile-search-input-wrapper input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1rem;
}

.close-mobile-search {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.close-mobile-search:hover {
    color: #fff;
}

.mobile-search-results {
    margin-top: 10px;
    position: relative;
    width: 100%;
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */
@media (max-width: 992px) {
    .header-logo {
        height: 52px;
    }

    .desktop-search-box,
    .btn-book {
        display: none !important;
    }

    .mobile-search-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #0f0f11;
        border-bottom: 1px solid #222;
        padding: 20px 0;
        z-index: 100005;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .lang-selector .lang-btn {
        padding: 6px 9px;
        font-size: 0.82rem;
    }

    .lang-dropdown {
        min-width: 160px;
        right: -12px !important;
    }

    .user-profile-link {
        font-size: 1.3rem;
        color: #ffffff;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
        z-index: 100009;
    }

    .header-search-result {
        min-height: 52px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 10px 0;
    }

    .header-container {
        padding: 0 3.5%;
    }

    .header-actions {
        gap: 8px;
    }

    .mobile-search-trigger {
        width: 38px;
        height: 38px;
    }

    .lang-btn {
        padding: 6px 8px;
    }

    .lang-btn .fa-chevron-down {
        font-size: .68rem;
    }

    .lang-dropdown {
        min-width: 150px;
        right: -18px !important;
    }
}

/* Ícone de Perfil / User no Header */
.user-profile-link {
    color: #ffffff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.user-profile-link:hover {
    color: #e63946;
}
