/* ═══════════════════════════════════════════════════════════
   FMV Engenharia — components.css
   Botões · Navegação · Logo · Footer · WhatsApp Float
═══════════════════════════════════════════════════════════ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  line-height: 1;
}

.btn-primary {
  background: var(--leaf);
  color: #fff;
}
.btn-primary:hover {
  background: var(--forest-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 134, 83, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn-outline:hover {
  background: var(--forest);
  color: #fff;
  transform: translateY(-2px);
}

.btn-light {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-light:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(247, 243, 237, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.7rem 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Logo Image ── */
.nav-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: all 0.4s ease;
  filter: brightness(0) invert(1); /* white logo over dark bg */
}

#navbar.scrolled .nav-logo-img {
  filter: none; /* color logo when nav is scrolled */
  height: 38px;
}

/* ── Logo Text (fallback) ── */
.nav-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--white);
  transition: color 0.4s;
}
#navbar.scrolled .nav-logo-text { color: var(--forest); }
.nav-logo-text span { color: var(--gold-light); }
#navbar.scrolled .nav-logo-text span { color: var(--gold); }

/* ── Nav Links ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition-base);
  letter-spacing: 0.02em;
}

#navbar.scrolled .nav-links a { color: var(--ink-mid); }
.nav-links a:hover { color: var(--white); }
#navbar.scrolled .nav-links a:hover { color: var(--leaf); }

.nav-cta {
  background: var(--leaf);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
}
.nav-cta:hover {
  background: var(--forest-mid) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  /* Mínimo de 44×44px para touch target (WCAG 2.5.5) */
  padding: 10px 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  z-index: 1001;
  position: relative;
}

body.nav-mobile-open #navbar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.35s ease;
  pointer-events: none; /* evita conflito de eventos */
}

/* Páginas com fundo claro: hamburguer escuro */
#navbar.scrolled .nav-hamburger span { background: var(--ink); }

/* Hamburger → X animation */
.nav-mobile-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-mobile-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-mobile-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-mobile-open .nav-hamburger span { background: #fff !important; }

/* ── Mobile Menu Overlay ── */
.nav-mobile-open .nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--forest);
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  z-index: 999;
  /* Animação suave de abertura */
  animation: menuFadeIn 0.3s ease forwards;
}

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

.nav-mobile-open .nav-links a {
  font-size: 1.6rem;
  font-family: 'Cormorant Garamond', serif;
  color: rgba(255, 255, 255, 0.9) !important;
  /* Touch targets maiores */
  padding: 0.5rem 1.5rem;
  display: block;
}

.nav-mobile-open .nav-cta {
  background: var(--gold) !important;
  padding: 0.7rem 2rem;
  border-radius: var(--radius-full);
}

body.nav-mobile-open {
  overflow: hidden;
  /* Evita salto de layout quando barra de scroll some */
  padding-right: var(--scrollbar-width, 0);
}

/* ── Footer ── */
footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 5rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  margin-bottom: 1.2rem;
  display: block;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h5 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 0.6rem; }

.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-base);
}

.footer-col ul li a:hover { color: var(--leaf-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  opacity: 0.45;
}

/* ── WhatsApp Float ── */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
