/* ==========================================================================
   ESQUADRIPLAN ALUMÍNIO - HEADER CSS (MODELO SOFT CAPSULE INSPIRADO EM LABOR)
   Barra flutuante em cápsula de vidro, mega-dropdowns e drawer mobile
   ========================================================================== */

/* 1. TOP ANNOUNCEMENT BAR */
.topbar {
  background: linear-gradient(135deg, rgba(26, 34, 34, 0.82) 0%, rgba(45, 58, 58, 0.76) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #F1F5F9;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 1000;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-contact a,
.topbar-contact span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #CBD5E1;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.topbar-contact a:hover {
  color: #FFFFFF;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(126, 151, 151, 0.24) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.topbar-badge:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(126, 151, 151, 0.42) 100%);
  transform: translateY(-1px);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.10) 100%);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45);
  color: #FFFFFF;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.topbar-social-link:hover {
  background: var(--color-primary);
  color: #FFFFFF;
  transform: translateY(-1px) scale(1.1);
}

.topbar-social-link.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
}

.topbar-social-link.facebook:hover {
  background: #1877F2;
}

/* 2. FLOATING SOFT CAPSULE HEADER (EXPO GLASS EFFECT / LIQUID GLASS) */
.site-header-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
  padding: 0 16px;
}

.site-header {
  pointer-events: auto;
  width: 100%;
  max-width: 1340px;
  height: 78px;
  margin: 14px auto 0;
  padding: 8px 14px 8px 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.38) 100%);
  border: 1px solid rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(24px) saturate(190%) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.04);
  box-shadow:
    0 14px 38px rgba(26, 34, 34, 0.12),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.85),
    inset 0 -1px 1px rgba(255, 255, 255, 0.35);
  transition:
    height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header > .container {
  display: contents;
}

.site-header.scrolled {
  height: 68px;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.44) 100%);
  border-color: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(28px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.05);
  box-shadow:
    0 18px 42px rgba(26, 34, 34, 0.16),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(255, 255, 255, 0.4);
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.brand-logo:hover img {
  transform: scale(1.02);
}

.brand-name-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name-wrap .brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
  line-height: 1.1;
}

.brand-name-wrap .brand-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-primary);
}

/* 3. DESKTOP NAVIGATION MENU */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.nav-link svg {
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-item:hover > .nav-link,
.nav-link.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(126, 151, 151, 0.24) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 4px 14px rgba(26, 34, 34, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
  color: var(--color-secondary);
  transform: translateY(-1px);
}

/* Dropdowns desativados a pedido do usuário */
.dropdown-menu {
  display: none !important;
}

/* 4. HEADER ACTIONS & PILL CTA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-pill-cta {
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(57, 74, 74, 0.78) 0%, rgba(26, 34, 34, 0.86) 100%);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #FFFFFF !important;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    0 8px 22px rgba(26, 34, 34, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn-pill-cta::after {
  content: "→";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.btn-pill-cta:hover {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.82) 0%, rgba(18, 140, 126, 0.88) 100%);
  box-shadow:
    0 10px 28px rgba(37, 211, 102, 0.34),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

.btn-pill-cta:hover::after {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.28);
}

/* 5. MOBILE TOGGLE & SLIDING DRAWER */
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.42) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    0 4px 14px rgba(26, 34, 34, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
  color: var(--color-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.mobile-toggle:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.60) 100%);
  transform: translateY(-1px);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: #FFFFFF;
  z-index: 99999;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--transition-smooth), visibility var(--transition-smooth);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

.mobile-drawer.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.drawer-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68) 0%, rgba(241, 243, 243, 0.52) 100%);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow:
    0 4px 12px rgba(26, 34, 34, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav a {
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: var(--color-sage-bg);
  color: var(--color-secondary);
}

.drawer-subnav {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--color-sage-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.drawer-subnav a {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 12px;
}

@media (max-width: 1080px) {
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}
