/* ═══════════════════════════════════════════
   VARIÁVEIS E RESET
═══════════════════════════════════════════ */
:root {
  --primary:      #C8733A;
  --primary-dark: #A55B28;
  --secondary:    #E8A840;
  --bg:           #FFFAF3;
  --bg-alt:       #FFF3E2;
  --dark:         #4A2F1A;
  --text:         #5C3D28;
  --text-light:   #8C6D58;
  --border:       #E8D5C0;
  --white:        #FFFFFF;
  --shadow:       0 4px 24px rgba(74, 47, 26, 0.12);
  --shadow-hover: 0 8px 32px rgba(74, 47, 26, 0.2);
  --radius:       16px;
  --transition:   0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ═══════════════════════════════════════════
   ACESSIBILIDADE
═══════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  background: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ═══════════════════════════════════════════
   TIPOGRAFIA
═══════════════════════════════════════════ */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  color: var(--dark);
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }

/* ═══════════════════════════════════════════
   UTILITÁRIOS
═══════════════════════════════════════════ */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section   { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(200, 115, 58, 0.12);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section-desc {
  max-width: 520px;
  margin: 16px auto 0;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* ═══════════════════════════════════════════
   BOTÕES
═══════════════════════════════════════════ */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 100px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(200, 115, 58, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200, 115, 58, 0.45);
}

/* ═══════════════════════════════════════════
   NAVEGAÇÃO
═══════════════════════════════════════════ */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  padding: 20px 0;
}

#header.scrolled {
  background: rgba(255, 250, 243, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(74, 47, 26, 0.1);
  padding: 12px 0;
}

.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
}

#header.scrolled .logo { color: var(--dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

#header.scrolled .nav-links a { color: var(--text); }

.btn-nav {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}

.btn-nav:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }
.btn-nav::after { display: none !important; }

/* Botão fechar sidebar — oculto no desktop, posicionado dentro do painel mobile */
.nav-close { display: none; }

/* ═══════════════════════════════════════════
   Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

#header.scrolled .menu-toggle span { background: var(--dark); }

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('../images/hero.jpg') center center / cover no-repeat;
  background-color: var(--dark);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(74, 47, 26, 0.55) 0%,
    rgba(74, 47, 26, 0.35) 50%,
    rgba(74, 47, 26, 0.65) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  animation: fadeUp 1s ease both;
}

.hero-tag {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  margin-bottom: 12px;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.88);
  max-width: 540px;
  margin: 0 auto 36px;
}

.scroll-down {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  animation: bounce 2s infinite;
  z-index: 1;
}

.scroll-down svg { width: 36px; height: 36px; }

/* ═══════════════════════════════════════════
   SOBRE
═══════════════════════════════════════════ */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.sobre-text p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.05rem;
}

.sobre-text p:last-of-type { margin-bottom: 24px; }

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
}

.features-list li::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.sobre-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════════
   GALERIA
═══════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  display: block;
  width: 100%;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--border);
  border: none;
  padding: 0;
  font: inherit;
  text-align: inherit;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(74, 47, 26, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-overlay span {
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 8px 20px;
  border-radius: 100px;
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ═══════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════ */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  opacity: 1;
  pointer-events: all;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.28); }

.lightbox-close { top: 20px; right: 20px; font-size: 1.4rem; }
.lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* ═══════════════════════════════════════════
   LOCALIZAÇÃO
═══════════════════════════════════════════ */
.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-wrapper iframe {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}

.map-placeholder {
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, var(--bg-alt), var(--border));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

.map-placeholder svg {
  width: 56px;
  height: 56px;
  color: var(--primary);
  opacity: 0.7;
}

.map-placeholder p {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--dark);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   CONTATO
═══════════════════════════════════════════ */
.contact-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 36px;
  min-width: 320px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg { width: 28px; height: 28px; }

.whatsapp-icon { background: #e8f9ef; color: #25D366; }
.phone-icon    { background: rgba(200,115,58,0.12); color: var(--primary); }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

.contact-number {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
}

.contact-arrow {
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--primary);
  opacity: 0.6;
  transition: transform var(--transition), opacity var(--transition);
}

.contact-card:hover .contact-arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* ═══════════════════════════════════════════
   RODAPÉ
═══════════════════════════════════════════ */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 700;
}

.footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--secondary); }

.footer-copy { font-size: 0.82rem; }

/* ═══════════════════════════════════════════
   ANIMAÇÕES
═══════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════
   RESPONSIVO
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .sobre-grid { grid-template-columns: 1fr; gap: 40px; }
  .sobre-image img { height: 320px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 36px; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(300px, 80vw);
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 88px 32px 32px;
    gap: 24px;
    box-shadow: -4px 0 24px rgba(74,47,26,0.12);
    transition: right 0.35s ease;
    z-index: 999;
  }

  .nav-links.open { right: 0; }
  .nav-links a { color: var(--text) !important; font-size: 1.1rem; }
  .btn-nav { align-self: flex-start; }

  /* Botão fechar sidebar */
  .nav-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 24px;
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 100px;
    padding: 9px 18px 9px 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    box-shadow: 0 2px 12px rgba(200,115,58,0.35);
  }

  .sidebar-close-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.04);
  }

  .sidebar-close-btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
  }

  .menu-toggle { display: flex; z-index: 1000; }

  /* Esconde o hambúrguer (que vira um "X") enquanto a sidebar está aberta,
     já que o botão "Fechar" já cumpre esse papel — evita os dois se sobreporem. */
  .menu-toggle.open { visibility: hidden; }

  .gallery-grid { grid-template-columns: 1fr; }

  .contact-card { min-width: 0; width: 100%; }
  .contact-cards { flex-direction: column; align-items: stretch; }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .footer-nav { gap: 16px; }
}
