/* =========================
   VARIÁVEIS DE CORES E TIPOGRAFIA
========================= */
:root {
  /* Cores principais */
  --cor-primaria: #06253D;
  --cor-destaque: #c59d5f;
  --cor-branco: #ffffff;
  --cor-texto: #2c2c2c;
  --cor-texto-claro: #666;
  --cor-fundo: #f5f5f5;
  
  /* Tipografia */
  --fonte-principal: 'Century Schoolbook', serif;
  --fonte-display: 'Playfair Display', serif;
  --fonte-logo: 'Montserrat', serif;
  --fonte-titulo: 'Cormorant Garamond', serif;
}

/* =========================
   RESET E NORMALIZAÇÃO
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--fonte-principal);
  color: var(--cor-texto);
  line-height: 1.7;
  background: var(--cor-branco);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* =========================
   NAVBAR - NAVEGAÇÃO FIXA
========================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(6, 37, 61, 0.95);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  max-width: 1280px;
  margin: auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: grid;
  align-items: center;
  gap: 0.1rem;
  text-decoration: none;
  font-family: var(--fonte-logo);
  font-size: 1.9rem;
  color: var(--cor-branco);
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
  text-align: left;
}

.logo:hover {
  opacity: 0.9;
}

#d {
  font-size: 1.3rem;
  /* font-weight: bold; */
  letter-spacing: 0.5px;
  color: var(--cor-branco);
}

#dsub {
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--cor-branco);
  margin-top: -12px;
  transform: translateX(18.0%);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--cor-branco);
  text-decoration: none;
  font-size: 1.15rem;
  transition: all 0.3s ease;
  position: relative;
  text-align: center;
}

.nav-links a:hover {
  color: goldenrod;
  transform: translateY(-2px);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: goldenrod;
  transition: width 0.3s ease;
}

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

/* Responsivo - Navbar */
@media (max-width: 768px) {
  .navbar-container {
    padding: 1rem 1.5rem;
  }

  .logo {
    font-size: 1.4rem;
  }

  .nav-links {
    gap: 1.5rem;
    font-size: 0.95rem;
  }
} 

/* =========================
   HERO SECTION
========================= */
.hero-section {
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(6, 37, 61, 0.55), rgba(6, 37, 61, 0.55)),
    url('../martelo-e-balanca-da-justica-na-sala-do-tribunal_23-2151998155.avif');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  max-width: 720px;
  margin-left: 8%;
  padding-top: 6rem;
}

.hero-logo {
  position: absolute;
  top: 8rem;
  left: 2%;
  width: 700px;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.hero-logo:hover {
  opacity: 1;
}

.hero-content h1 {
  font-family: var(--fonte-display);
  font-size: 4rem;
  color: var(--cor-branco);
  margin-bottom: 1.5rem;
  line-height: 1.15;
  text-align: left;
}

.hero-content p {
  font-size: 1.5rem;
  color: #e5e5e5;
  max-width: 600px;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Responsivo - Hero */
@media (max-width: 768px) {
  .hero-logo {
    width: 300px;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-content {
    margin-left: 2rem;
    margin-right: 2rem;
    padding-top: 20rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 200px;
    top: 4rem;
  }

  .hero-content {
    padding-top: 15rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }
}

/* =========================
   CARROSSEL - ÁREAS DE ATUAÇÃO
========================= */
.carousel-section {
  background: var(--cor-primaria);
  padding: 1.5rem 0;
  overflow: hidden;
}

.carousel-title {
  text-align: center;
  color: var(--cor-branco);
  margin-bottom: 2.5rem;
  letter-spacing: 2px;
  font-size: 1.2rem;
}

.carousel-container {
  overflow: hidden;   /* garante que o excesso fica oculto */
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  width: max-content;         /* ← essencial: deixa a track crescer além da tela */
  animation: scroll 35s linear infinite;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }  /* -50% = exatamente os itens originais */
}

.carousel-item {
  white-space: nowrap;
  color: var(--cor-branco);
  font-size: 1.2rem;
  padding-left: 4rem;
  border-left: 1px solid var(--cor-destaque);
}

/* Botão para parar o carrossel */
.carousel-wrapper {
  position: relative;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--cor-destaque);
  color: var(--cor-branco);
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0;                          /* ← invisível por padrão */
  transition: opacity 0.3s ease;
}

.carousel-wrapper:hover .carousel-btn {
  opacity: 1;                          /* ← aparece com o hover */
}

.carousel-track.paused {
  animation-play-state: paused;
}

/* =========================
   SEÇÕES - LAYOUT PRINCIPAL
========================= */
section {
  max-width: 1280px;
  margin: auto;
  padding: 7rem 2rem;
}

.section-title {
  font-family: var(--fonte-display);
  font-size: 3.2rem;
  text-align: center;
  color: var(--cor-primaria);
  margin-bottom: 1.2rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.35rem;
  color: var(--cor-texto-claro);
  max-width: 760px;
  margin: 0 auto 5rem;
}

/* =========================
   HISTÓRIA DO ESCRITÓRIO
========================= */
.historia-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
}

.historia-text p {
  font-size: 1.25rem;
  margin-bottom: 1.6rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.historia-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.stat-card {
  background: var(--cor-primaria);
  color: var(--cor-branco);
  padding: 3rem 2rem;
  text-align: center;
  border-radius: 6px;
}

.stat-number {
  font-size: 3.2rem;
  font-family: var(--fonte-display);
  color: var(--cor-destaque);
}

.stat-label {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* =========================
   ÁREAS DE ATUAÇÃO - CARDS
========================= */
#areas {
  background: var(--cor-fundo);
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.area-card {
  background: var(--cor-branco);
  padding: 3rem 2.5rem;
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.area-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.area-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
  color: var(--cor-primaria);
}

.area-icon svg {
  width: 100%;
  height: 100%;
}

.area-card h3 {
  font-size: 1.7rem;
  margin-bottom: 1rem;
  color: var(--cor-primaria);
  text-align: left;
}

.area-card p {
  font-size: 1.2rem;
  color: var(--cor-texto);
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Botão "Ver mais" dentro do card */
.area-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cor-primaria);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, gap 0.2s ease;
}

.area-link:hover {
  border-color: var(--cor-primaria);
}

.area-link:hover span {
  transform: translateX(4px);
  display: inline-block;
  transition: transform 0.2s ease;
}

/* Responsivo */
@media (max-width: 1024px) {
  .areas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .areas-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================
   MAPA DE LOCALIZAÇÃO
========================= */
.mapa-localizacao {
  padding: 5rem 0 0;
  background: #f8f9fa;
}

.mapa-localizacao .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  text-align: center;
}

.mapa-localizacao h2 {
  font-family: var(--fonte-display);
  font-size: 2.5rem;
  color: var(--cor-primaria);
  margin-bottom: 0.5rem;
  text-align: center;
}

.mapa-localizacao p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.mapa-container {
  width: 100%;
  height: 450px;
  position: relative;
  overflow: hidden;
}

.mapa-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Responsivo - Mapa */
@media (max-width: 768px) {
  .mapa-localizacao {
    padding: 3rem 0 0;
  }

  .mapa-localizacao h2 {
    font-size: 2rem;
  }

  .mapa-container {
    height: 350px;
  }
}

/* =========================
   FOOTER - RODAPÉ
========================= */
footer {
  background: var(--cor-primaria);
  color: var(--cor-branco);
  padding: 5rem 2rem 2rem;
}

.footer-content {
  max-width: 1280px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.footer-section h3 {
  font-family: var(--fonte-display);
  margin-bottom: 1.5rem;
  color: var(--cor-destaque);
  text-align: left;
}

.footer-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: left;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
  text-align: left;
}

.footer-links a {
  color: var(--cor-branco);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--cor-destaque);
}

/* Ícones sociais */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--cor-branco);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--cor-destaque);
  transform: translateY(-3px);
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Ícones de contato */
.footer-section p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section p svg {
  width: 18px;
  height: 18px;
  fill: var(--cor-destaque);
  flex-shrink: 0;
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  font-size: 0.95rem;
}

/* Ícone de segurança e versão */

.footer-bottom p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.footer-bottom svg {
  flex-shrink: 0;
}

/* Responsivo - Footer */
@media (max-width: 968px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 3rem 1.5rem 1.5rem;
  }
}

/* =========================
   RESPONSIVO GERAL
========================= */
@media (max-width: 900px) {
  .areas-grid,
  .historia-content {
    grid-template-columns: 1fr;
  }

  .hero-content {
    margin: 0 2rem;
  }

  section {
    padding: 5rem 2rem;
  }

  .section-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 600px) {
  .historia-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 2rem 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* =========================
   PÁGINA 404
========================= */
.error-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cor-fundo);
  padding: 2rem;
}

.error-container {
  text-align: center;
  max-width: 600px;
}

.error-container h1 {
  font-size: 8rem;
  font-weight: 900;
  color: var(--cor-primaria);
  margin-bottom: 1rem;
  font-family: var(--fonte-display);
}

.error-container h2 {
  font-size: 2.5rem;
  color: var(--cor-texto);
  margin-bottom: 1rem;
  font-family: var(--fonte-titulo);
}

.error-container p {
  font-size: 1.2rem;
  color: var(--cor-texto-claro);
  margin-bottom: 2rem;
  line-height: 1.6;
  text-align: center;
}

.btn-primary {
  display: inline-block;
  background: var(--cor-destaque);
  color: var(--cor-branco);
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid var(--cor-destaque);
}

.btn-primary:hover {
  background: var(--cor-branco);
  color: var(--cor-destaque);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .error-container h1 {
    font-size: 6rem;
  }

  .error-container h2 {
    font-size: 2rem;
  }

  .error-container p {
    font-size: 1.1rem;
  }
}

/* Botão voltar ao topo */
.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--cor-primaria);
  color: var(--cor-branco);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--cor-secundaria);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
  transform: translateY(0);
}


/* =========================
   ADIÇÕES AO CSS PRINCIPAL
   Adicione ao final do seu style.css
========================= */

/* Preview de texto cortado na seção história */
.historia-preview {
  position: relative;
  max-height: 90px;
  overflow: hidden;
}

/* .historia-preview p {
   herdado do .historia-text p 
} 
*/

.historia-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(to bottom, transparent, var(--cor-branco));
  pointer-events: none;
}

/* Se a seção sobre tiver fundo diferente (ex: var(--cor-fundo)), troque o branco */
#areas .historia-fade {
  background: linear-gradient(to bottom, transparent, var(--cor-fundo));
}

/* Link "Ler mais" da história */
.historia-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cor-primaria);
  text-decoration: none;
  border-bottom: 2px solid var(--cor-destaque);
  padding-bottom: 2px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.historia-link:hover {
  color: var(--cor-destaque);
  gap: 0.9rem;
}




/* Links Termos e Privacidade */
.footer-legal {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-legal a {
  color: #aaa;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 1px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--cor-destaque);
  border-color: var(--cor-destaque);
}

.footer-legal span { color: rgba(255, 255, 255, 0.2); }

@media (max-width: 968px) {
  .footer-content { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 576px) {
  .footer-content { grid-template-columns: 1fr; }
  footer          { padding: 3rem 1.5rem 1.5rem; }
}