/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #faf9f6;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-accent: #3d6b5e;
  --color-accent-light: #e8f0ed;
  --color-border: #e2e0dc;
  --color-card-bg: #ffffff;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 900px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* === Header === */
header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--color-accent);
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--color-text-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

/* === Language switcher === */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--color-border);
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 3px;
  overflow: hidden;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.2s;
  line-height: 0;
  border: 1px solid var(--color-border);
}

.lang-switch a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.lang-switch a.active {
  opacity: 1;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.lang-switch img {
  display: block;
  width: 26px;
  height: auto;
}

/* === Main === */
main {
  flex: 1;
  padding: 3rem 0;
}

/* === Hero (home page) === */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* === Section cards (home page) === */
.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.section-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.section-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(61, 107, 94, 0.1);
}

.section-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.section-card h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.section-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* === Page titles === */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--color-text-light);
}

/* === Stories === */
.story-list {
  list-style: none;
}

.story-list li {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.story-list li:last-child {
  border-bottom: none;
}

.story-list a {
  text-decoration: none;
  color: var(--color-text);
}

.story-list a:hover h3 {
  color: var(--color-accent);
}

.story-list h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
  transition: color 0.2s;
}

.story-list .date {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.story-list .excerpt {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* === Story page === */
.story-content {
  max-width: 700px;
}

.story-hero {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
  .story-hero { height: 220px; }
}

.ai-note {
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  margin: 1.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-family: var(--font-heading);
  line-height: 1.55;
}

.ai-note strong {
  color: var(--color-accent);
}

.story-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.story-content .date {
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  display: block;
}

.story-content p {
  margin-bottom: 1.2rem;
}

.story-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* === Story CTA (inline call-to-action box) === */
.story-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-accent-light);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0 2rem;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.story-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(61, 107, 94, 0.15);
  border-color: var(--color-accent);
}

.story-cta-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

.story-cta-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
}

.story-cta-text strong {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.story-cta-text span {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.4;
}

.story-cta-arrow {
  font-size: 1.4rem;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.story-cta:hover .story-cta-arrow {
  transform: translateX(3px);
}

/* === Photo gallery === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-card-bg);
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.story-content img {
  cursor: zoom-in;
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.94);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
  flex-direction: column;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
}

.lightbox-caption {
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-align: center;
  max-width: 90%;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

.gallery-item .caption {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-family: var(--font-heading);
}

/* === Documents === */
.doc-list {
  list-style: none;
}

.doc-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.doc-list li:last-child {
  border-bottom: none;
}

.doc-list .doc-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.doc-list .doc-info {
  flex: 1;
}

.doc-list .doc-info a {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
}

.doc-list .doc-info a:hover {
  color: var(--color-accent);
}

.doc-list .doc-meta {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.15rem;
}

/* === Empty state === */
.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--color-text-light);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* === Footer === */
footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-family: var(--font-heading);
}

/* === Responsive === */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 2rem 0; }
  .sections { grid-template-columns: 1fr; }
  header .container { flex-direction: column; align-items: flex-start; }
}
