/* Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    -system-ui, sans-serif;
  background: #f4f6fb;
  color: #1c2430;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

section {
  width: 100%;
}

.section-inner,
.hero-inner,
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 1.75rem;
}

/* Hero */
.hero {
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 35, 67, 0.06);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: stretch;
  position: relative;
}

.hero-left,
.hero-right {
  flex: 1;
}

.hero-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-right {
  display: flex;
  align-items: center;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.brand-logo {
  max-width: 190px;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 22px rgba(0, 32, 76, 0.16));
}

.hero-text h1 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.25;
  color: #215ea5;
  margin-bottom: 1.25rem;
}

.hero-text p {
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #4b5768;
}

.hero-text p + p {
  margin-top: 0.45rem;
}

/* Variante: logo à esquerda do texto */
.hero.logo-left .hero-inner {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3.2rem;
}

.hero.logo-left .hero-inner::before {
  content: none;
}

.hero.logo-left .hero-left {
  flex: 0 0 auto;
  margin-left: 0;
}

.hero.logo-left .brand-logo {
  max-width: 190px;
  filter: drop-shadow(0 8px 22px rgba(0, 32, 76, 0.16));
}

.hero.logo-left .hero-text {
  max-width: 48rem;
}

.hero.logo-left .hero-text h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: #1f5fa8;
  margin-bottom: 0.9rem;
}

.hero.logo-left .hero-text p {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .hero.logo-left .hero-inner {
    flex-direction: row;
    gap: 1.5rem;
  }
  .hero.logo-left .brand-logo {
    max-width: 150px;
  }
  .hero.logo-left .hero-left {
    margin-left: 0;
  }
  .hero.logo-left .hero-text h1 {
    font-size: clamp(1.8rem, 5.6vw, 2.4rem);
  }
}

/* Sections */
.section {
  background: transparent;
}

.section h2 {
  font-size: 1.35rem;
  margin-bottom: 1.75rem;
  color: #102544;
}

/* Serviços */
.services {
  background: #f5f7fb;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.7rem 1.5rem;
  border: 1px solid rgba(15, 35, 67, 0.06);
  box-shadow: 0 10px 30px rgba(3, 19, 52, 0.04);
}

.service-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  color: #1f3456;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #586272;
}

/* CTA */
.cta {
  background: #ffffff;
  border-block: 1px solid rgba(15, 35, 67, 0.06);
}

.cta-text {
  font-size: 1.1rem;
  text-align: center;
  color: #1f3456;
}

/* Contactos */
.contacts {
  background: #f5f7fb;
}

/* Ajuste de espaçamento (ex.: Modelo 3) */
.contacts.contacts-tight .section-inner {
  padding-top: 2.75rem;
}

/* Painel moderno de contactos */
.contact-panel {
  background: #fff;
  border: 1px solid rgba(15, 35, 67, 0.08);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 10px 30px rgba(3, 19, 52, 0.04);
}

.contact-items {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.ci-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(31, 95, 168, 0.09);
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}

.ci-content {
  display: grid;
  gap: 0.15rem;
}

.ci-label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  color: #1f3456;
}

.ci-link,
.ci-text {
  color: #3f4a5b;
  font-size: 0.98rem;
  line-height: 1.55;
  text-decoration: none;
}

.ci-note {
  font-size: 0.8rem;
}

.ci-link:hover {
  color: #1f5fa8;
  text-decoration: underline;
}

.contact-cta {
  margin-top: 1.1rem;
}

/* Botão primário */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.9rem;
  background: #1f5fa8;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
  box-shadow: 0 10px 24px rgba(23, 83, 155, 0.28);
}

.btn-primary:hover {
  background: #174a84;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(23, 83, 155, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(23, 83, 155, 0.26);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.86rem 1.4rem;
  background: transparent;
  color: #1f5fa8;
  border: 1.5px solid rgba(31, 95, 168, 0.35);
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.btn-outline:hover {
  background: rgba(31, 95, 168, 0.06);
  border-color: #1f5fa8;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid rgba(15, 35, 67, 0.06);
  background: #ffffff;
}

.footer-inner {
  padding: 1.4rem 1.75rem 1.7rem;
  font-size: 0.85rem;
  color: #828b99;
  text-align: center;
}

/* Responsivo */
@media (max-width: 768px) {
  .hero-inner {
    padding-top: 2.8rem;
  }

  .section-inner,
  .hero-inner {
    padding-inline: 1.25rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contacts-layout {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 860px) {
  .contact-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta-text {
    text-align: left;
  }
}

@media (min-width: 900px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-inner::before {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 1px;
    background: linear-gradient(
      to bottom,
      rgba(180, 190, 205, 0),
      rgba(180, 190, 205, 0.9),
      rgba(180, 190, 205, 0)
    );
    transform: translateX(-50%);
  }

  .hero-text {
    max-width: 32rem;
  }
}
