/* ============================================
   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; }
}
