/* ============================================================
   EDUCAR Lighthouse — shared stylesheet
   Original brand: blues (#2859B6 / #4375D1 / #BCCBE6),
   Oswald headings + Questrial body, lighthouse logo.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600&family=Questrial&display=swap');

:root {
  --bg: #ffffff;          /* page background */
  --bg-soft: #eef3fc;     /* pale blue for alternating sections */
  --ink: #1f2a3d;         /* dark slate text */
  --muted: #5a6b85;       /* softer text */
  --blue: #2859b6;        /* primary brand blue */
  --blue-dark: #1e4489;   /* deep blue (hover / footer) */
  --blue-mid: #4375d1;    /* mid blue accents */
  --blue-soft: #bccbe6;   /* light blue accents */
  --line: #d9e2f2;        /* hairline borders */
  --radius: 10px;
  --maxw: 1080px;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Questrial', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--blue-dark);
  line-height: 1.25;
  margin-top: 0;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.6em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--blue-dark); }
a:hover { color: var(--blue); }

/* ---------- layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 3.5rem 0; }
.section.soft { background: var(--bg); }

.section-intro {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
}

/* two-column rows that stack on mobile */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.row.flip > :first-child { order: 2; }

.row img.rounded { border-radius: var(--radius); }

/* ---------- team (about page): photo above, text below ---------- */
.team-photo { text-align: center; margin-top: 2rem; }
.team-photo img { max-width: 560px; width: 100%; height: auto; border-radius: var(--radius); }
.team-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.5rem; }

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; gap: 1.5rem; }
  .row.flip > :first-child { order: 0; }
  .section { padding: 2.5rem 0; }
}

/* ---------- header / nav ---------- */

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

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--blue-dark);
  text-decoration: none;
}
.brand img { height: 52px; width: auto; }
.brand span { color: var(--blue); }

/* footer logo (stacked lockup) */
.footer-logo { max-width: 230px; width: 100%; height: auto; }

nav.main-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
nav.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover { color: var(--blue-dark); }
nav.main-nav a.active { color: var(--blue-dark); border-bottom-color: var(--blue); }
nav.main-nav a.donate-link {
  background: var(--blue);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
nav.main-nav a.donate-link:hover { background: var(--blue-dark); color: #fff; }

/* ---------- hero ---------- */

.hero { position: relative; color: #fff; text-align: center; }
.hero img.hero-img {
  width: 100%;
  height: clamp(320px, 55vw, 560px);
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 26, 38, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.hero-overlay h1 { color: #fff; letter-spacing: 0.06em; margin-bottom: 0.4em; }
.hero-overlay p { font-size: 1.25rem; margin: 0 0 1.4em; color: #f5efe2; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn.ghost {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.btn.ghost:hover { background: rgba(255,255,255,0.15); }

/* ---------- homepage: image on top, 2-column text ---------- */
.split-top { text-align: center; margin-bottom: 1.6rem; }
.split-top img { max-width: 480px; width: 100%; height: auto; border-radius: var(--radius); }
.two-col { column-count: 2; column-gap: 2.5rem; }
.two-col > :first-child { margin-top: 0; }
@media (max-width: 760px) { .two-col { column-count: 1; } }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  gap: 1.5rem;
  justify-content: center;
}
@media (max-width: 760px) { .cards { grid-template-columns: minmax(280px, 340px); } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.4rem; }
.card-body h3 { margin-bottom: 0.4em; }
.card-body p { color: var(--muted); margin: 0; }

/* ---------- partners ---------- */

.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}
.partners a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}
.partners span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}
.partners img {
  width: 165px;
  max-width: 100%;
  height: auto;
  max-height: 80px;
  object-fit: contain;
}
.partners .text-link {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--blue-dark);
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/* ---------- news list ---------- */

.news-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
  max-width: 760px;
}
.news-date {
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4em;
}
.news-item h3 { margin-bottom: 0.4em; }
.news-item p:last-child { margin-bottom: 0; }
/* news photos: half width on desktop, full width on phone */
.news-item img { display: block; max-width: 50%; height: auto; }
@media (max-width: 760px) { .news-item img { max-width: 100%; } }

/* ---------- donate widget ---------- */

.donate-box {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1rem 0 1.4rem;
}
@media (max-width: 480px) { .amounts { grid-template-columns: repeat(2, 1fr); } }
.amounts label {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  padding: 0.7rem 0.3rem;
  font-weight: 700;
  cursor: pointer;
}
.amounts input { display: none; }
.amounts input:checked + span { color: var(--blue-dark); }
.amounts label:has(input:checked) { border-color: var(--blue); background: #eef3fc; }
.freq { display: flex; gap: 1.4rem; margin-bottom: 1.4rem; font-weight: 600; }
.donate-note {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.donate-btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.9rem 2.6rem;
  border-radius: 999px;
  text-decoration: none;
}
.donate-btn:hover { background: var(--blue-dark); color: #fff; }

/* ---------- back-to-top floating button ---------- */
.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(30, 68, 137, 0.35);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--blue-dark); }

/* ---------- contact form ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form label { display: block; font-weight: 600; margin: 0.9rem 0 0.3rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .btn { margin-top: 1.1rem; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--blue-dark);
  color: #d8d2c4;
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}
.site-footer .wrap > div { width: 100%; text-align: center; }
.site-footer .footer-logo { margin-left: auto; margin-right: auto; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer strong { color: #fff; }
.site-footer a { color: #f0d9a8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-fine {
  width: 100%;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  color: #a9a294;
}

/* centered page titles */
.page-title { text-align: center; margin-bottom: 0.4em; }
.page-lead { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 2.5rem; }

/* Free Resources page: logo + text rows */
.res-row {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  margin: 1.6rem 0;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid #e3e9f5;
}
.res-row:last-child { border-bottom: none; }
.res-row img {
  flex: 0 0 150px;
  width: 150px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
}
.res-row p { margin: 0.2rem 0; }
@media (max-width: 600px) {
  .res-row { flex-direction: column; gap: 0.8rem; }
  .res-row img { flex: none; width: 130px; }
}
