/*
 * AP Advogados — refinamento exclusivo da home V16.
 * O hero e as páginas internas permanecem sob os estilos originais.
 */

.home-page {
  --home-dark: #0e1518;
  --home-dark-2: #151e22;
  --home-gold: #b99352;
  --home-gold-light: #d7bb83;
  --home-line: rgba(185, 147, 82, 0.32);
}

.home-page a:focus-visible,
.home-page button:focus-visible {
  outline: 2px solid var(--home-gold-light);
  outline-offset: 4px;
}

/* O cabeçalho conserva dimensões, transparência e quebra da V16 publicada. */
.home-page .header-actions {
  order: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
}

.home-page .header-whatsapp,
.home-page .header-schedule {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--home-gold-light);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.home-page .header-whatsapp {
  gap: 6px;
  padding: 0 12px 0 0;
  border-right: 1px solid rgba(185, 147, 82, 0.42);
}

.home-page .header-whatsapp:hover {
  color: #efe1c4;
  border-right-color: rgba(215, 187, 131, 0.74);
}

.home-page .header-contact-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  object-fit: contain;
  filter: grayscale(1) sepia(1) saturate(1.1) brightness(0.91);
  opacity: 0.9;
}

.home-page .header-contact-copy {
  display: grid;
  line-height: 1.08;
}

.home-page .header-contact-copy small {
  display: none;
}

.home-page .header-contact-copy strong {
  color: currentColor;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.075em;
  white-space: nowrap;
}

.home-page .header-schedule {
  min-width: 140px;
  gap: 0;
  padding: 0 11px;
  border: 1px solid rgba(185, 147, 82, 0.62);
  border-radius: 4px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.home-page .header-schedule::after {
  content: none;
  display: none;
}

.home-page .header-schedule:hover {
  color: #f0dfbd;
  background: rgba(185, 147, 82, 0.08);
  border-color: rgba(215, 187, 131, 0.9);
  transform: translateY(-1px);
}

.home-page .nav-schedule-mobile {
  display: none !important;
}

@media (min-width: 981px) {
  .home-page .nav-submenu {
    top: calc(100% + 6px);
  }
}

/* Iguala desktop e tablet às áreas; no mobile preserva o hero compacto original. */
.home-page:not(.landing-page) .hero {
  min-height: clamp(560px, 62svh, 600px);
}

@media (max-width: 980px) {
  .home-page:not(.landing-page) .hero {
    min-height: 520px;
  }
}

@media (max-width: 620px) {
  .home-page:not(.landing-page) .hero {
    min-height: auto;
  }
}

/* Hero em duas linhas: título e subtítulo sem quebra interna. */
.home-page .hero h1 {
  font-size: clamp(13px, 4.1vw, 25px);
  line-height: 1.08;
  white-space: nowrap;
}

.home-page .hero-subtitle {
  margin-bottom: 14px;
  font-size: clamp(12px, 3.8vw, 20px);
  white-space: nowrap;
}

.home-page .hero-support {
  margin: 0 0 19px;
  color: var(--gold-2);
  font-family: var(--sans);
  font-size: clamp(10px, 0.82vw, 12px);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-page .home-hero-action {
  width: 100%;
  margin-top: 0;
  display: flex;
  justify-content: center;
}

.home-page .home-action-rectangle {
  width: min(176px, 100%);
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(185, 147, 82, 0.72);
  border-radius: 4px;
  background: rgba(185, 147, 82, 0.035);
  color: var(--home-gold-light);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.home-page .home-action-rectangle:hover {
  color: #f0dfbd;
  background: rgba(185, 147, 82, 0.1);
  border-color: rgba(215, 187, 131, 0.94);
  transform: translateY(-1px);
}

.home-page .home-action-rectangle:focus-visible {
  outline: 2px solid #f0dfbd;
  outline-offset: 3px;
}

@media (min-width: 981px) {
  .home-page .hero-copy {
    transform: translateY(clamp(40px, 6vh, 60px));
  }
}

@media (max-width: 620px) {
  .home-page .hero-support {
    font-size: clamp(9px, 2.25vw, 10px);
    letter-spacing: 0.045em;
  }
}

/* Fundo contínuo do escritório e retrato. */
.home-page .section.white.office-section {
  background: linear-gradient(108deg, #f8f2e7 0%, #f3e9d8 54%, #ebdec6 100%);
}

.home-page .section.white.office-section::before {
  background: none;
}

.home-page .home-portrait-stack {
  width: 100%;
  max-width: 390px;
  display: grid;
  justify-items: center;
  gap: 18px;
  justify-self: end;
}

.home-page .home-portrait-stack .office-portrait {
  width: 100%;
  max-width: none;
  margin: 0;
  justify-self: stretch;
}

.home-page .home-photo-action {
  width: 100%;
  display: flex;
  justify-content: center;
}

.home-page .home-photo-contact-cta {
  color: #765426;
  background: rgba(255, 255, 255, 0.14);
}

.home-page .home-photo-contact-cta:hover {
  color: #4e3517;
  background: rgba(185, 147, 82, 0.12);
  border-color: rgba(128, 88, 36, 0.82);
}

.home-page .home-photo-contact-cta:focus-visible {
  outline-color: #765426;
}

@media (max-width: 980px) {
  .home-page .home-portrait-stack {
    justify-self: center;
  }
}

/* Faixa de áreas inspirada na referência, mantendo a linguagem da V16. */
.home-page .areas-section {
  padding-top: 58px;
  padding-bottom: 54px;
  background:
    radial-gradient(circle at 84% 12%, rgba(185, 147, 82, 0.08), transparent 30%),
    linear-gradient(180deg, #121a1e, #0e1518);
}

.home-page .areas-showcase {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) repeat(4, minmax(150px, 1fr));
  overflow: hidden;
  border-top: 1px solid rgba(185, 147, 82, 0.42);
  border-bottom: 1px solid var(--home-line);
  background:
    linear-gradient(110deg, rgba(185, 147, 82, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.home-page .areas-intro,
.home-page .area-tile {
  min-height: 312px;
  padding: 24px 20px;
  border-right: 1px solid rgba(185, 147, 82, 0.16);
}

.home-page .areas-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-page .areas-line {
  width: 38px;
  height: 1px;
  margin-bottom: 15px;
  background: var(--home-gold);
}

.home-page .areas-intro .section-kicker {
  margin-bottom: 9px;
  color: var(--home-gold-light);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.home-page .areas-intro h2 {
  margin: 0 0 13px;
  color: var(--home-gold-light);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.32;
  text-transform: uppercase;
}

.home-page .areas-intro p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.58;
}

.home-page .area-tile {
  --area-card-image: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: #f4e7cf;
  background: #101619;
  text-decoration: none;
  scroll-margin-top: 96px;
  transition: color 0.28s ease;
}

.home-page #seguros {
  --area-card-image: url("../img/areas/01-seguros-v1.jpg");
}

.home-page #direito-empresarial {
  --area-card-image: url("../img/areas/02-empresarial-v1.jpg");
}

.home-page #direito-medico {
  --area-card-image: url("../img/areas/03-direito-medico-v1.jpg");
}

.home-page #direito-criminal {
  --area-card-image: url("../img/areas/04-criminal-v1.jpg");
}


.home-page #direito-trabalhista {
  --area-card-image: url("../img/areas/05-trabalhista-v1.jpg");
}

.home-page .area-tile::before,
.home-page .area-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-page .area-tile::before {
  z-index: -2;
  background-image: var(--area-card-image);
  background-position: center;
  background-size: cover;
  filter: saturate(0.78) brightness(0.68) contrast(1.08);
  transform: scale(1.015);
  transition: filter 0.38s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home-page .area-tile::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 9, 11, 0.3) 0%, rgba(5, 9, 11, 0.1) 34%, rgba(5, 9, 11, 0.9) 100%),
    linear-gradient(90deg, rgba(6, 10, 12, 0.35), transparent 70%);
  transition: background 0.3s ease;
}

.home-page .area-tile:last-child {
  border-right: 0;
}

.home-page .area-tile:hover {
  color: #fff5e4;
}

.home-page .area-tile:hover::before {
  filter: saturate(0.9) brightness(0.82) contrast(1.04);
  transform: scale(1.055);
}

.home-page .area-tile:focus-visible {
  outline: 2px solid var(--home-gold-light);
  outline-offset: -3px;
}

.home-page .area-card-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.home-page .area-tile h3 {
  min-height: 2.16em;
  margin: 8px 0 10px;
  color: currentColor;
  font-family: var(--serif);
  font-size: clamp(18px, 1.2vw, 20px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.home-page .area-card-eyebrow {
  min-height: 2.8em;
  display: flex;
  align-items: flex-start;
  color: rgba(224, 194, 137, 0.9);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.home-page .area-card-description {
  min-height: 2.9em;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.45;
}

.home-page .area-card-cta {
  min-height: 1.4em;
  margin-top: 18px;
  color: rgba(244, 223, 182, 0.9);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.home-page .area-card-cta::after {
  content: "";
  width: 28px;
  height: 1px;
  display: block;
  margin-top: 7px;
  background: rgba(215, 187, 131, 0.82);
  transition: width 0.28s ease;
}

.home-page .area-tile:hover .area-card-copy {
  transform: translateY(-4px);
}

.home-page .area-tile:hover .area-card-cta::after {
  width: 48px;
}

/* WhatsApp flutuante como no site original: somente o círculo verde. */
.home-page .floating-wa.wa-image-link {
  padding: 0 !important;
  background: transparent !important;
  border: 0;
  box-shadow: none !important;
  animation: none !important;
}

.home-page .floating-wa.wa-image-link .wa-floating-img {
  filter: none;
}

@media (min-width: 981px) and (max-width: 1180px) {
  .home-page .header-actions {
    gap: 8px;
  }

  .home-page .header-whatsapp {
    padding-right: 8px;
  }

  .home-page .header-contact-copy strong {
    font-size: 9px;
    letter-spacing: 0.045em;
  }

  .home-page .header-schedule {
    gap: 0;
    padding: 0 8px;
    font-size: 7.8px;
  }
}

@media (max-width: 980px) {
  .home-page .header-actions {
    flex: 0 1 154px;
    width: 154px;
    max-width: 154px;
    margin-left: auto;
    gap: 0;
    display: block;
  }

  .home-page .header-whatsapp {
    width: 100%;
    min-height: 36px;
    gap: 6px;
    padding: 0;
    border-right: 0;
  }

  .home-page .header-contact-icon {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
  }

  .home-page .header-contact-copy strong {
    font-size: 9.5px;
    letter-spacing: 0.04em;
  }

  .home-page .header-schedule {
    display: none;
  }

  .home-page .nav-schedule-mobile {
    width: calc(100% - 32px) !important;
    min-height: 46px !important;
    margin: 14px 16px 18px;
    padding: 13px 18px !important;
    display: flex !important;
    justify-content: center !important;
    color: var(--home-gold-light) !important;
    background: rgba(185, 147, 82, 0.04);
    border: 1px solid rgba(185, 147, 82, 0.58);
    border-radius: 4px;
    font-size: 12px !important;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .home-page .areas-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .areas-intro {
    grid-column: 1 / -1;
    min-height: 0;
    border-right: 0;
  }

  .home-page .area-tile {
    grid-column: auto;
    min-height: 282px;
    border-top: 1px solid rgba(185, 147, 82, 0.14);
  }

  .home-page .area-tile:last-child {
    border-right: 0;
  }

  .home-page .area-tile:nth-child(odd) {
    border-right: 0;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .home-page .area-tile {
    padding-right: 14px;
    padding-left: 14px;
  }

  .home-page .area-tile h3 {
    font-size: 16px;
  }

  .home-page .area-card-eyebrow,
  .home-page .area-card-cta {
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .home-page .area-card-description {
    font-size: 9px;
  }
}

@media (max-width: 620px) {
  .home-page .header-actions {
    flex-basis: 136px;
    width: 136px;
    max-width: 136px;
  }

  .home-page .header-whatsapp {
    min-height: 34px;
  }

  .home-page .header-contact-icon {
    width: 11px;
    height: 11px;
    flex-basis: 11px;
  }

  .home-page .header-contact-copy strong {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .home-page .areas-section {
    padding-top: 48px;
    padding-bottom: 38px;
  }

  .home-page .areas-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .areas-intro {
    grid-column: 1 / -1;
    min-height: 0;
    border-right: 0;
  }

  .home-page .area-tile {
    grid-column: auto;
    min-height: 238px;
    border-right: 1px solid rgba(185, 147, 82, 0.16);
    border-top: 1px solid rgba(185, 147, 82, 0.14);
  }

  .home-page .area-tile:last-child {
    border-right: 0;
  }

  .home-page .area-tile:nth-child(odd) {
    border-right: 0;
  }

  .home-page .area-tile h3 {
    font-size: clamp(20px, 7vw, 26px);
  }

  .home-page .area-card-description {
    min-height: 4.35em;
    font-size: 11px;
  }

}

@media (max-width: 460px) {
  .home-page .areas-showcase {
    grid-template-columns: 1fr;
  }

  .home-page .area-tile,
  .home-page .area-tile:last-child {
    grid-column: auto;
    width: auto;
    min-height: 238px;
    border-right: 0;
    border-left: 0;
  }

  .home-page .area-card-eyebrow,
  .home-page .area-tile h3,
  .home-page .area-card-description {
    min-height: 0;
  }
}

@media (max-width: 400px) {
  .home-page .header-actions {
    flex-basis: 126px;
    width: 126px;
    max-width: 126px;
  }

  .home-page .header-contact-copy strong {
    font-size: 9.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* Escopo regional final: quatro áreas na ordem aprovada. */
@media (min-width: 981px) {
  .home-page.home-four-areas .areas-showcase {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    grid-template-columns: minmax(230px, 1.25fr) repeat(4, minmax(150px, 1fr));
  }
}

@media (min-width: 760px) and (max-width: 980px) {
  .home-page.home-four-areas .areas-showcase {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-page.home-four-areas .areas-intro {
    grid-column: 1 / -1;
  }

  .home-page.home-four-areas .area-tile,
  .home-page.home-four-areas .area-tile:nth-child(5),
  .home-page.home-four-areas .area-tile:last-child {
    grid-column: span 2;
  }
}
