/* ================= VARIÁVEIS GLOBAIS ================= */
:root {
  --bg: #f7f7f7;
  --card: #ffffff;
  --text: #163a2b;
  --muted: #61746e;
  --accent: #154f42;
  --shadow: 0 6px 18px rgba(6, 22, 14, 0.08);
}

/* Modo dark */
body[data-theme="dark"] {
  --bg: #0f1412;
  --card: rgba(255, 255, 255, 0.05);
  --text: #e6f6f0;
  --muted: #b9d6cc;
  --accent: #2aa177;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ================= BODY ================= */
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  padding-top: 64px; /* espaço para header fixo */
  box-sizing: border-box;
}

/* ================= HEADER ================= */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--accent);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s;
  flex-wrap: wrap;
  box-sizing: border-box;
}

/* Logo no header */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
}

/* Nav e menu */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.nav-toggle nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.3s;
}

nav a:hover,
.nav-toggle nav a:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Botão menu mobile */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
  border: none;
  background: transparent;
}

/* ================= BOTÃO SOL/LUA ================= */
.theme-toggle-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

.theme-toggle {
  position: relative;
  border: none;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  padding: 0;
  transition: color 0.3s;
  flex-shrink: 0;
}

.theme-toggle svg {
  position: absolute;
  width: 24px;
  height: 24px;
  stroke: var(--text);
  fill: none;
  transition: transform 0.5s ease, opacity 0.3s ease, stroke 0.3s;
}

.icon-sun {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}
.icon-moon {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

body[data-theme="dark"] .icon-sun {
  transform: rotate(-90deg) scale(0);
  opacity: 0;
}
body[data-theme="dark"] .icon-moon {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

/* ================= RESPONSIVO HEADER ================= */
/* Antes: max-width: 480px */
@media (max-width: 768px) {   /* agora cobre tablets e celulares maiores */
  header {
    flex-wrap: wrap;
    padding: 10px 16px;
    align-items: center;
  }

  .logo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .theme-toggle-container {
    order: 2;
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
    font-size: 28px;
    order: 1;
    margin-right: 10px;
    z-index: 1002; /* garante que fique acima do hero e do nav */

  }

  .nav-toggle nav {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    background: var(--accent);
    width: 90%;
    padding: 12px 0;
    border-radius: 0 0 12px 12px;
    display: none;
    z-index: 1001; /* ALTERAÇÃO ANDROID: garante que o menu fique acima de tudo */
  }

  .nav-toggle nav.show {
    display: flex;
  }

  nav a {
    margin: 8px 0;
    text-align: center;
  }
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px #0f1412;
  /* Overlay verde + imagem */
  background: linear-gradient(rgba(32, 78, 64, 0.85), rgba(95, 174, 134, 0.85)),
    /* verde semi-transparente */ url("img/fundo1.jpg") center/cover no-repeat; /* imagem de fundo */

  background-size: cover;
  background-position: center 40%; /* ajusta verticalmente a imagem */
  z-index: 0;
  transition: opacity 0.3s;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--card);
  color: var(--accent);
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.2s;
}
/* === Hero botão e texto no modo dark === */
body[data-theme="dark"] .hero-content h1,
body[data-theme="dark"] .hero-content p {
  color: #e6f6f0; /* texto mais visível no dark */
}

body[data-theme="dark"] .hero-content .btn {
  background: var(--accent); /* botão verde principal */
  color: #ffffff; /* texto branco */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

body[data-theme="dark"] .hero-content .btn:hover {
  background: #2aa177; /* verde mais suave ao passar o mouse */
}

.btn:hover {
  transform: scale(1.05);
}

/* ================= SEÇÕES ================= */
#servicos {
  padding: 80px 20px;
  background: var(--bg);
  text-align: center;
}

main {
  padding: 40px 20px;
  max-width: 1100px;
  margin: auto;
}

.section-title {
  text-align: center;
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 28px;
  margin: 0;
}

.section-title p {
  color: var(--muted);
  margin-top: 8px;
}

/* ================= CARDS ================= */
.cards,
.cards + .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.7;
  margin-bottom: 16px;
}

.card:hover {
  transform: translateY(-5px);
}

.muted {
  color: var(--muted);
}

/* ================= CONTATO ================= */
.contato-card {
  text-align: center;
}

.contato-card a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.contato-card a:hover {
  text-decoration: underline;
}

/* ================= CARROSSEL ================= */
.carousel-wrapper {
  position: relative;
  margin: 20px 0;
}

.carousel-container {
  display: flex;
  gap: 12px;
  padding: 20px 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scroll-snap-type: x mandatory; /* mantém o snap funcionando */
      /* OTIMIZAÇÃO ANDROID */
  transform: translate3d(0, 0, 0); /* força GPU, deixa swipe suave no Android */
  will-change: transform;          /* melhora performance */
  transform: translate3d(0, 0, 0); /* força a GPU renderizar, evitando travadas */
  backface-visibility: hidden;    /* suaviza o scroll */
  -webkit-transform: translate3d(0,0,0); /* compatível com Webkit */
  will-change: transform;          /* otimiza para movimentação */
  touch-action: pan-y;     /* evita travadas no Android */

}

.carousel-container:active {
  cursor: grabbing;
}

.carousel-item {
  flex: 0 0 auto;
  /*width: 220px;*/
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s;
  width: 70vw; /* Reduz a largura para suavizar o swipe no Android */
  scroll-snap-align: start; /* mantém travamento do item no final do swipe */
   /* ================= ADICIONADO ================= */
  will-change: transform; /* ajuda Android a renderizar melhor o swipe */
  backface-visibility: hidden; /* previne flickering no Android */
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  will-change: transform; /* ALTERAÇÃO ANDROID: evita tremida ao deslizar no Android */
}

.carousel-item:hover img {
  transform: scale(1.05);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(21, 79, 66, 0.7);
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 50%;
  z-index: 10;
  transition: background 0.3s;
}

.carousel-arrow:hover {
  background: rgba(21, 79, 66, 0.9);
}

.carousel-arrow.left {
  left: 0;
}

.carousel-arrow.right {
  right: 0;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile e tablet: swipe */
@media (max-width: 1024px) {
  .carousel-container {
    overflow-x: auto; /* permite arrastar horizontalmente */
    scroll-snap-type: x mandatory; /* trava cada item no scroll */
    -webkit-overflow-scrolling: touch; /* suaviza o swipe no iOS */
    cursor: grab;
  }

  .carousel-item {
    scroll-snap-align: start;
    width: 80vw; /* cada item ocupa 80% da tela do dispositivo */
    flex: 0 0 auto;
  }

  .carousel-arrow {
    display: none; /* remove setas em mobile/tablet */
  }
}

/* Desktop: arrastar com mouse e setas visíveis */
@media (min-width: 1025px) {
  .carousel-container {
    overflow-x: hidden; /* só arrastar com setas ou mouse */
    cursor: grab;
  }

  .carousel-item {
    width: 220px; /* tamanho fixo */
  }

  .carousel-arrow {
    display: block; /* setas visíveis */
  }
}

/* ================= RODAPÉ ================= */
footer {
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

/* ================= RESPONSIVO ================= */
@media (max-width: 800px) {
  header {
    padding: 10px;
  }

  .hero {
    padding: 60px 16px;
  }

  .carousel-item {
    width: 80vw;
    height: auto;
  }

  .carousel-container {
    justify-content: flex-start;
  }
}

/* ================= ÍCONES ANIMADOS ================= */
.chef-icon,
.team-icon,
.info-icon,
.mail-icon {
  display: block;
  margin: 30px auto 10px auto;
  color: var(--accent);
  width: 60px;
  height: 60px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ================= AVATARES ================= */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(21, 79, 66, 0.15);
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-right: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, color 0.3s ease;
}

/* === Corrige  modo dark estrelas === */
body[data-theme="dark"] .depoimentos-section .estrela-svg {
  color: var(--accent) !important;
  fill: var(--accent) !important;
  stroke: var(--accent) !important;
}

.stars {
  color: var(--accent);
}

html {
  scroll-behavior: smooth;
}
