/* ==========================================================================
   AGP — Asociación de Geólogos del Paraguay
   Hoja de estilos principal
   ========================================================================== */

:root {
  --ink: #1c1b18;
  --ink-soft: #4a473f;
  --paper: #faf7f0;
  --paper-raised: #ffffff;
  --line: #e4ddcd;

  --ochre: #b6821f;
  --ochre-dark: #8f6417;
  --blue: #1e3a70;
  --red: #a3182b;

  --surface-inverse: #1c1b18;
  --text-inverse: #faf7f0;
  --text-inverse-soft: #c8c2b2;

  --font-display: "Fraunces", "Georgia", "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 10px;
  --shadow: 0 4px 18px rgba(28, 27, 24, 0.08);
  --shadow-lg: 0 12px 40px rgba(28, 27, 24, 0.16);
  --glow-ochre: 0 8px 28px rgba(182, 130, 31, 0.35);

  --container: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1ede2;
    --ink-soft: #c8c2b2;
    --paper: #17160f;
    --paper-raised: #201f17;
    --line: #33301f;
    --ochre: #e0ab4a;
    --blue: #6f92d6;
    --red: #e2697a;
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper-raised);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.brand img {
  height: 52px;
  width: 52px;
  object-fit: contain;
}

.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--ochre-dark);
  border-bottom-color: var(--ochre);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 860px) {
  nav.main-nav {
    position: fixed;
    inset: 84px 0 0 0;
    background: var(--paper-raised);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    border-top: 1px solid var(--line);
    overflow-y: auto;
  }
  nav.main-nav.open { transform: translateY(0); }
  nav.main-nav ul {
    flex-direction: column;
    padding: 24px;
    gap: 4px;
  }
  nav.main-nav a {
    display: block;
    padding: 14px 8px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background-color: var(--surface-inverse);
  background-size: cover;
  background-position: center;
  color: var(--text-inverse);
  padding: 96px 0 84px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: #e6c98a;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero .eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, #e0ab4a, transparent);
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: #e6c98a;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  margin: 14px 0 18px;
  max-width: 20ch;
}

.hero p.lede {
  max-width: 56ch;
  font-size: 1.1rem;
  color: #ece6d6;
  margin: 0 0 30px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, #e0ab4a, var(--ochre) 65%);
  color: #1c1b18;
  box-shadow: 0 4px 14px rgba(182, 130, 31, 0.25);
}
.btn-primary:hover { box-shadow: var(--glow-ochre); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border-color: rgba(250, 247, 240, 0.55);
  color: #faf7f0;
}
.btn-ghost:hover { background: rgba(250, 247, 240, 0.12); }

.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ---------- Stats strip ---------- */

.stats-strip {
  background: var(--surface-inverse);
  padding: 44px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--ochre);
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-inverse-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 62ch; margin: 0 0 40px; }

.section-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ochre-dark);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 8px 0 10px;
}

.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- Page header (inner pages) ---------- */

.page-header {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  padding: 56px 0;
}
.page-header .kicker { color: #e6c98a; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 700; }
.page-header h1 { font-family: var(--font-display); margin: 10px 0 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.breadcrumb { color: var(--text-inverse-soft); font-size: 0.9rem; margin-top: 10px; }
.breadcrumb a { color: #e6c98a; }

/* ---------- Cards / grids ---------- */

.grid {
  display: grid;
  gap: 26px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(182, 130, 31, 0.35);
}

.card h3 {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.card p { color: var(--ink-soft); margin: 0; }

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 4px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(224, 171, 74, 0.28), rgba(182, 130, 31, 0.12));
  color: var(--ochre-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
  flex: none;
}
.icon-badge svg {
  width: 22px;
  height: 22px;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
  background: var(--ink);
  cursor: pointer;
}
.gallery-item:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

.gallery-item .zoom-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: rgba(15, 14, 10, 0);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}
.gallery-item:hover .zoom-hint,
.gallery-item:focus-visible .zoom-hint {
  opacity: 1;
  background: rgba(15, 14, 10, 0.32);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 14px 12px;
  font-size: 0.82rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), rgba(0,0,0,0));
}

/* ---------- Team / directiva ---------- */

.group-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 20px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.group-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }


.person-card { text-align: center; }
.person-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--line);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.person-role {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ochre-dark);
  margin: 2px 0 8px;
}

/* ---------- Lists ---------- */

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--ochre);
}

.objectives-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 48px;
}
.objectives-list li {
  break-inside: avoid;
  margin-bottom: 24px;
  padding-left: 22px;
  position: relative;
  color: var(--ink-soft);
}
.objectives-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ochre);
}
@media (max-width: 720px) {
  .objectives-list { columns: 1; }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-detail {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.contact-detail:last-child { border-bottom: none; }
.contact-detail .icon-badge { margin-bottom: 0; flex: none; }
.contact-detail h4 { margin: 6px 0 4px; font-size: 0.95rem; }
.contact-detail p { margin: 0; color: var(--ink-soft); }

.form-status { min-height: 1.2em; margin: 14px 0 0; font-size: 0.92rem; font-weight: 600; }
.form-status.success { color: #3a8f52; }
.form-status.error { color: var(--red); }

/* ---------- Notice banner (placeholder content) ---------- */

.notice {
  background: rgba(30, 58, 112, 0.08);
  border: 1px dashed var(--blue);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.92rem;
  margin-bottom: 36px;
}

.empty-state {
  text-align: center;
  padding: 72px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
}
.empty-state .icon-badge {
  width: 56px;
  height: 56px;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}
.empty-state h3 {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: 1.3rem;
}
.empty-state p {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto;
}
.notice strong { color: var(--blue); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface-inverse);
  color: var(--text-inverse-soft);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.footer-grid h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: #d8d3c3; }
.footer-grid a:hover { color: #e6c98a; }

.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer-brand img { height: 40px; width: 40px; }
.footer-brand span { font-family: var(--font-display); color: #fff; font-size: 1.05rem; }

.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.social-row a:hover { background: var(--ochre); border-color: var(--ochre); color: #1c1b18; text-decoration: none; }
.social-row a svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  font-size: 0.82rem;
  color: #a49d87;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Utilities ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Timeline (Galería / actividades) ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.timeline-item:hover { box-shadow: var(--shadow-lg); border-color: rgba(182, 130, 31, 0.3); }

@media (max-width: 780px) {
  .timeline-item { grid-template-columns: 1fr; }
}

.timeline-media {
  display: grid;
  gap: 8px;
}
.timeline-media.two-up { grid-template-columns: 1fr 1fr; }
.timeline-media.three-up { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 480px) {
  .timeline-media.two-up, .timeline-media.three-up { grid-template-columns: 1fr 1fr; }
}

.timeline-media .gallery-item {
  aspect-ratio: 4 / 3;
  margin: 0;
}

.timeline-video {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow);
}
.timeline-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-content h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.timeline-date {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ochre-dark);
  margin: 0 0 12px;
}

.timeline-content p.timeline-body {
  color: var(--ink-soft);
  white-space: pre-line;
  margin: 0;
}

.timeline-content .btn-outline {
  margin-top: 14px;
  padding: 9px 20px;
  font-size: 0.85rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 80px;
  background: rgba(15, 14, 10, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox figure {
  margin: 0;
  max-width: 96vw;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  margin-top: 16px;
  max-width: 60ch;
  text-align: center;
  color: var(--text-inverse);
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--ochre);
  border-color: var(--ochre);
  color: #1c1b18;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox { padding: 20px; }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; font-size: 1.15rem; }
  .lightbox-close { top: 12px; right: 12px; }
}
