/* ====================================
   STYLE.CSS – Luiza Maia Advocacia
   Refatorado para Performance & Acessibilidade
   ==================================== */

/* NOTA: As fontes agora são carregadas no HTML para maior velocidade */

/* ====================================
   RESET & CONFIGURAÇÕES GERAIS
   ==================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  /* Compensa a altura do Header Fixo ao clicar em links âncora */
  scroll-padding-top: 90px;
}

/* Acessibilidade: Só anima o scroll se o usuário não tiver preferência por movimento reduzido */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: 'Libre Baskerville', serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ====================================
   VARIÁVEIS (Tokens de Design)
   ==================================== */
:root {
  /* Cores */
  --white: #ffffff;
  --black: #000000;
  --dark-green: #33351e;
  --navbar: #33351e;
  --green: #33351e;
  --light-green: #b1b7a6;
  --green1: #9ab36a;
  --light-gray: #d5d6c9;
  /*--bg-light: #f8f9f5;*/
  /*--text-dark: #222222;*/


  /* Tipografia */
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: 1.1rem;
  --fs-lg: 1.4rem;
  --fs-xl: 2rem;
  --fs-xxl: 2.8rem;

  /* Font weight */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

  /* Espaçamento */
  --gap: 1.5rem;
  --section-padding: 5rem 0;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 30px;
  --radius-full: 50%;
}

/* Dark Mode */
.darkmode {
  --white: #ffffff;       /* Fundo escuro dos cards */
  --black: #ffffff;
  --dark-green: #9ab36a;  /* Cor de destaque muda para tom mais claro */
  --green: #9ab36a;
  --light-green: #33351e;
  --green1: #d5d6c9;
  --light-gray: #333328;
  /*--bg-light: #12120e;*/    /* Fundo geral escuro */
  /*--text-dark: #e0e0e0;*/   /* Texto claro */
}

/* ====================================
   LAYOUT GLOBAL
   ==================================== */
.section-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
  color: var(--dark-green);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--dark-green);
  border-radius: 4px;
}

/* ====================================
   HEADER & NAVBAR
   ==================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--navbar); /* Usa a cor original fixa para manter contraste do logo */
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  height: 80px; /* Altura explícita ajuda no layout */
  display: flex;
  align-items: center;
}

/* No Darkmode, mantemos o header escuro ou ajustamos? 
   A aluna optou por manter fixo. Se quiser mudar:
   .darkmode header { background: #1a1a1a; } 
*/

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo img {
  height: 50px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: #ffffff; /* Sempre branco no header */
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--green1);
  transition: width 0.4s, left 0.4s;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Botão de Tema (Sol/Lua) */
#theme-switch {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-switch svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
  transition: transform 0.3s;
}

#theme-switch:hover svg {
  transform: rotate(15deg);
}

#theme-switch .moon { display: none; }
.darkmode #theme-switch .sun { display: none; }
.darkmode #theme-switch .moon { display: block; }

/* Hamburger Menu (Mobile) */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.bar {
  width: 25px;
  height: 3px;
  background: #ffffff;
  transition: 0.3s;
  border-radius: 2px;
}

/* ====================================
   HERO SECTION
   ==================================== */
.hero-section {
  min-height: 100vh;
  background: var(--light-green);
  display: flex;
  align-items: center;
  padding-top: 80px; /* Compensação do header fixo */
}

.darkmode .hero-section {
  background: var(--light-green);
}

.hero-section .section-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  text-align: center; /* Mobile first: centralizado */
}

.hero-details h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--dark-green);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

.hero-details h2 {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: var(--black);
  margin-bottom: 1.5rem;
  font-weight: var(--font-weight-semibold);
}

.hero-details .description {
  font-size: 1.1rem;
  max-width: 700px;
  color: var(--black);
  margin: 0 auto 2rem;
  line-height: 1.8;
}

/* Botão Principal */
.button {
  display: inline-block;
  background: var(--green);
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: 0.3s;
  border: 2px solid var(--dark-green);
}

.button:hover {
  background: transparent;
  color: var(--black);
}

.darkmode .button {
  background: var(--green); /* Ajuste de cor para modo escuro */
  border-color: var(--green);
  color: #000;
}

.darkmode .button:hover {
  background: transparent;
  color: var(--green);
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ====================================
   ABOUT SECTION
   ==================================== */
.about-section {
  padding: var(--section-padding);
  background: var(--light-gray);
}

.darkmode .about-section {
  background: var(--light-gray); 
}

.about-section .section-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  text-align: center;
}

.about-section .section-title {
  color: var(--black);
}

.about-image {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-full);
  margin: 0 auto;
  border: 5px solid var(--dark-green);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.text {
  font-size: 1.1rem;
  color: var(--black);
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.social-link-list {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.social-link i {
  font-size: 1.8rem;
  color: var(--dark-green);
  transition: 0.3s;
}

.social-link:hover i {
  color: var(--green1);
  transform: translateY(-3px);
}

/* ====================================
   ÁREAS DE ATUAÇÃO (Slider)
   ==================================== */
.area-section {
  padding: var(--section-padding);
  background: var(--light-green);
}

.area-section .section-title {
  color: var(--black);
}

.slider-wrapper {
  margin: 4rem 0;
}

.area-state {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark-green);
}

.area-name {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: var(--black);
  opacity: 0.8;
}

.card-list {
  display: grid;
  grid-auto-columns: 300px; /* Largura fixa dos cards */
  grid-auto-flow: column;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0.5rem 2rem; /* Espaço extra embaixo para a sombra não cortar */
  -webkit-overflow-scrolling: touch;
}

/* Esconder barra de rolagem (Chrome/Safari/Opera) */
.card-list::-webkit-scrollbar {
  display: none;
}
/* Esconder barra de rolagem (Firefox/IE) */
.card-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.card-item {
  scroll-snap-align: center;
  background: rgba(103, 103, 103, 0.2);
  border-radius: var(--radius-sm);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.icon-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
  padding: 10px;
  border-radius: 50%;
  border: 2px solid var(--dark-green);
}

.darkmode .icon-image {
  /* Truque para inverter cores de ícones pretos para branco.
     NOTA: Se o ícone for colorido, isso vai inverter as cores. 
     O ideal seria usar SVGs com 'fill: currentColor'. */
  filter: brightness(0) invert(1);
  border-color: var(--dark-green);
}

.icon-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.5rem 0;
  color: var(--black);
}

.icon-description {
  font-size: 0.9rem;
  color: var(--black);
  opacity: 0.8;
  margin-bottom: auto; /* Empurra o botão para o final do card */
  padding-bottom: 1.5rem;
}

/* Botões dos Cards (agora links <a>) */
.message-button {
  display: inline-block;
  background: var(--dark-green);
  color: #ffffff;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.3s;
  border: 2px solid var(--dark-green);
  width: 100%;
  max-width: 200px;
}

.message-button:hover {
  background: transparent;
  color: var(--dark-green);
}

.darkmode .message-button {
  background: var(--dark-green);
  border-color: var(--dark-green);
  color: #000;
}

.darkmode .message-button:hover {
  background: transparent;
  color: var(--dark-green);
}

/* ====================================
   CONTATO
   ==================================== */
.contact-section {
  padding: var(--section-padding);
  background: var(--light-gray);
  text-align: center;
}

.darkmode .contact-section {
  background: var(--light-gray);
}

.contact-section .section-title {
  color: var(--black);
}

.contact-info-list {
  margin: 2rem 0;
}

.contact-info {
  margin: 1rem 0;
  font-size: 1.2rem;
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-info i {
  color: var(--dark-green);
}

.whatsapp-link-contato {
  text-decoration: underline;
}

.whatsapp-link-contato:hover {
  color: #9ab36a;
  transform: translateY(-3px);
}

.button {
  display: inline-block;
  background: var(--green);
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: 0.3s;
  border: 2px solid var(--dark-green);
}

.button:hover {
  background: transparent;
  color: var(--black);
}

.darkmode .button {
  background: var(--green); /* Ajuste de cor para modo escuro */
  border-color: var(--green);
  color: #000;
}

.darkmode .button:hover {
  background: transparent;
  color: var(--green);
}

/* Link estilo botão para formulário */
.button-form {
  display: inline-block;
  background: var(--green);
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
  transition: 0.3s;
  border: 2px solid var(--dark-green);
}

.button-form:hover {
  background: transparent;
  color: var(--black);
}

.darkmode .button-form {
  background: var(--green); /* Ajuste de cor para modo escuro */
  border-color: var(--green);
  color: #000;
}

.darkmode .button-form:hover {
  background: transparent;
  color: var(--green);
}

/* ====================================
  FOOTER
   ==================================== */

.footer-section {
  background: var(--navbar);
  color: white;
  padding: 3rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-section .section-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.social-link-list-footer {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.footer-section  a {
  font-size: 1.8rem;
  color: #9ab36a;
  transition: 0.3s;
}

.footer-section a:hover {
  color: #b1b7a6;
  transform: translateY(-3px);
}


/* ====================================
   MEDIA QUERIES (Responsividade)
   ==================================== */

/* Tablet e Desktop Pequeno */
@media (min-width: 768px) {
  
  /* Ajuste de Grid: Imagem e Texto lado a lado */
  .hero-section .section-content,
  .about-section .section-content {
    grid-template-columns: 1fr 1fr; /* Divide em 2 colunas iguais */
    text-align: left; /* Alinha texto à esquerda */
  }

  /* Garante que a descrição não fique centralizada no desktop */
  .hero-details .description,
  .text {
    margin-left: 0;
    margin-right: 0;
  }

  /* Alinha os links sociais à esquerda no desktop */
  .social-link-list {
    justify-content: flex-start;
  }

  .hero-image-wrapper {
    display: flex;
    justify-content: flex-end;
  }
  
  .hero-image {
    max-width: 90%;
  }

  .about-image {
    width: 350px;
    height: 350px;
  }
}

/* Desktop Grande */
@media (min-width: 1024px) {
  .card-list {
    /* Centraliza os cards se tiverem poucos, ou mantém à esquerda se tiver muitos */
    justify-content: center; 
    gap: 2rem;
  }
}

/* Menu Mobile (Hambúrguer) */
@media (max-width: 900px) {
  .navbar-toggle {
    display: flex;
    z-index: 1100;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Escondido fora da tela */
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: var(--dark-green);
    flex-direction: column;
    justify-content: center;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    transition: right 0.4s ease;
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0; /* Entra na tela */
  }

  /* Animação do ícone X */
  .navbar-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .navbar-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .navbar-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}