/* ============================================
   FLOREXT — MainLayout.razor.css
   Navbar responsiva com hamburger menu
   ============================================ */

/* ── Tokens locais (espelham o app.css) ── */
:root {
    --navbar-h:       70px;
    --navbar-h-sm:    60px;
    --mobile-menu-w:  300px;
}

/* Reset básico */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter Tight', sans-serif; }


/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes navFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

/* ============================================
   NAVBAR — container principal
   ============================================ */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    animation: navFadeIn 0.5s ease both;
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Barra principal */
.navbar-container {
    height: var(--navbar-h);
    padding: 0 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(
            to right,
            #1c2a1b 0%,
            #2b3f2a 40%,
            #2b3f2a 60%,
            #1c2a1b 100%
    );
    border-bottom: 1px solid rgba(201, 168, 76, 0.35);
    box-shadow: 0 2px 20px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.03) inset;
    transition: height 0.3s ease, background 0.4s ease;
}

/* Estado scrolled — glassmorphism */
.navbar.scrolled .navbar-container {
    height: var(--navbar-h-sm);
    background: linear-gradient(
            to right,
            rgba(22, 34, 21, 0.97) 0%,
            rgba(38, 56, 37, 0.97) 50%,
            rgba(22, 34, 21, 0.97) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(201, 168, 76, 0.18);
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

/* ============================================
   LOGO
   ============================================ */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.25s ease;
}

.logo a:hover { opacity: 0.85; }

.logo-img {
    height: 38px;
    width: auto;
    display: block;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
    transition: filter 0.3s ease;
    animation: linkFadeIn 0.6s 0.1s ease both;
}

.logo a:hover .logo-img {
    filter: drop-shadow(0 2px 8px rgba(201, 168, 76, 0.4));
}

/* ============================================
   LINKS DESKTOP
   ============================================ */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0; padding: 0;
}

/* Entrada escalonada */
.navbar-links a:nth-child(1) { animation: linkFadeIn 0.4s 0.20s ease both; }
.navbar-links a:nth-child(2) { animation: linkFadeIn 0.4s 0.28s ease both; }
.navbar-links a:nth-child(3) { animation: linkFadeIn 0.4s 0.36s ease both; }

.navbar-links a {
    position: relative;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.80);
    text-decoration: none;
    padding: 8px 18px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* Linha dourada que cresce do centro */
.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 18px; right: 18px;
    height: 1px;
    background: #c9a84c;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    opacity: 0.85;
}

.navbar-links a:hover { color: #e0c06a; }
.navbar-links a:hover::after { transform: scaleX(1); }

.navbar-links a.active { color: rgba(255,255,255,0.95); }
.navbar-links a.active::after { transform: scaleX(0.45); opacity: 0.5; }

/* Divisor vertical entre links e botão */
.navbar-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 10px;
    flex-shrink: 0;
}

/* ── Botão Contato ── */
.nav-btn-contato {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1c2a1b !important;
    text-decoration: none;
    background: #c9a84c;
    padding: 9px 22px !important;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 3px 12px rgba(201, 168, 76, 0.25);
    animation: linkFadeIn 0.4s 0.44s ease both;
}

.nav-btn-contato::after { display: none !important; } /* remove linha hover */

.nav-btn-contato::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #e0c06a;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.nav-btn-contato span { position: relative; z-index: 1; }
.nav-btn-contato:hover::before { transform: scaleX(1); }
.nav-btn-contato:hover {
    color: #1c2a1b !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.38);
}

/* ============================================
   HAMBURGER — só no mobile
   ============================================ */
.hamburger {
    display: none;             /* oculto no desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 2px;
    transition: background 0.2s ease;
    z-index: 10;
}

.hamburger:hover { background: rgba(255,255,255,0.06); }

/* As 3 barrinhas */
.hamburger-bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity   0.25s ease,
    width     0.3s ease;
    transform-origin: center;
}

/* Animação X ao abrir */
.hamburger.active .hamburger-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger.active .hamburger-bar:nth-child(2) {
    opacity: 0;
    width: 0;
}
.hamburger.active .hamburger-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ============================================
   MENU MOBILE — drawer lateral/superior
   ============================================ */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(160deg, #1c2a1b 0%, #2b3f2a 100%);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);

    /* Fechado por padrão */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity    0.3s ease;
    pointer-events: none;
}

/* Aberto via JS */
.mobile-menu.open {
    max-height: 400px;
    opacity: 1;
    pointer-events: all;
    animation: menuSlideDown 0.35s ease both;
}

/* Links dentro do menu mobile */
.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 0 24px;
}

.mobile-link {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-link::before {
    content: '';
    display: block;
    width: 3px;
    height: 3px;
    background: #c9a84c;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.mobile-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.04);
    padding-left: 32px;
}

.mobile-link:hover::before { opacity: 1; }

.mobile-link:last-child { border-bottom: none; }

/* Botão Contato no menu mobile */
.mobile-link-cta {
    color: #c9a84c;
    font-weight: 500;
    margin: 8px 28px 0;
    padding: 12px 20px !important;
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 2px;
    justify-content: center;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.mobile-link-cta:hover {
    background: #c9a84c;
    color: #1c2a1b !important;
    border-color: #c9a84c;
    padding-left: 20px !important;
}

.mobile-link-cta::before { display: none; }

/* ============================================
   OVERLAY escuro atrás do menu mobile
   ============================================ */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.menu-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   MAIN CONTENT — compensa navbar fixa
   ============================================ */
.main-content {
    margin-top: var(--navbar-h);
    min-height: calc(100vh - var(--navbar-h));
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 28px 24px;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.35);
    background: #1c2a1b;
    border-top: 1px solid rgba(201, 168, 76, 0.12);
}

/* ============================================
   RESPONSIVO
   ============================================ */

/* Notebook — 1024px */
@media (max-width: 1024px) {
    .navbar-container { padding: 0 40px; }
    .navbar-links a   { padding: 8px 14px; font-size: 0.72rem; }
    .nav-btn-contato  { padding: 8px 18px !important; }
}

/* Tablet — 768px: ativa hamburger */
@media (max-width: 768px) {
    .navbar-container { padding: 0 28px; }

    /* Esconde links desktop */
    .navbar-links { display: none; }

    /* Mostra hamburger */
    .hamburger { display: flex; }
}

/* Mobile — 480px */
@media (max-width: 480px) {
    .navbar-container {
        padding: 0 20px;
        height: 60px;
    }

    .logo-img { height: 32px; }

    .mobile-link { padding: 13px 24px; font-size: 0.78rem; }
    .mobile-link-cta { margin: 8px 24px 0; }
}

/* LOADER CAMINHÃO */
/* --- Overlay com Fundo Verde Escuro --- */
.loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1c2a1b;
    z-index: 9999;
}

.truckWrapper {
    width: 250px;
    height: 120px;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

/* --- Trepidação Suave (Mais lenta: 0.8s) --- */
.truckBody {
    width: 130px;
    margin-bottom: 6px;
    animation: motion 0.8s ease-in-out infinite;
    z-index: 2;
}

@keyframes motion {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(3px); }
}

/* --- Rodas com Giro Cadenciado (0.6s) --- */
.truckTires {
    width: 115px;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    position: absolute;
    bottom: 0;
    z-index: 3;
}

.tiresvg {
    width: 22px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Estrada --- */
.road {
    width: 100%;
    height: 2px;
    background-color: #fff;
    opacity: 0.3;
    align-self: flex-end;
}

/* --- Árvores de Eucalipto (Lentas e com Contorno) --- */
.eucalyptus {
    position: absolute;
    bottom: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

/* Árvore 1 - Mais lenta (1.5s) */
.tree-1 {
    right: -60px;
    animation: roadAnimation 1.4s linear infinite;
    color: #3d5c3c;
}

/* Árvore 2 - Parallax (2.0s) */
.tree-2 {
    right: -160px;
    transform: scale(0.85);
    opacity: 0.7;
    animation: roadAnimation 0.5s linear infinite;
    color: #3d5c3c;
}

.trunk {
    width: 4px;
    height: 40px;
    background-color: #5d4037;
    border: 1px solid #000; /* Contorno preto solicitado */
}

.leaves {
    width: 32px;
    height: 48px;
    background-color: #4c694b;
    border: 2px solid #000; /* Contorno preto solicitado */
    border-radius: 50% 50% 40% 40%;
    position: absolute;
    top: -32px;
}

.leaves.small {
    width: 22px;
    height: 32px;
    top: -48px;
}

@keyframes roadAnimation {
    0% { transform: translateX(250px); }
    100% { transform: translateX(-450px); }
}