:root {
  --leaf: #344823;
  --leaf-dark: #213016;
  --gold: #c7831d;
  --paper: #fbfaf6;
  --mist: #eff1ea;
  --ink: #1e2419;
  --muted: #69705f;
  --line: rgba(52, 72, 35, 0.16);
  --shadow: 0 18px 45px rgba(33, 48, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 246, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand img {
  width: 160px;
  border-radius: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
}

nav {
  display: flex;
  gap: clamp(12px, 3vw, 32px);
  color: var(--leaf-dark);
  font-size: 0.92rem;
  font-weight: 650;
}

nav a {
  text-decoration: none;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 22px;
  color: var(--leaf-dark);
  background: white;
  border: 1px solid transparent;
  border-radius: 3px;
  box-shadow: 0 5px 14px rgba(33, 48, 22, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.flag {
  display: block;
  width: 22px;
  height: 14px;
  overflow: hidden;
  border-radius: 1px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.flag-pt {
  background:
    radial-gradient(circle at 44% 50%, #f7d24c 0 2px, transparent 2.4px),
    linear-gradient(90deg, #046a38 0 40%, #da291c 40% 100%);
}

.flag-gb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Crect width='60' height='36' fill='%23012169'/%3E%3Cpath d='M0 0 60 36M60 0 0 36' stroke='%23fff' stroke-width='8'/%3E%3Cpath d='M0 0 60 36M60 0 0 36' stroke='%23c8102e' stroke-width='4'/%3E%3Cpath d='M30 0v36M0 18h60' stroke='%23fff' stroke-width='12'/%3E%3Cpath d='M30 0v36M0 18h60' stroke='%23c8102e' stroke-width='7'/%3E%3C/svg%3E");
  background-size: cover;
}

.lang-option.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(199, 131, 29, 0.16);
}

.lang-option:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--leaf-dark);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.72);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 13, 0.78), rgba(17, 24, 13, 0.3) 50%, rgba(17, 24, 13, 0.08)),
    linear-gradient(0deg, rgba(17, 24, 13, 0.55), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 74px 0 180px;
  color: white;
}

.hero-content p,
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 980px;
  min-height: 0;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 7.4vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

html[lang="en"] .hero-content h1 {
  font-size: clamp(2.1rem, 5.7vw, 4.65rem);
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 4px;
  text-decoration: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: white;
  background: var(--leaf);
  border-color: var(--leaf);
}

.button.ghost {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.button.secondary {
  color: var(--leaf-dark);
  background: var(--mist);
  border-color: var(--line);
}

section {
  padding: clamp(54px, 8vw, 92px) clamp(18px, 4vw, 56px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: clamp(28px, 7vw, 96px);
  max-width: 1180px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0;
  color: var(--leaf-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 16px 0 8px;
  color: var(--leaf-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  line-height: 1.15;
}

.intro > p,
.section-heading p,
.contact-panel p,
article p {
  color: var(--muted);
  font-size: 1.02rem;
}

.gallery {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
  max-width: 1220px;
  margin: 0 auto;
}

figure {
  position: relative;
  min-height: 300px;
  margin: 0;
  overflow: hidden;
  background: var(--mist);
}

.feature-card {
  grid-row: span 2;
  min-height: 616px;
}

.nature-card {
  min-height: 320px;
}

figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nature-card img {
  object-position: center 42%;
}

figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  color: white;
  background: rgba(27, 37, 18, 0.72);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
}

.activities {
  background: #eef0e7;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1220px;
  margin: 0 auto;
}

article {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(33, 48, 22, 0.08);
}

article img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--mist);
}

.activity-piscinas {
  object-position: center center;
}

.activity-lousa {
  object-position: center 42%;
}

.activity-parapente {
  object-position: center 38%;
}

.activity-caving {
  object-position: center 48%;
}

.activity-canoe {
  object-position: center center;
}

.activity-chanfana {
  object-position: center 52%;
}

article h3,
article p {
  padding: 0 18px;
}

article p {
  margin: 0 0 20px;
  min-height: 4.6em;
  font-size: 0.95rem;
}

.contact {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 18px;
  max-width: 1220px;
  margin: 0 auto;
}

.contact-panel {
  padding: clamp(28px, 4vw, 44px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.contact-links {
  margin: 24px 0;
}

.contact-links span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 13px;
  color: var(--leaf-dark);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 800;
}

.contact-panel > .button + .button {
  margin-left: 8px;
}

.contact-modal {
  width: min(720px, calc(100% - 28px));
  max-height: min(92vh, 840px);
  padding: 0;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(20, 28, 14, 0.34);
}

.contact-modal::backdrop {
  background: rgba(17, 24, 13, 0.58);
  backdrop-filter: blur(4px);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--leaf-dark);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--leaf-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-weight: 500;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(199, 131, 29, 0.36);
  border-color: var(--gold);
}

.spam-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.security-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.security-row p,
.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.form-status.is-error {
  color: #a13a2a;
  font-weight: 800;
}

.form-status.is-success {
  color: var(--leaf);
  font-weight: 800;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.map-wrap {
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
}

iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 18px 42px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

footer img {
  width: min(240px, 74vw);
  border-radius: 10px;
}

footer p {
  margin: 0;
}

.small {
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .site-header {
    position: absolute;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    row-gap: 6px;
    padding: 10px 16px 12px;
  }

  .brand img {
    width: clamp(142px, 42vw, 164px);
    max-height: 48px;
    object-fit: contain;
    object-position: left center;
  }

  .header-actions {
    display: contents;
  }

  .language-switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    padding-top: 2px;
  }

  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 0;
    line-height: 1.15;
  }

  nav {
    font-size: 0.82rem;
  }

  .hero {
    min-height: 86vh;
  }

  .hero-content {
    padding-bottom: 54px;
  }

  .hero-content h1 {
    min-height: 0;
    font-size: clamp(2.2rem, 8.5vw, 3.45rem);
  }

  html[lang="en"] .hero-content h1 {
    font-size: clamp(1.65rem, 5.9vw, 2.2rem);
  }

  .intro,
  .gallery,
  .activity-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .feature-card,
  figure {
    min-height: 320px;
  }

  .map-wrap {
    min-height: 330px;
  }
}

@media (max-width: 560px) {
  .site-header {
    display: grid;
    padding: 9px 14px 11px;
  }

  nav {
    margin-top: 0;
    justify-content: flex-start;
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .contact-links span {
    width: 100%;
  }

  .contact-panel > .button + .button {
    margin-top: 8px;
    margin-left: 0;
  }

  .form-grid,
  .security-row {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}

@media (max-width: 390px) {
  .brand img {
    width: 132px;
    max-height: 44px;
  }

  .site-header {
    row-gap: 5px;
    padding-inline: 12px;
  }

  nav {
    gap: 8px 12px;
    font-size: 0.8rem;
  }

  .hero-content h1 {
    font-size: clamp(2.05rem, 9.8vw, 2.5rem);
  }

  html[lang="en"] .hero-content h1 {
    font-size: clamp(1.35rem, 5.75vw, 1.55rem);
  }
}
