:root {
  --color-primary: #0b6e4f;
  --color-primary-dark: #084d38;
  --color-primary-light: #e8f6f0;
  --color-accent: #f2b705;
  --color-text: #1f2a24;
  --color-text-muted: #4c5a53;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f9f6;
  --max-width: 1120px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 110, 79, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Compensate for the sticky header so anchor targets aren't hidden/cut off underneath it */
section[id],
#vision {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Merriweather', Georgia, serif;
  line-height: 1.3;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
  text-align: justify;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid rgba(11, 110, 79, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand:hover .brand-title {
  color: var(--color-primary);
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.brand-location {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.primary-nav {
  display: flex;
  gap: 28px;
}

.primary-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  position: relative;
  padding: 4px 0;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}

.primary-nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-primary-dark);
  border-radius: 2px;
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(11, 110, 79, 0.94), rgba(8, 77, 56, 0.94)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0 100c40-40 60 40 100 0s60-40 100 0v100H0z'/%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
  padding: 96px 0 88px;
  text-align: left;
}

.hero-inner {
  max-width: 960px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-content {
  flex: 1;
}

.hero-logo {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 14px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: #e8f6f0;
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Secondary page hero (e.g. Documentos) */
.page-hero {
  background: linear-gradient(180deg, rgba(11, 110, 79, 0.94), rgba(8, 77, 56, 0.94));
  color: #fff;
  padding: 64px 0 56px;
  text-align: left;
}

.page-hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.page-hero .hero-tagline {
  color: #e8f6f0;
}

/* .hero-logo shares the same size across the main hero and secondary page hero */

/* Sections */
.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--color-bg-alt);
}

.section-title {
  color: var(--color-primary-dark);
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  text-align: center;
  margin-bottom: 32px;
}

.section-title.small {
  font-size: 1.3rem;
  text-align: left;
  margin-bottom: 16px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.about-card {
  max-width: 860px;
  margin: 0 auto;
}

.info-list {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid #e5efe9;
}

.info-list dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.info-list dd {
  margin: 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.two-col .card p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.contact-card {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  text-align: left;
}

.contact-table th,
.contact-table td {
  border: 1px solid #e6e6e6;
  padding: 10px 14px;
}

.contact-table th {
  background-color: #f5f5f5;
  color: var(--color-primary-dark);
  font-weight: 600;
  white-space: nowrap;
}

.contact-table a {
  text-decoration: none;
  color: #464feb;
}

.contact-table a:hover {
  text-decoration: underline;
}

.contact-note {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.map-wrapper {
  max-width: 700px;
  margin: 24px auto 0;
}

.map-frame {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

/* Documents */
.section-intro {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: -16px auto 32px;
}

.documents-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.documents-teaser .section-title {
  text-align: left;
  margin-bottom: 8px;
}

.documents-teaser p {
  margin: 0;
  color: var(--color-text-muted);
}

.document-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

.filter-chip {
  border: 1px solid rgba(11, 110, 79, 0.3);
  background: #fff;
  color: var(--color-primary-dark);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover {
  background: var(--color-primary-light);
}

.filter-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.document-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.document-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.document-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.document-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 4px 10px;
  border-radius: 999px;
}

.document-title {
  font-weight: 600;
  color: var(--color-primary-dark);
  margin: 0;
}

.document-description {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0;
  flex-grow: 1;
}

.document-link {
  align-self: flex-start;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  background: var(--color-primary);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.document-link:hover {
  background: var(--color-primary-dark);
}

.documents-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Galería */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-item {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  background: var(--color-bg-alt);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.06);
}

.gallery-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  grid-column: 1 / -1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(8, 20, 15, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: min(90vw, 900px);
  max-height: 75vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  max-width: 700px;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

@media (max-width: 600px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

/* 404 error page */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.error-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.error-logo {
  margin-bottom: 8px;
  box-shadow: 0 0 0 4px rgba(11, 110, 79, 0.12);
}

.error-code {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  line-height: 1;
}

.error-message {
  color: var(--color-text-muted);
  max-width: 420px;
}

.error-home-link {
  margin-top: 8px;
}

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer p {
  text-align: center;
}

/* Responsive */
@media (max-width: 820px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .contact-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid rgba(11, 110, 79, 0.1);
  }

  .primary-nav.open {
    max-height: calc(100vh - 72px);
  }

  .primary-nav a {
    padding: 14px 0;
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 72px 0 56px;
  }

  .hero-inner,
  .page-hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-meta {
    justify-content: center;
  }
}
