/* ============================================================
   navbar.css — Navbar, menu mobile e language switcher
   Localização: public/build/css/navbar.css
   Partilhado por TODAS as páginas (incluído no layout base,
   em layouts/head-css.blade.php) — evita que a navbar, o logo
   e o menu mobile só funcionem/apareçam corretamente na Home.
   ============================================================ */

/* ===== FONT FACE (NIKEA) ===== */
@font-face {
    font-family: 'Nikea';
    src: url('../fonts/NIKEA.woff2') format('woff2'),
         url('../fonts/NIKEA.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== RESET & BASE ===== */
body {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* ===== NAVBAR ===== */
.navbar-home {
    background-color: rgba(33, 27, 27, 0);
    padding: 14px 0;
    transition: backdrop-filter 0.4s ease, padding 0.4s ease, box-shadow 0.35s ease;
    z-index: 10002;
    position: fixed;
    width: 100%;
    top: 0;
}

.navbar-home.scrolled {
    background-color: rgba(33, 27, 27, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 8px 0;
}

.navbar-home .nav-link {
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 4px !important;
    position: relative;
    transition: color 0.2s;
}

.navbar-home .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #f5a623;
    transition: width 0.25s ease;
}

.navbar-home .nav-link:hover::after {
    width: 100%;
}

.navbar-home .nav-link:hover {
    color: #f5a623 !important;
}

.navbar-home .nav-link.active-nav {
    font-family: 'Nikea', sans-serif;
    color: #f5a623 !important;
}

.navbar-home .nav-link.active-nav::after {
    width: 100%;
}

.footer-logo,
.navbar-brand img {
    filter: brightness(0) invert(1);
    max-height: 56px;
    width: auto;
}


/* ===== BOTÃO LOGIN ===== */
.btn-login-nav {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 7px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-login-nav:hover {
    background: #f5a623;
    border-color: #f5a623;
    color: #1a1a1a;
}

/* ===== HAMBURGER ANIMADO ===== */
.navbar-toggler-custom {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
    z-index: 10001;
}

.navbar-toggler-bar {
    display: block;
    width: 24px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

/* Estado aberto: barras tornam-se um X */
.navbar-toggler-custom.open .navbar-toggler-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.navbar-toggler-custom.open .navbar-toggler-bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggler-custom.open .navbar-toggler-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== MENU MOBILE — OVERLAY DE TELA INTEIRA ===== */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #1a1010;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.mobile-menu-item {
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Stagger: cada item entra com um pequeno atraso, controlado via JS (--delay) */
.mobile-menu.open .mobile-menu-item {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay, 0ms);
}

.mobile-menu-item a {
    display: block;
    padding: 10px 0;
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.25s ease;
    position: relative;
}

.mobile-menu-item a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: #f5a623;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

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

.mobile-menu-item a.active-mobile {
    font-family: 'Nikea', sans-serif;
    color: #fff;
}

.mobile-menu-item a.active-mobile::after,
.mobile-menu-item a:hover::after {
    width: 60%;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--actions-delay, 480ms);
}

.mobile-menu.open .mobile-menu-actions {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-login {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
    padding: 10px 32px;
}

.mobile-menu-lang .lang-btn {
    border-color: rgba(255,255,255,0.3);
}

/* Trava o scroll do body por trás quando o menu mobile está aberto */
body.mobile-menu-active {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .navbar-toggler-custom { display: flex; }
    .navbar-home .navbar-brand { flex-shrink: 0; }
    .navbar-home .container-fluid { justify-content: space-between; }
    .navbar-collapse { display: none !important; }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher { position: relative; }

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

.lang-btn:hover { border-color: #f5a623; color: #f5a623; }

.lang-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }

.lang-code { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }

.lang-arrow { transition: transform 0.2s ease; opacity: 0.8; }

.lang-switcher.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(33, 27, 27, 0.97);
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 12px;
    padding: 6px;
    list-style: none;
    margin: 0;
    min-width: 140px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 9999;
    animation: fadeDown 0.2s ease;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-switcher.open .lang-dropdown { display: block; }

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    color: #ccc;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.lang-option:hover { background: rgba(245, 166, 35, 0.15); color: #f5a623; }

.lang-option img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }