:root {
  --ink: #17202a;
  --muted: #5e6a70;
  --paper: #fffdf8;
  --sand: #f4ead8;
  --reef: #047c89;
  --reef-dark: #07505b;
  --sun: #f3b64b;
  --shadow: 0 18px 48px rgba(14, 36, 42, 0.16);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

.site-header {
  background: #0f2d35;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  min-height: 82px;
  padding: 12px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(23, 32, 42, 0.1);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--reef-dark);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  line-height: 1;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a,
.dropbtn {
  min-height: 40px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.nav-links a:hover,
.dropbtn:hover,
.nav-links a.active,
.dropbtn.active-parent {
  color: #fff;
  background: var(--reef);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.language-switch a {
  min-height: 34px;
  padding: 7px 10px;
}

.language-switch a.is-current {
  color: var(--reef-dark);
  background: var(--sand);
  pointer-events: none;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  padding: 8px;
  display: none;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  display: grid;
  gap: 4px;
}

.dropdown-content a {
  justify-content: flex-start;
  width: 100%;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-compact {
  min-height: 58vh;
}

.hero-compact::after {
  background:
    linear-gradient(90deg, rgba(8, 31, 37, 0.6), rgba(8, 31, 37, 0.24) 54%, rgba(8, 31, 37, 0.08)),
    linear-gradient(0deg, rgba(8, 31, 37, 0.48), rgba(8, 31, 37, 0) 44%);
}

.hero-compact .hero-copy {
  padding-bottom: 64px;
}

.hero-document {
  background: #17130f;
}

.hero-document img {
  object-fit: contain;
  padding: 92px 24px 36px;
  background: #e9e1d2;
  filter: sepia(0.15) contrast(1.05);
}

.hero-document::after {
  background:
    linear-gradient(90deg, rgba(8, 31, 37, 0.82), rgba(8, 31, 37, 0.36) 58%, rgba(8, 31, 37, 0.08)),
    linear-gradient(0deg, rgba(8, 31, 37, 0.5), rgba(8, 31, 37, 0.04) 48%);
}

.hero-poster {
  background: #17130f;
}

.hero-poster img {
  object-fit: contain;
  background: #17130f;
}

.hero-poster::after {
  background:
    linear-gradient(90deg, rgba(8, 31, 37, 0.55), rgba(8, 31, 37, 0.08) 42%, rgba(8, 31, 37, 0)),
    linear-gradient(0deg, rgba(8, 31, 37, 0.54), rgba(8, 31, 37, 0) 38%);
}

.hero-poster .hero-copy {
  width: min(580px, calc(100% - 32px));
  margin-left: clamp(16px, 5vw, 80px);
  margin-right: auto;
  padding-bottom: 32px;
}

.hero-poster h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
}

.hero-poster .hero-copy p:not(.eyebrow) {
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-compact h1 {
  max-width: 980px;
  font-size: clamp(2.8rem, 6.6vw, 5.6rem);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 31, 37, 0.74), rgba(8, 31, 37, 0.28) 54%, rgba(8, 31, 37, 0.12)),
    linear-gradient(0deg, rgba(8, 31, 37, 0.58), rgba(8, 31, 37, 0) 42%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 140px 0 76px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sun);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 650px;
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

main {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.intro-grid {
  margin: -42px auto 64px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.intro-card {
  min-height: 132px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-card span {
  display: block;
  color: var(--reef-dark);
  font-size: 1.35rem;
  font-weight: 850;
}

.intro-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.intro-link {
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.intro-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(14, 36, 42, 0.2);
}

.explore-section {
  margin: 0 0 72px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.explore-card {
  min-height: 168px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7, 80, 91, 0.94), rgba(4, 124, 137, 0.82)),
    url("../imagenes/sisal/muelle.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(14, 36, 42, 0.14);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.explore-card:nth-child(2) {
  background-image:
    linear-gradient(145deg, rgba(7, 80, 91, 0.94), rgba(4, 124, 137, 0.82)),
    url("../imagenes/sisal/mapa1.jpg");
}

.explore-card:nth-child(3) {
  background-image:
    linear-gradient(145deg, rgba(7, 80, 91, 0.94), rgba(4, 124, 137, 0.82)),
    url("../imagenes/sisal/IMG_4904.jpg");
}

.explore-card:nth-child(4) {
  background-image:
    linear-gradient(145deg, rgba(7, 80, 91, 0.94), rgba(4, 124, 137, 0.82)),
    url("../imagenes/sisal/playa.jpg");
}

.explore-card:nth-child(5) {
  background-image:
    linear-gradient(145deg, rgba(7, 80, 91, 0.94), rgba(4, 124, 137, 0.82)),
    url("../imagenes/sisal/IMG-6726.jpg");
}

.explore-card:nth-child(6) {
  background-image:
    linear-gradient(145deg, rgba(7, 80, 91, 0.94), rgba(4, 124, 137, 0.82)),
    url("../imagenes/social/restaurantes-sisal.jpg");
}

.explore-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(14, 36, 42, 0.22);
}

.explore-card span {
  font-size: 1.35rem;
  font-weight: 850;
}

.explore-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.content-section {
  display: grid;
  gap: 32px;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  margin: 0;
  color: var(--reef-dark);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.video {
  width: min(860px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #0f2d35;
}

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

.article-body {
  max-width: 830px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.article-body p {
  margin: 0 0 1.35rem;
  color: #243036;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  text-align: justify;
}

.article-body h3 {
  margin: 2.2rem 0 0.75rem;
  color: var(--reef-dark);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
}

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

.history-points article {
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(14, 36, 42, 0.1);
}

.history-points span {
  display: block;
  margin-bottom: 8px;
  color: var(--reef-dark);
  font-size: 1.05rem;
  font-weight: 850;
}

.history-points p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  text-align: left;
}

.feature-figure,
.float-figure {
  margin: 28px 0;
}

.feature-figure img,
.float-figure img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature-figure figcaption,
.float-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.float-figure {
  width: min(360px, 46%);
  float: right;
  margin: 4px 0 20px 28px;
}

.source-note {
  clear: both;
  margin: 42px 0 0;
  padding: 24px;
  background: var(--sand);
  border-left: 5px solid var(--sun);
  border-radius: 8px;
}

.source-note h3 {
  margin-top: 0;
}

.source-note p {
  margin-bottom: 0;
}

.source-list {
  margin: 16px 0 0;
  padding-left: 20px;
  color: #243036;
}

.source-list li {
  margin-bottom: 10px;
}

.source-list a {
  color: var(--reef-dark);
  font-weight: 800;
}

.source-links {
  margin-top: 20px;
  background: #fff;
  border-left-color: var(--reef);
}

.map-panel {
  margin: 30px 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-copy {
  padding: 24px 24px 6px;
}

.map-copy h3 {
  margin-top: 0;
}

.map-copy p:last-child {
  margin-bottom: 12px;
  text-align: left;
}

.leaflet-map {
  width: 100%;
  height: min(430px, 62vh);
  min-height: 320px;
  background: #dbe6e4;
  z-index: 1;
}

.map-note {
  margin: 0;
  padding: 14px 20px 18px;
  color: var(--muted);
  background: rgba(244, 234, 216, 0.52);
  font-size: 0.95rem !important;
  text-align: left !important;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.route-grid .feature-figure {
  margin: 0;
}

.route-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(14, 36, 42, 0.12);
}

.route-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.route-card div {
  padding: 20px;
}

.route-card h3 {
  margin-top: 0;
}

.check-list {
  margin: 18px 0 34px;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.check-list li {
  padding: 12px 14px 12px 42px;
  position: relative;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 15px;
  color: var(--reef);
  font-weight: 900;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
}

.related-links a {
  padding: 12px 16px;
  color: #fff;
  background: var(--reef);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.related-links a:hover {
  background: var(--reef-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 72px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(14, 36, 42, 0.12);
  cursor: zoom-in;
}

.gallery-grid img {
  width: 100%;
  height: 235px;
  object-fit: cover;
  transition: transform 180ms ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.035);
}

.gallery-grid figcaption {
  padding: 10px 12px 12px;
  color: var(--reef-dark);
  font-size: 0.95rem;
  font-weight: 750;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 25, 30, 0.9);
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-frame {
  width: min(1100px, 100%);
  max-height: 90vh;
  margin: 0;
  display: grid;
  gap: 12px;
  color: #fff;
}

.lightbox-frame img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.45);
}

.lightbox-frame figcaption {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 3rem;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.moment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 36px;
}

.moment-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(14, 36, 42, 0.12);
}

.moment-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.moment-card div {
  padding: 18px;
}

.moment-card h4 {
  margin: 0 0 8px;
  color: var(--reef-dark);
  font-size: 1.2rem;
}

.moment-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  text-align: left;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 72px;
}

.note-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(14, 36, 42, 0.12);
}

.note-card a {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.note-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.note-card div {
  padding: 20px;
}

.note-card h3 {
  margin: 4px 0 10px;
  color: var(--reef-dark);
  font-size: 1.35rem;
  line-height: 1.18;
}

.note-card p {
  margin: 0;
  color: var(--muted);
}

.note-date {
  color: var(--sun) !important;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-article {
  padding-top: 64px;
}

.text-link {
  color: var(--reef-dark);
  font-weight: 800;
}

.photo-strip {
  margin: 24px 0 72px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 14px;
}

.photo-strip img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.site-footer {
  padding: 30px 16px;
  color: #fff;
  background: var(--reef-dark);
  text-align: center;
}

.site-footer h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.2;
}

.site-footer p {
  margin: 4px 0;
}

@media (max-width: 820px) {
  .navbar {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-copy {
    padding-top: 72px;
  }

  .intro-grid,
  .photo-strip,
  .route-grid,
  .history-points,
  .moment-grid,
  .notes-grid,
  .explore-grid {
    grid-template-columns: 1fr;
  }

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

  .photo-strip img {
    height: 230px;
  }
}

@media (max-width: 560px) {
  .navbar {
    padding: 10px 12px;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links li,
  .nav-links a,
  .dropbtn {
    width: 100%;
  }

  .dropdown-content {
    left: 0;
    right: auto;
  }

  .hero {
    min-height: 68vh;
  }

  .hero-copy {
    width: min(100% - 24px, 760px);
    padding-bottom: 54px;
  }

  .intro-grid {
    margin-top: 18px;
  }

  .article-body p {
    text-align: left;
  }

  .float-figure {
    width: 100%;
    float: none;
    margin: 24px 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 54px 12px 24px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 16px;
    width: 46px;
    height: 46px;
    font-size: 2.4rem;
    transform: none;
  }
}
