/* ============================================
   LearnWater — learnwater.cofwater.org
   Shared Stylesheet
   ============================================ */

:root {
  --primary:   #0077b6;
  --secondary: #00b4d8;
  --accent:    #90e0ef;
  --dark:      #03045e;
  --light:     #caf0f8;
  --white:     #ffffff;
  --gray:      #f0f4f8;
  --text:      #1a2433;
  --muted:     #5a6a7a;
  --radius:    12px;
  --shadow:    0 4px 20px rgba(0,119,182,0.12);
  --shadow-lg: 0 8px 40px rgba(0,119,182,0.18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--dark);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
p  { margin-bottom: 1rem; }

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

section {
  padding: 4rem 0;
}

/* ---- Navigation ---- */
.site-nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-brand .drop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--secondary);
  border-radius: 50%;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--accent);
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: 0.3s;
}

/* ---- Hero Banner ---- */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 60%, var(--secondary) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200'%3E%3Cpath fill='rgba(255,255,255,0.04)' d='M0,80 C360,160 1080,0 1440,80 L1440,200 L0,200Z'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

.hero-content { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero p   { font-size: 1.2rem; opacity: 0.9; max-width: 640px; margin: 0 auto 2rem; }

.hero-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }

.btn-primary  { background: var(--primary);   color: var(--white); }
.btn-white    { background: var(--white);      color: var(--dark);  }
.btn-outline  { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

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

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 1rem;
  font-size: 3rem;
}

.card-body {
  padding: 0 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-body h3 { margin-bottom: 0.5rem; }
.card-body p  { color: var(--muted); flex: 1; margin-bottom: 1rem; }

/* ---- Section Headers ---- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 { margin-bottom: 0.5rem; }
.section-header p  { color: var(--muted); font-size: 1.05rem; max-width: 580px; margin: 0 auto; }

.section-divider {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
  margin: 0.75rem auto;
}

/* ---- Tabs (Adult Learning) ---- */
.tabs {
  border-bottom: 2px solid var(--light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 6px 6px 0 0;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover  { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--light); }

.tab-panel { display: none; animation: fadeIn 0.25s ease; }
.tab-panel.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Info Boxes ---- */
.info-box {
  background: var(--light);
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.info-box h4 { color: var(--dark); margin-bottom: 0.4rem; }
.info-box p  { margin: 0; }

/* ---- Fact Grid ---- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.fact-card {
  background: var(--white);
  border: 2px solid var(--light);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.fact-card .fact-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin-bottom: 0.3rem;
}
.fact-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---- Update Posts ---- */
.update-post {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--secondary);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.post-tag {
  display: inline-block;
  background: var(--light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.post-date { color: var(--muted); font-size: 0.85rem; }
.update-post h3 { margin-bottom: 0.5rem; }
.update-post p  { color: var(--muted); margin: 0; }

/* ---- Contact / Footer ---- */
.contact-section {
  background: var(--gray);
  text-align: center;
  padding: 3rem 0;
}
.contact-section h2 { margin-bottom: 0.5rem; }
.contact-section p  { color: var(--muted); margin-bottom: 1.25rem; }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
}

.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 1.75rem 1rem;
  font-size: 0.9rem;
}
.site-footer a { color: var(--accent); }
.site-footer a:hover { color: var(--white); }

/* ---- Utility ---- */
.bg-light  { background: var(--gray); }
.bg-blue   { background: linear-gradient(135deg, var(--dark), var(--primary)); color: var(--white); }
.bg-blue h2, .bg-blue h3 { color: var(--white); }
.bg-blue p  { opacity: 0.9; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--dark);
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; border-radius: 8px; padding: 0.6rem 1rem; }

  .site-nav { position: relative; }

  section { padding: 2.5rem 0; }

  .hero { padding: 3rem 0 2.5rem; }

  .tabs { gap: 0; }
  .tab-btn { font-size: 0.85rem; padding: 0.5rem 0.85rem; }

  .update-post { padding: 1.25rem; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .fact-grid  { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   Kids Corner — Warm & Fun Extras
   Bible verses, background art, games, resources
   ============================================ */

/* ---- Floating decorative background bubbles (no images needed) ---- */
.bg-bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-bubbles span {
  position: absolute;
  bottom: -80px;
  display: block;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translateY(-620px) translateX(20px); opacity: 0; }
}
.kids-hero, .verse-section, .quiz-section { position: relative; }
.kids-hero > .container, .kids-hero > svg,
.verse-section > .container,
.quiz-section > .container { position: relative; z-index: 1; }

/* Sun / wave decorative SVG strip used between sections */
.sun-divider {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 0;
  font-size: 1.8rem;
}

/* ---- Bible Verses Section ("Words About Water") ---- */
.verse-section {
  background: linear-gradient(135deg, #fff3d6 0%, #ffe4b5 45%, #ffd8a8 100%);
  padding: 4rem 0;
  overflow: hidden;
}
.verse-section .section-header h2 { color: #7c4a03; }
.verse-section .section-header p  { color: #8a5a10; }
.verse-section .section-divider   { background: #e8890c; }

.verse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.verse-card {
  background: #fffaf0;
  border: 2px solid #ffdca8;
  border-radius: 18px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 6px 18px rgba(180,110,10,0.12);
}
.verse-card .verse-emoji { font-size: 1.8rem; display: block; margin-bottom: 0.5rem; }
.verse-card .verse-text {
  font-size: 1.02rem;
  font-style: italic;
  color: #5c3a08;
  margin-bottom: 0.6rem;
  line-height: 1.55;
}
.verse-card .verse-ref {
  display: inline-block;
  font-weight: 800;
  color: #b9660a;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.verse-card .verse-kid-note {
  background: #fff1d6;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: #7c4a03;
  margin: 0;
}
.verse-copyright {
  margin-top: 2rem;
  font-size: 0.78rem;
  color: #8a5a10;
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.85;
}

/* ---- Generic "game shell" used by all mini-games ---- */
.game-card {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 8px 26px rgba(15,118,246,0.14);
  border: 2px solid #bfdbfe;
  margin-top: 1.25rem;
}
.game-card h3 { display: flex; align-items: center; gap: 0.5rem; color: #0f172a; margin-bottom: 0.4rem; }
.game-card > p { color: #334155; font-size: 0.92rem; margin-bottom: 1.1rem; }
.game-status { font-weight: 700; color: #0ea5e9; font-size: 0.95rem; margin-top: 0.75rem; }
.game-reset { margin-top: 1rem; }

/* Memory match game */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
  max-width: 560px;
}
@media (max-width: 560px) { .memory-grid { grid-template-columns: repeat(3, 1fr); } }
.memory-card {
  aspect-ratio: 1;
  perspective: 600px;
  cursor: pointer;
}
.memory-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.4s;
  transform-style: preserve-3d;
}
.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner { transform: rotateY(180deg); }
.memory-card-front, .memory-card-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  backface-visibility: hidden;
}
.memory-card-front { background: linear-gradient(135deg,#0ea5e9,#38bdf8); color: #fff; font-size: 1.4rem; }
.memory-card-back  { background: #eef6ff; border: 2px solid #93c5fd; transform: rotateY(180deg); text-align:center; flex-direction:column; gap:0.15rem; padding: 0.25rem;}
.memory-card-back small { font-size: 0.55rem; color:#1e3a5f; font-weight:700; }
.memory-card.matched .memory-card-back { background: #d1fae5; border-color: #10b981; }

/* Save It or Waste It scenario game */
.scenario-box {
  background: #eff6ff;
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 520px;
}
.scenario-text { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: 1rem; min-height: 3rem; }
.scenario-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.scenario-btns button {
  flex: 1;
  min-width: 130px;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-save  { background: #10b981; color: #fff; }
.btn-waste { background: #f97316; color: #fff; }
.scenario-feedback { margin-top: 0.9rem; font-weight: 700; min-height: 1.3rem; }
.scenario-feedback.good { color: #047857; }
.scenario-feedback.bad  { color: #b45309; }
.scenario-stats { margin-top: 0.75rem; font-size: 0.9rem; color: #334155; display:flex; gap:1.25rem; flex-wrap:wrap; }

/* Clean or Polluted sort game */
.sort-item-box {
  background: #eff6ff;
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 520px;
  text-align: center;
}
.sort-item-emoji { font-size: 2.6rem; display:block; margin-bottom: 0.4rem; }
.sort-item-label { font-weight: 700; font-size: 1.05rem; color: #0f172a; margin-bottom: 1rem; }
.sort-btns { display:flex; gap:0.75rem; justify-content:center; flex-wrap:wrap; }
.btn-clean    { background:#0ea5e9; color:#fff; }
.btn-polluted { background:#64748b; color:#fff; }
.sort-btns button { padding:0.8rem 1.2rem; border-radius:12px; border:none; font-weight:800; cursor:pointer; }

/* Fact-flip cards */
.flip-fact-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; max-width: 640px; }
.flip-fact-card { aspect-ratio: 1; perspective: 700px; cursor:pointer; }
.flip-fact-inner { position:relative; width:100%; height:100%; transition: transform 0.5s; transform-style: preserve-3d; }
.flip-fact-card.open .flip-fact-inner { transform: rotateY(180deg); }
.flip-fact-front, .flip-fact-back {
  position:absolute; inset:0; border-radius:14px; backface-visibility:hidden;
  display:flex; align-items:center; justify-content:center; text-align:center; padding: 0.75rem;
}
.flip-fact-front { background: linear-gradient(135deg,#fbbf24,#f59e0b); color:#fff; font-size:1rem; font-weight:800; }
.flip-fact-back  { background:#fff7ed; border:2px solid #fdba74; color:#7c2d12; font-size:0.82rem; transform: rotateY(180deg); }

/* Word scramble game */
.scramble-box { background:#eff6ff; border-radius:16px; padding:1.5rem; max-width:520px; }
.scramble-word {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #0ea5e9;
  margin-bottom: 0.5rem;
  text-align: center;
}
.scramble-hint { font-size: 0.85rem; color:#334155; text-align:center; margin-bottom:1rem; }
.scramble-row { display:flex; gap:0.6rem; flex-wrap:wrap; justify-content:center; }
.scramble-row input {
  flex: 1;
  min-width: 160px;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 2px solid #93c5fd;
  font-size: 1rem;
  text-transform: uppercase;
}
.scramble-row button { padding: 0.7rem 1.3rem; border-radius:10px; border:none; background:#0ea5e9; color:#fff; font-weight:800; cursor:pointer; }

/* Video embeds */
.video-embed-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; margin-bottom: 0.75rem; background:#000; }
.video-embed-wrap iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* ---- Adult side: Resources & Downloads ---- */
.resource-list { list-style:none; margin: 1rem 0; display:grid; gap: 0.9rem; }
.resource-item {
  display:flex;
  align-items:flex-start;
  gap:0.9rem;
  background: var(--gray);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  transition: background 0.2s;
}
.resource-item:hover { background: var(--light); }
.resource-icon { font-size: 1.6rem; flex-shrink:0; }
.resource-body h4 { color: var(--dark); margin-bottom:0.2rem; font-size:0.98rem; }
.resource-body p  { margin:0; color: var(--muted); font-size: 0.85rem; }
.resource-body a.resource-link { font-weight:700; font-size:0.85rem; display:inline-block; margin-top:0.35rem; }
