/* Página Contactos — estilos isolados (prefixo cp-) para não conflituar com contacto.css */

/* O padding global body.has-subnav usa +52px; a sub-nav real numa linha é ~44–48px — sobra uma faixa antes do hero */
body.page-contact.has-subnav {
  padding-top: calc(var(--header-stack-top) + 46px);
}

@media (max-width: 768px) {
  body.page-contact.has-subnav {
    padding-top: calc(var(--header-stack-top) + min(8.5rem, 28vh));
  }
}

.cp-hero {
  position: relative;
  min-height: clamp(200px, 32vh, 360px);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  margin: 0;
}

.cp-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cp-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42);
}

.cp-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(37, 37, 37, 0.9) 0%,
    rgba(37, 37, 37, 0.28) 50%,
    transparent 100%
  );
}

.cp-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.75rem clamp(14px, 4vw, 28px) 1.5rem;
  box-sizing: border-box;
}

.cp-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cor-principal);
  margin: 0 0 0.4rem;
}

.cp-hero__title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--cor-branca-permanet);
  max-width: 100%;
  text-wrap: balance;
}

.cp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3.5rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Sobe ligeiramente o bloco principal para “encostar” ao hero, sem margens negativas agressivas */
.cp-main {
  margin-top: -1.25rem;
}

.cp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 1.25rem;
  align-items: stretch;
}

.cp-panel {
  background: var(--cor-branca);
  border: 1px solid rgba(74, 88, 92, 0.14);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.darkmode .cp-panel {
  background: var(--cor-branca);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
}

.cp-panel__head {
  padding: 1.35rem 1.5rem 0;
  border-bottom: 1px solid rgba(74, 88, 92, 0.1);
}

.darkmode .cp-panel__head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cp-panel__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--cor-texto);
}

.cp-panel__sub {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--cor-texto);
  opacity: 0.92;
}

/* Logótipo à esquerda + formulário à direita (pedido) */
.cp-form-split {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
  gap: 1.25rem 1.5rem;
  padding: 1.25rem 1.5rem 1.5rem;
  align-items: start;
}

.cp-logo-side {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.25rem;
}

.cp-logo-side img {
  width: 100%;
  max-width: 120px;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  display: block;
  padding: 10px;
  border-radius: 12px;
  background: rgba(64, 164, 59, 0.08);
  border: 1px solid rgba(74, 88, 92, 0.12);
  box-sizing: border-box;
}

.cp-form {
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem 1.15rem;
  border: 1px solid rgba(74, 88, 92, 0.18);
  border-radius: 4px;
  box-sizing: border-box;
}

.darkmode .cp-form {
  border-color: rgba(255, 255, 255, 0.14);
}

.cp-field {
  display: grid;
  gap: 0.35rem;
}

.cp-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cor-texto);
}

.cp-field input,
.cp-field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(74, 88, 92, 0.22);
  border-radius: 4px;
  background: var(--cor-branca);
  color: var(--cor-texto);
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cp-field textarea {
  min-height: 150px;
  resize: vertical;
}

.cp-field input:focus,
.cp-field textarea:focus {
  border-color: rgba(64, 164, 59, 0.75);
  box-shadow: 0 0 0 3px rgba(64, 164, 59, 0.16);
}

.cp-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.cp-btn {
  border: none;
  padding: 0.85rem 1.35rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--cor-branca-permanet);
  background: var(--cor-principal);
  transition: background 0.2s ease, transform 0.15s ease;
}

.cp-btn:hover {
  background: var(--cor-texto);
  transform: translateY(-1px);
}

/* Painel de informações */
.cp-info-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.cp-info-list {
  display: grid;
  gap: 0.75rem;
}

.cp-info-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  background: var(--cor-bacground-page);
  border: 1px solid rgba(74, 88, 92, 0.1);
  border-radius: 4px;
}

.darkmode .cp-info-row {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.cp-info-row i {
  font-size: 1.2rem;
  color: var(--cor-principal);
  line-height: 1.2;
}

.cp-info-row strong {
  color: var(--cor-texto);
}

.cp-info-row span,
.cp-info-row a {
  color: var(--cor-texto);
  text-decoration: none;
}

.cp-social {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.cp-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 4px;
  background: var(--cor-bacground-page);
  border: 1px solid rgba(74, 88, 92, 0.14);
  color: var(--cor-texto);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.darkmode .cp-social a {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.cp-social a:hover {
  background: var(--cor-principal);
  border-color: var(--cor-principal);
  color: var(--cor-branca-permanet);
}

/* Mapa grande */
.cp-map {
  margin-top: 1.25rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(74, 88, 92, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.darkmode .cp-map {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
}

.cp-map iframe {
  width: 100%;
  height: min(640px, 62vh);
  min-height: 420px;
  border: 0;
  display: block;
}

.cp-map__external {
  margin: 0;
  padding: 0.65rem 1rem 0.85rem;
  text-align: right;
  font-size: 0.88rem;
  background: var(--cor-bacground-page);
  border-top: 1px solid rgba(74, 88, 92, 0.1);
}

.darkmode .cp-map__external {
  background: rgba(255, 255, 255, 0.04);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.cp-map__external a {
  color: var(--cor-principal);
  font-weight: 600;
  text-decoration: none;
}

.cp-map__external a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .cp-grid {
    grid-template-columns: 1fr;
  }

  .cp-form-split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cp-logo-side {
    justify-content: center;
    padding-top: 0;
  }

  .cp-logo-side img {
    max-width: 100px;
    max-height: 100px;
  }

  .cp-actions {
    justify-content: stretch;
  }

  .cp-btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .cp-main {
    margin-top: -0.75rem;
  }

  .cp-map iframe {
    min-height: 340px;
    height: 48vh;
  }
}
