/* ===================================================
   Gomes e Alves Advocacia – Custom Styles
   =================================================== */

:root {
  --primary:   #171a4a;
  --dark:      #232323;
  --light:     #f7f7f2;
  --gold:      #c9a84c;
  --gold-light:#e8c97a;
  --white:     #ffffff;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  overflow-x: hidden;
  max-width: 100%;
}

/* ---------- Scroll progress bar ---------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ---------- Navbar ---------- */
#navbar {
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

#navbar.scrolled {
  background: var(--primary) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

#navbar .nav-link {
  position: relative;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.25s;
}

#navbar .nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

#navbar .nav-link:hover,
#navbar .nav-link.active { color: var(--gold); }

#navbar .nav-link:hover::after,
#navbar .nav-link.active::after { width: 100%; }

/* Mobile menu */
#mobile-menu {
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  background: var(--primary);
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, #0e1035 60%, #1a2060 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- Section titles ---------- */
.section-badge {
  display: inline-block;
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  line-height: 1.2;
}

.section-title.light { color: var(--light); }

.divider-gold {
  display: block;
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}

.divider-gold.center { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(23,26,74,0.12);
}

/* Lawyer card */
.lawyer-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(23,26,74,0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
}

.lawyer-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(23,26,74,0.16);
}

.lawyer-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.lawyer-card .overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(23,26,74,0.96) 0%, rgba(23,26,74,0.6) 60%, transparent 100%);
  padding: 2rem 1.5rem 1.5rem;
  color: var(--white);
}

/* Practice area cards */
.area-card {
  background: var(--white);
  border-radius: 0.875rem;
  padding: 2rem;
  border-left: 4px solid var(--gold);
  box-shadow: 0 2px 16px rgba(23,26,74,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
}

.area-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(23,26,74,0.12);
  border-color: var(--primary);
}

.area-card .icon-wrap {
  width: 52px; height: 52px;
  background: rgba(23,26,74,0.07);
  border-radius: 0.625rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  transition: background 0.3s;
}

.area-card:hover .icon-wrap { background: var(--primary); }
.area-card:hover .icon-wrap svg { stroke: var(--gold); }

/* ---------- Criminal area cards (dark bg grid) ---------- */
.criminal-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 3px solid var(--gold);
  border-radius: 0.75rem;
  padding: 1.375rem 1.25rem;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.criminal-card:hover {
  background: rgba(255,255,255,0.09);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.criminal-card-icon {
  width: 42px; height: 42px;
  background: rgba(201,168,76,0.12);
  border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  margin-bottom: 1rem;
  transition: background 0.3s;
}

.criminal-card:hover .criminal-card-icon {
  background: rgba(201,168,76,0.22);
}

.criminal-card-title {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.criminal-card-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ---------- Rural / Banking cards (light bg) ---------- */
.rural-feature-card {
  background: linear-gradient(145deg, var(--primary) 0%, #0d1038 100%);
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  border: 1px solid rgba(201,168,76,0.2);
  box-shadow: 0 8px 32px rgba(23,26,74,0.18);
}

.rural-feature-icon-wrap {
  width: 56px; height: 56px;
  background: rgba(201,168,76,0.12);
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}

.rural-card {
  background: var(--white);
  border-radius: 0.75rem;
  padding: 1.375rem 1.25rem;
  border-bottom: 3px solid transparent;
  box-shadow: 0 2px 12px rgba(23,26,74,0.06);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.rural-card:hover {
  border-bottom-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(23,26,74,0.12);
}

.rural-card-icon {
  width: 40px; height: 40px;
  background: rgba(23,26,74,0.07);
  border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.875rem;
  transition: background 0.3s;
}

.rural-card:hover .rural-card-icon {
  background: rgba(23,26,74,0.12);
}

.rural-card-title {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.rural-card-desc {
  font-size: 0.78rem;
  color: rgba(35,35,35,0.55);
  line-height: 1.6;
}

/* ---------- Stats ---------- */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

/* ---------- Testimonials / Quote ---------- */
.quote-mark {
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 0.5;
  color: var(--gold);
  opacity: 0.4;
}

/* ---------- Contact form ---------- */
.form-field {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0.5rem;
  padding: 0.875rem 1.125rem;
  color: var(--white);
  width: 100%;
  transition: border-color 0.25s, background 0.25s;
  font-size: 0.95rem;
}

.form-field::placeholder { color: rgba(255,255,255,0.4); }

.form-field:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
}

select.form-field option { background: var(--primary); color: var(--white); }

/* ---------- Buttons ---------- */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
  text-decoration: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.35);
  filter: brightness(1.05);
}

.btn-gold:focus-visible,
.btn-outline:focus-visible,
.btn-whatsapp:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: #25d366;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
}

.btn-whatsapp:hover {
  background: #1fb855;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

/* ---------- WhatsApp float button ---------- */
#whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px; height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  z-index: 1000;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: pulse-wpp 2.5s infinite;
}

#whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(37,211,102,0.5);
}

@keyframes pulse-wpp {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
}

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ---------- Gold accent line ---------- */
.gold-line {
  width: 40px; height: 2px;
  background: var(--gold);
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.75rem;
}

/* ---------- Background sections ---------- */
.bg-primary-section {
  background: linear-gradient(135deg, var(--primary) 0%, #0f1240 100%);
}

.bg-dark-section {
  background: var(--dark);
}

/* ---------- Footer ---------- */
footer a:hover { color: var(--gold); }
footer .footer-link { transition: color 0.25s; }

/* ---------- Tag pill ---------- */
.tag-pill {
  display: inline-block;
  background: rgba(23,26,74,0.08);
  color: var(--primary);
  border: 1px solid rgba(23,26,74,0.15);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin: 0.2rem;
}

/* ---------- About timeline dots ---------- */
.timeline-item {
  position: relative;
  padding-left: 1.75rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0.45rem;
  width: 10px; height: 10px;
  background: var(--gold);
  border-radius: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 4px; top: 1.1rem;
  width: 2px;
  height: calc(100% + 0.5rem);
  background: rgba(201,168,76,0.25);
}

.timeline-item:last-child::after { display: none; }

/* ---------- Alert banner ---------- */
#form-alert {
  display: none;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  margin-top: 1rem;
}

#form-alert.success {
  display: block;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.4);
  color: #86efac;
}

#form-alert.error {
  display: block;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
}

/* ---------- Responsive helpers ---------- */

/* Navbar sempre com fundo em mobile/tablet (abaixo de lg = 1024px) */
@media (max-width: 1023px) {
  #navbar {
    background: var(--primary) !important;
  }
}

@media (max-width: 768px) {
  #hero { min-height: 90vh; }

  /* Lawyer cards: description below image on mobile */
  .lawyer-card {
    display: flex;
    flex-direction: column;
  }

  .lawyer-card img {
    aspect-ratio: 3/4;
    width: 100%;
  }

  .lawyer-card .overlay {
    position: static;
    background: var(--primary);
    padding: 1.25rem 1.25rem 1.5rem;
  }

  /* Evitar overflow horizontal causado pelos translateX das animações */
  .reveal-left,
  .reveal-right {
    transform: translateY(20px);
  }

  .reveal-left.visible,
  .reveal-right.visible {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right { transition: none; opacity: 1; transform: none; }
  .btn-gold, .btn-outline, .btn-whatsapp, .lawyer-card, .area-card, .card-hover { transition: none !important; }
  #whatsapp-float { animation: none; }
  .animate-bounce { animation: none; }
}
