/* --- Cores do escritório --- */
:root {
  --primary: #2b4133;
  --primary-dark: #1f3026;
  --primary-light: #3d5a45;
  --white: #fff;
  --off-white: #f8f9f8;
  --text: #2b4133;
  --text-muted: #5a6b5e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Barra superior (contato + redes) — esconde ao rolar --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background: #fff;
  color: #223a28;
  font-size: 0.8125rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

body.topbar-hidden .topbar {
  transform: translateY(-100%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
}

.topbar-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #223a28;
  text-decoration: none;
  transition: opacity 0.2s;
}

.topbar-item:hover {
  opacity: 0.8;
  color: #223a28;
}

.topbar-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.topbar-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #223a28;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(34, 58, 40, 0.35);
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}

.topbar-social-link:hover {
  background: rgba(34, 58, 40, 0.08);
  border-color: #223a28;
  color: #223a28;
}

/* --- Header (logo + menu) — sempre fixo; sobe quando topbar esconde --- */
.header {
  position: fixed;
  top: 42px;
  left: 0;
  right: 0;
  z-index: 100;
  background: #223a28;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: top 0.3s ease, box-shadow 0.3s ease;
}

body.topbar-hidden .header {
  top: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.logo {
  text-decoration: none;
  color: #fff;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
}

.logo-img {
  display: block;
  height: 70px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.logo .logo-text {
  display: none;
  letter-spacing: 0.02em;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #fff;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  background: var(--primary);
  color: var(--white);
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(43, 65, 51, 0.85), rgba(43, 65, 51, 0.95)), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?auto=format&fit=crop&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 6rem 0 1rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 560px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--off-white);
  transform: translateY(-1px);
}

/* --- Seções comuns --- */
.section-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.section-intro {
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  max-width: 640px;
}

/* --- Áreas de atuação --- */
.areas {
  padding: 4.5rem 0;
  background: var(--off-white);
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.area-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(43, 65, 51, 0.06);
  border: 1px solid rgba(43, 65, 51, 0.08);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.area-card:hover {
  box-shadow: 0 8px 24px rgba(43, 65, 51, 0.12);
  border-color: rgba(43, 65, 51, 0.15);
  transform: translateY(-2px);
}

.area-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--off-white);
}

.area-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.area-card-body {
  padding: 1.5rem 1.75rem;
}

.area-card h3 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.2rem;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.area-card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.link-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.link-more:hover {
  text-decoration: underline;
}

.btn-link-area {
  background: none;
  border: none;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.btn-link-area:hover {
  color: var(--primary);
  background: rgba(43, 65, 51, 0.12);
}

/* Modal áreas: alinhar com tema do site */
.modal-header {
  border-bottom-color: rgba(43, 65, 51, 0.15);
}

.modal-footer .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.modal-footer .btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* --- Sobre / Empresa --- */
.about {
  padding: 4rem 0;
  background: var(--white);
}

.about-inner {
  display: grid;
  grid-template-columns: 0.95fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-img {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(43, 65, 51, 0.12);
}

.about-img img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.about-content {
  max-width: 540px;
}

.about-content p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* --- Contato --- */
.contact {
  position: relative;
  padding: 4rem 0;
  background: var(--off-white);
}

.contact-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1521791136064-7986c2920216?w=1920&q=60');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  pointer-events: none;
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact-box {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-item strong {
  font-size: 0.85rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-item a,
.contact-item span {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.contact-item a:hover {
  color: var(--primary-light);
}

.contact-item a .fa {
  margin-right: 0.35rem;
}

.contact-email-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.contact-email-btn:hover {
  color: var(--primary-light);
}

.contact-email-btn .fa {
  margin-right: 0.35rem;
}

/* Modal formulário de contato: mais largo e sem scroll na página */
#modalContato .modal-dialog.modal-contato-lg {
  max-width: 90%;
  width: 640px;
  margin-left: auto;
  margin-right: auto;
}
#modalContato .modal-content {
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}
#modalContato .modal-body {
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}
@media (min-width: 768px) {
  #modalContato .modal-dialog.modal-contato-lg {
    width: 720px;
    max-width: 90%;
  }
}

.form-contato .obrigatorio {
  color: #c00;
}

.form-contato .form-label {
  font-weight: 600;
  color: var(--primary);
}

.form-contato .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(43, 65, 51, 0.2);
}

.contact-cta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  background: var(--primary);
  color: var(--white);
  text-align: center;
}

.footer-brand {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* --- Botão WhatsApp --- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #25d366;
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  color: var(--white);
}

.whatsapp-float svg {
  flex-shrink: 0;
}

.whatsapp-label {
  font-weight: 600;
  font-size: 0.95rem;
}

/* --- Responsivo --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 110px; /* topbar 42px + header 68px */
    left: 0;
    right: 0;
    background: #223a28;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  body.topbar-hidden .nav {
    top: 68px;
  }

  .nav ul {
    flex-direction: column;
    gap: 0;
  }

  .nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .nav a {
    display: block;
    padding: 0.9rem 0;
    color: #fff;
  }

  .header .logo-img {
    height: 40px;
  }

  .hero {
    min-height: 75vh;
    padding: 5rem 1rem 3rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-img {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
  }

  .areas-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    flex-direction: column;
    gap: 1.5rem;
  }

  .whatsapp-label {
    display: none;
  }

  .whatsapp-float {
    padding: 14px;
    bottom: 20px;
    right: 20px;
  }

  .topbar-contact {
    gap: 0.75rem;
  }
  .topbar-item span {
    font-size: 0.75rem;
  }
  .topbar-item:nth-child(3) span {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  .header .logo-img {
    height: 36px;
  }
  .topbar-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  .topbar-contact {
    order: 1;
    width: 100%;
    justify-content: center;
  }
  .topbar-social {
    order: 2;
  }
}
