/* ======== BASE ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}

main {
  background: #fff;
}

a {
  color: inherit;
}

.contact-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(34px, 7vw, 92px);
  align-items: center;
  min-height: 620px;
  padding: calc(var(--header-height) + 78px) 8% 86px;
  background:
    linear-gradient(115deg, rgba(21, 25, 29, 0.92), rgba(21, 25, 29, 0.55)),
    image-set(
      url("../img/optimized/panoramica/panoramicainicio-900.jpg") 1x,
      url("../img/optimized/panoramica/panoramicainicio-1600.jpg") 2x
    ) center/cover;
  color: #fff;
  overflow: hidden;
}

.contact-hero::after {
  content: "";
  position: absolute;
  left: 8%;
  bottom: 0;
  width: min(360px, 42vw);
  height: 5px;
  border-radius: 999px 999px 0 0;
  background: var(--brand);
}

.contact-hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.contact-hero-content span,
.map-copy span,
.contact-card-kicker,
.visit-label {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-hero h1 {
  max-width: 14ch;
  margin-bottom: 24px;
  color: #fff;
  font-size: clamp(2.45rem, 4.4vw, 4.95rem);
  font-weight: 800;
  line-height: 1.06;
}

.contact-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  line-height: 1.75;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.contact-action,
.contact-card-button,
.map-copy a,
.contact-visit-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease, color 0.24s ease;
}

.contact-action:hover,
.contact-card-button:hover,
.map-copy a:hover,
.contact-visit-card a:hover {
  transform: translateY(-2px);
}

.contact-action--primary,
.contact-card-button,
.map-copy a,
.contact-visit-card a {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.contact-action--primary:hover,
.contact-card-button:hover,
.map-copy a:hover,
.contact-visit-card a:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.contact-action:not(.contact-action--primary):hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

.contact-visit-card {
  position: relative;
  z-index: 1;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.contact-visit-card strong {
  display: block;
  max-width: 18ch;
  margin-bottom: 10px;
  color: #fff;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.18;
}

.contact-visit-card p {
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.84);
}

.contact-hours {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin: 26px 0 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.contact-hours span {
  color: #8ee09e;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-hours p {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.45;
}

.contact-visit-card .visit-note {
  margin-bottom: 24px;
  font-size: 0.96rem;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding: 88px 8% 96px;
  background: #f7f5f1;
}

.contact-card {
  position: relative;
  min-height: 330px;
  padding: 34px;
  border: 1px solid #e4ded4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(35, 28, 20, 0.07);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.contact-card::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 0;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--brand);
}

.contact-card:hover {
  transform: translateY(-7px);
  border-color: rgba(79, 176, 104, 0.28);
  box-shadow: 0 22px 46px rgba(35, 28, 20, 0.12);
}

.contact-card--featured {
  background: #253126;
  color: #fff;
}

.contact-card--featured .contact-card-kicker {
  color: #8ee09e;
}

.contact-card h2 {
  max-width: 14ch;
  margin-bottom: 18px;
  color: #15191d;
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
}

.contact-card--featured h2 {
  color: #fff;
}

.contact-card p {
  max-width: 33ch;
  color: #515860;
  font-size: 1rem;
  line-height: 1.7;
}

.contact-card--featured p {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.84);
}

.contact-card-button--dark {
  margin-top: 24px;
  background: #253126;
  border-color: #253126;
}

.contact-card-button--dark:hover {
  background: #15191d;
  border-color: #15191d;
}

.contact-link-group {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.contact-link-group a {
  width: fit-content;
  color: #2f6f3f;
  font-size: clamp(1.05rem, 1.25vw, 1.18rem);
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-link-group a:hover {
  color: var(--brand-dark);
}

.contact-map-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: 96px 8% 110px;
  background: #fff;
}

.map-copy {
  max-width: 520px;
}

.map-copy h2 {
  max-width: 12ch;
  margin-bottom: 22px;
  color: #15191d;
  font-size: clamp(2rem, 3.3vw, 3.65rem);
  font-weight: 800;
  line-height: 1.08;
}

.map-copy h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--brand);
}

.map-copy p {
  margin-bottom: 28px;
  color: #4f565d;
  font-size: 1.06rem;
  line-height: 1.75;
}

.map-container {
  min-height: 420px;
  border: 1px solid #e4ded4;
  border-radius: 8px;
  background: #f7f5f1;
  box-shadow: 0 16px 44px rgba(35, 28, 20, 0.12);
  overflow: hidden;
}

.map-container iframe {
  display: block;
  width: 100%;
  min-height: 420px;
}

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

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

.contact-hero.reveal {
  opacity: 1;
  transform: none;
}

section {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

@media (max-width: 1080px) {
  .contact-hero,
  .contact-map-section {
    grid-template-columns: 1fr;
  }

  .contact-hero {
    align-items: start;
    min-height: 0;
  }

  .contact-visit-card {
    max-width: 520px;
  }

  .contact-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .contact-hero {
    padding: calc(var(--header-height) + 58px) 6% 68px;
  }

  .contact-hero-content {
    width: 100%;
    min-width: 0;
  }

  .contact-hero h1 {
    max-width: min(11ch, calc(100vw - 12vw));
    font-size: clamp(2rem, 8.8vw, 2.75rem);
    overflow-wrap: break-word;
  }

  .contact-hero p {
    max-width: min(32ch, calc(100vw - 12vw));
    font-size: 1.02rem;
    overflow-wrap: break-word;
  }

  .contact-action,
  .contact-card-button,
  .map-copy a,
  .contact-visit-card a {
    width: 100%;
  }

  .contact-visit-card,
  .contact-card {
    padding: 28px 24px;
  }

  .contact-details,
  .contact-map-section {
    padding: 68px 6% 78px;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .map-container,
  .map-container iframe {
    min-height: 340px;
  }
}
