/* ============================================
   ALVES COELHO ADVOGADOS - Custom Styles
   Brand colors: #4A2E18 (dark brown), #B8976A (sage), #FAF8F5 (warm off-white)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --brand-brown: #4A2E18;
  --brand-sage: #B8976A;
  --brand-bg: #FAF8F5;
  --brand-gold: #B8976A;
  --brand-gold-deep: #8B6F47;
  --brand-border: #E5DFD6;
}

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */
body {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Playfair Display', 'Georgia', serif;
  font-feature-settings: "kern" 1;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* ============================================
   NAVBAR SCROLL EFFECT
   ============================================ */
nav {
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 4px 24px rgba(43, 32, 24, 0.08);
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */
.hero-badge {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-title {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease 0.4s forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease 0.65s forwards;
}

.hero-meta {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease 0.85s forwards;
}

.hero-ctas {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease 1s forwards;
}

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

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================
   STATS BAR
   ============================================ */
.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 48px;
  background: rgba(74, 46, 24, 0.15);
}

.stat-number {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-brown);
  line-height: 1;
}

/* ============================================
   AREA CARDS - enhanced hover
   ============================================ */
.area-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
}

.area-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(74, 46, 24, 0.12);
  border-color: rgba(74, 46, 24, 0.25) !important;
}

.area-card .area-icon {
  transition: transform 0.3s ease, background 0.3s ease;
}

.area-card:hover .area-icon {
  transform: scale(1.1) rotate(-3deg);
  background: #6B4423;
}

/* ============================================
   TEAM CARDS - enhanced hover
   ============================================ */
.team-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(43, 32, 24, 0.12);
}

/* ============================================
   ARTICLE CARDS
   ============================================ */
.article-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(74, 46, 24, 0.1);
  border-color: rgba(74, 46, 24, 0.3) !important;
}

/* ============================================
   WHATSAPP FLOATING BUTTON - PULSE
   ============================================ */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  background: #25D366;
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.wa-float:hover {
  background: #128C7E;
  transform: scale(1.1);
}

.wa-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: wa-pulse 2.2s ease-out infinite;
  z-index: -1;
}

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ============================================
   MOBILE STICKY CTA BAR
   ============================================ */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 55;
  background: white;
  border-top: 1px solid #E5DFD6;
  padding: 10px 16px;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(43, 32, 24, 0.1);
}

@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex;
  }

  /* Give body space for the sticky bar */
  body {
    padding-bottom: 72px;
  }

  /* Barra inferior já oferece WhatsApp; flutuante atrapalha a leitura no mobile */
  .wa-float {
    display: none;
  }
}

/* ============================================
   FORM STYLES
   ============================================ */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(74, 46, 24, 0.1);
  border-color: var(--brand-brown) !important;
  outline: none;
}

input, select, textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-question {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.faq-question i {
  transition: transform 0.25s ease;
}

.faq-open i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-open + .faq-answer {
  max-height: 220px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(43, 32, 24, 0.08);
}

.testimonial-card .quote-mark {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: 5rem;
  line-height: 0.8;
  color: rgba(74, 46, 24, 0.12);
  font-style: italic;
  position: absolute;
  top: 20px;
  left: 24px;
}

/* ============================================
   SECTION DIVIDER (diagonal)
   ============================================ */
.divider-down {
  position: relative;
}

.divider-down::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--brand-bg);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #2B2018;
  color: white;
  padding: 14px 24px;
  border-radius: 9999px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.toast.show {
  display: flex;
  animation: toast-pop 0.25s ease forwards;
}

@keyframes toast-pop {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ============================================
   MOBILE MENU
   ============================================ */
#mobile-menu {
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SUBTLE PRINT STYLES
   ============================================ */
/* ============================================
   DIA A DIA — GALERIA FOTOGRÁFICA
   ============================================ */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .gallery-masonry {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .gallery-masonry {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.gallery-item {
  cursor: pointer;
  border-radius: 1rem;
  overflow: hidden;
  outline: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:focus-visible {
  box-shadow: 0 0 0 3px rgba(74, 46, 24, 0.35);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(74, 46, 24, 0.15);
}

.gallery-item__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #E5DFD6;
}

.gallery-item--tall .gallery-item__media {
  aspect-ratio: 3 / 4;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--wide .gallery-item__media {
  aspect-ratio: 2 / 1;
}

@media (max-width: 639px) {
  .gallery-item--wide {
    grid-column: span 1;
  }
  .gallery-item--wide .gallery-item__media {
    aspect-ratio: 1;
  }
}

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

.gallery-item:hover .gallery-item__media img {
  transform: scale(1.06);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43, 32, 24, 0.92) 0%, rgba(43, 32, 24, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item__overlay,
.gallery-item:focus-visible .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__tag {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  background: rgba(201, 169, 110, 0.9);
  color: #2B2018;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.gallery-item__title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.gallery-item__meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
}

.gallery-item__meta i {
  margin-right: 0.25rem;
}

/* Feed (linha do tempo) */
.gallery-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gallery-feed-card {
  background: white;
  border: 1px solid #E5DFD6;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-feed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(74, 46, 24, 0.08);
}

.gallery-feed-card__btn {
  padding: 1.25rem;
  cursor: pointer;
  background: none;
  border: none;
}

.gallery-feed-card__thumb {
  width: 100px;
  height: 100px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #E5DFD6;
}

.gallery-feed-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.hidden {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 32, 24, 0.88);
  backdrop-filter: blur(4px);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
}

.lightbox__content {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.35);
  max-height: 90vh;
}

@media (min-width: 768px) {
  .lightbox__content {
    flex-direction: row;
    max-height: 85vh;
  }
}

.lightbox__image-wrap {
  flex: 1.2;
  min-height: 240px;
  max-height: 50vh;
  background: #2B2018;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .lightbox__image-wrap {
    max-height: 85vh;
  }
}

.lightbox__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: inherit;
}

.lightbox__details {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-y: auto;
  max-height: 40vh;
}

@media (min-width: 768px) {
  .lightbox__details {
    max-height: 85vh;
    min-width: 320px;
  }
}

.lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem;
  z-index: 2;
  transition: opacity 0.2s;
}

.lightbox__close:hover {
  opacity: 0.7;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  color: #4A2E18;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
}

.lightbox__nav:hover {
  background: #FAF8F5;
  transform: translateY(-50%) scale(1.05);
}

.lightbox__nav--prev {
  left: -1rem;
}

.lightbox__nav--next {
  right: -1rem;
}

@media (max-width: 767px) {
  .lightbox__nav--prev {
    left: 0.25rem;
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .lightbox__nav--next {
    right: 0.25rem;
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(43, 32, 24, 0.6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   SUBTLE PRINT STYLES
   ============================================ */
@media print {
  nav, .fixed, foot