:root {
  --bg: #F8FAFC;
  --text: #0F172A;
  --muted: #334155;
  --accent: #3A5BA0;
  --natural: #5F7A61;
  --card: #ffffff;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, Segoe UI, Roboto, Inter;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

/*.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; flex-wrap: wrap; }*/
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  font-size: 1.25rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 12px;
  font-weight: 500;
}

nav a:hover {
  color: var(--accent);
}

/* Sections */
.section {
  margin: 48px 0;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 12px;
  color: var(--accent);
}

/* Cards & lists */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .05);
  transition: transform .2s;
}

.card:hover {
  transform: translateY(-3px);
}

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

.card .p {
  padding: 16px;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chip {
  font-size: .85rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--natural);
  text-decoration: none;
  border: 1px solid var(--border);
}

/* Single post */
.post .cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.content {
  max-width: 800px;
  margin: 0 auto;
}

.content img,
.content video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 12px auto;
}

.content p {
  margin: 12px 0;
}

.site-footer {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Landing (React) */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: center;
  margin: 32px 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
  color: var(--text);
}

.hero p {
  color: var(--muted);
}

.hero .cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.button {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: all .2s;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button:hover {
  opacity: .9;
}

.kgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.kcard {
  padding: 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  transition: box-shadow .2s;
}

.kcard:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.kcard h3 {
  margin: 0 0 8px;
  color: var(--accent);
}

/* Full-bleed banner styles for Hero */
.hero.hero-banner {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .35)), var(--hero);
  background-size: cover;
  background-position: var(--hero-x, 50%) var(--hero-y, 50%);
  padding: clamp(24px, 5vw, 48px);
  min-height: 420px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  margin-top: 0;
}

/* Full-bleed utility to escape container width */
.full-bleed {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
  border-radius: 0;
}

/* Prevent accidental horizontal scrollbars when using vw */
@supports (overflow: clip) {

  html,
  body {
    overflow-x: clip;
  }
}

@supports not (overflow: clip) {

  html,
  body {
    overflow-x: hidden;
  }
}

.hero.hero-banner p {
  color: rgba(255, 255, 255, .92);
}

.hero.hero-banner .button {
  border-color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.hero.hero-banner .button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 640px) {
  .hero.hero-banner {
    min-height: 320px;
  }
}

/* About section */
.about {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: center;
}

.about img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Objectives (cards) */
.objectives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.obj {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
  backdrop-filter: saturate(140%) blur(2px);
}

.obj h3 {
  margin: 0 0 6px;
  color: var(--accent);
}

/* Objectives section with video background */
.section-video {
  position: relative;
  margin: 48px 0;
  padding: 0;
  overflow: hidden;
}

/* ✅ full-bleed fix: center, not right-shifted */
.section-video.full-bleed {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
}

.section-video .bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.section-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .35));
  z-index: 1;
}

/* Inner content: nicely padded & centered, with vertical breathing room */
.section-video .container {
  position: relative;
  z-index: 2;
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: max(16px, 6vw);
  padding-right: max(16px, 6vw);
  padding-top: clamp(36px, 7vw, 96px);
  padding-bottom: clamp(36px, 7vw, 96px);
  text-align: center;
}

.section-video .section-title {
  color: #fff;
}

/* Roomier desktop height for objectives section */
@media (min-width: 960px) {
  .section-video {
    margin: 72px 0;
    min-height: 520px;
  }

  .section-video .section-title {
    margin-bottom: clamp(16px, 2vw, 28px);
  }

  .section-video .obj {
    padding: clamp(18px, 2.4vw, 28px);
  }
}

/* Vertical spacing between rows if wrapping */
.section-video .objectives {
  row-gap: clamp(12px, 2.2vw, 28px);
}

/* Gallery */
.gallery {
  display: grid;
  gap: 12px;
}

.gallery.grid-3x2 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .gallery.grid-3x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .gallery.grid-3x2 {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.lightbox-content {
  position: relative;
  max-width: min(1100px, 90vw);
  max-height: 85vh;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 24px;
  line-height: 32px;
  cursor: pointer;
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
  }
}

/*@media (max-width: 640px)  { .nav { flex-direction: column; align-items: flex-start; } nav a { margin: 8px 0; } .hero h1 { font-size: 1.8rem; } }*/
@media (max-width: 480px) {
  .hero .cta {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
    text-align: center;
  }
}

/* Pagination */
ul.pagination {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 24px 0;
  flex-wrap: wrap;
}

ul.pagination li {
  list-style: none;
}

ul.pagination a,
ul.pagination span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  text-decoration: none;
  color: var(--text);
}

ul.pagination .active a,
ul.pagination .active span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

ul.pagination .disabled span,
ul.pagination .disabled a {
  opacity: .5;
  pointer-events: none;
}

/* ===== Header Styling ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.container.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
}

/*.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
*/
.main-nav a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}

/* Language switch */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.lang-switch a {
  color: #666;
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--accent);
}

.active-lang {
  font-weight: 700;
  color: var(--accent);
}

/* ------------------------- */
/* Desktop header defaults   */
/* ------------------------- */
.lang-switch {
  white-space: nowrap;
}

.header-flex {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  /* brand | nav | lang */
  align-items: center;
  gap: 1rem;
}

.site-header .brand {
  justify-self: start;
}

.site-header .main-nav {
  justify-self: center;
}

.site-header .lang-switch {
  justify-self: end;
  display: flex;
  gap: .75rem;
  align-items: center;
}

.menu-toggle {
  display: none !important;
}

/* hide burger on desktop */
.main-nav {
  display: block !important;
}

/* show full nav on desktop */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.main-nav a {
  text-decoration: none;
  font-weight: 600;
}

/* ========================= */
/* Mobile navbar (ONLY CHANGES) */
/* ========================= */
@media (max-width:768px) {

  /* layout: brand | burger | lang */
  .header-flex {
    grid-template-columns: 1fr auto auto;
    position: relative;
    /* anchor dropdown */
  }

  /* show burger; hide nav until opened */
  .menu-toggle {
    display: grid !important;
    place-items: center;
    height: 36px;
    width: 36px;
    font-size: 1rem;
    line-height: 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
  }

  .main-nav {
    display: none !important;
    /* hidden by default */
    position: absolute;
    /* right-aligned dropdown */
    right: 1rem;
    top: calc(100% + .6rem);
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
    min-width: 210px;
    padding: .35rem 0;
    z-index: 1001;
  }

  .main-nav.open {
    display: block !important;
  }

  .main-nav::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 18px;
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
    filter: drop-shadow(0 -1px 0 #e6e6e6);
  }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: .35rem 0;
  }

  .main-nav li {
    list-style: none;
  }

  .main-nav a {
    display: block;
    padding: .65rem 1rem;
    color: #222;
    text-decoration: none;
  }

  .main-nav a:hover {
    background: #f6f8f7;
  }
}