/*
Theme Name: The Morning Glory Ranch
Theme URI: https://themorninggloryranch.org
Author: Kim Russell
Description: Custom one-page theme for The Morning Glory Ranch — a shabby chic rustic design built around 1999–2026 history, the three program pillars, and a purchasing-with-purpose Get Involved flow.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: Unlicense
Text Domain: tmgr
*/

:root{
  --cream:#F8F2E7;
  --cream-deep:#EFE4CD;
  --paper:#FBF7EE;
  --wood:#6B5342;
  --wood-dark:#453224;
  --sage:#8A9A7E;
  --sage-deep:#5E7051;
  --rose:#C98F7F;
  --rose-deep:#A86D5E;
  --bluebonnet:#5B6C8F;
  --bluebonnet-deep:#3F4E6B;
  --text:#3D332B;
  --text-soft:#6B5F52;
  --line:#D8C9AC;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--cream);
  color:var(--text);
  font-family:'Karla', sans-serif;
  line-height:1.7;
  position:relative;
}
/* subtle aged-paper texture overlay */
body::before{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  z-index:9999;
  opacity:0.035;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1,h2,h3{ font-family:'Fraunces', serif; color:var(--wood-dark); font-weight:600; letter-spacing:-0.01em; }
.script{ font-family:'Caveat', cursive; font-weight:600; }
a{ color:inherit; }
img{ max-width:100%; display:block; }
.wrap{ max-width:1100px; margin:0 auto; padding:0 28px; }
section{ position:relative; }

/* ---------- wood divider ---------- */
.plank-divider{
  height:22px;
  background:repeating-linear-gradient(90deg, var(--wood) 0 3px, var(--wood-dark) 3px 4px, var(--wood) 4px 96px);
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.25), inset 0 -3px 6px rgba(0,0,0,0.15);
}

/* ---------- nav ---------- */
header{
  position:sticky; top:0; z-index:50;
  background:rgba(248,242,231,0.92);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}
nav.wrap{ display:flex; align-items:center; justify-content:space-between; padding:16px 28px; }
.brand{ font-family:'Fraunces', serif; font-weight:700; font-size:1.25rem; color:var(--wood-dark); display:flex; align-items:center; gap:8px;}
.brand svg{ width:26px; height:26px; }
nav ul{ list-style:none; display:flex; gap:26px; font-size:0.92rem; font-weight:600; }
nav ul li a{ text-decoration:none; color:var(--text-soft); transition:color .2s; }
nav ul li a:hover{ color:var(--rose-deep); }

/* ---------- nav dropdown ---------- */
.nav-dropdown{ position:relative; }
.nav-dropdown > .dropdown-toggle::after{ content:"\25BE"; font-size:0.7em; margin-left:4px; vertical-align:1px; }
.nav-dropdown .dropdown-menu{
  list-style:none; margin:0; display:flex; flex-direction:column; gap:4px;
  position:absolute; top:calc(100% + 14px); left:50%; transform:translateX(-50%) translateY(6px);
  min-width:270px; padding:10px; background:var(--paper); border:1px solid var(--line);
  border-radius:14px; box-shadow:0 14px 32px rgba(69,50,36,0.18);
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .18s ease, transform .18s ease; z-index:60;
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu{
  opacity:1; visibility:visible; pointer-events:auto; transform:translateX(-50%) translateY(0);
}
.dropdown-menu li a{ display:block; padding:9px 12px; border-radius:9px; text-decoration:none; transition:background .15s; }
.dropdown-menu li a:hover{ background:var(--cream-deep); }
.dropdown-menu li a strong{ display:block; font-family:'Fraunces', serif; font-weight:700; font-size:0.92rem; color:var(--wood-dark); }
.dropdown-menu li a span{ display:block; font-family:'Karla', sans-serif; font-weight:400; font-size:0.76rem; color:var(--text-soft); margin-top:2px; line-height:1.35; }
@media (max-width:780px){
  nav ul{ display:none; }
}

/* ---------- hero ---------- */
.hero{
  padding:90px 0 70px;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(138,154,126,0.18), transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(201,143,127,0.18), transparent 50%),
    var(--cream);
  text-align:center;
  overflow:hidden;
}
.hero-logo{
  max-width:340px;
  width:60%;
  height:auto;
  margin:0 auto 28px;
  display:block;
}
.eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-size:0.85rem; letter-spacing:0.14em; text-transform:uppercase;
  color:var(--sage-deep); font-weight:700; margin-bottom:22px;
}
.eyebrow::before, .eyebrow::after{ content:""; width:28px; height:1px; background:var(--sage-deep); }
.hero h1{ font-size:clamp(2.6rem, 6vw, 4.6rem); margin-bottom:14px; color:var(--wood-dark); }
.hero .tagline{ font-size:clamp(1.6rem, 3.2vw, 2.3rem); color:var(--rose-deep); margin-bottom:26px; }
.hero p.lede{ max-width:640px; margin:0 auto 34px; color:var(--text-soft); font-size:1.08rem; }
.btn{
  display:inline-block; padding:14px 30px; border-radius:999px;
  background:var(--rose); color:var(--paper); text-decoration:none;
  font-weight:700; font-size:0.98rem; letter-spacing:0.01em;
  box-shadow:0 6px 0 var(--rose-deep);
  transition:transform .15s, box-shadow .15s;
  border:none; cursor:pointer;
}
.btn:hover{ transform:translateY(2px); box-shadow:0 4px 0 var(--rose-deep); }
.btn.alt{ background:var(--sage); box-shadow:0 6px 0 var(--sage-deep); }
.btn.alt:hover{ box-shadow:0 4px 0 var(--sage-deep); }
.btn.blue{ background:var(--bluebonnet); box-shadow:0 6px 0 var(--bluebonnet-deep); }
.btn.blue:hover{ box-shadow:0 4px 0 var(--bluebonnet-deep); }

.wildflowers{ display:flex; justify-content:center; gap:18px; margin-top:46px; opacity:0.85; }
.wildflowers svg{ width:34px; height:46px; }

/* ---------- section heading ---------- */
.section-head{ text-align:center; max-width:680px; margin:0 auto 46px; }
.section-head h2{ font-size:clamp(1.9rem, 4vw, 2.6rem); margin-bottom:12px; }
.section-head .script{ color:var(--sage-deep); font-size:1.35rem; }

/* ---------- story / trail timeline (signature element) ---------- */
.story{ padding:80px 0 60px; }
.trail{ position:relative; padding:20px 0 10px; }
.trail-line{
  position:absolute; top:38px; left:0; right:0; height:0;
  border-top:3px dashed var(--wood);
  z-index:0;
}
.trail-markers{ display:flex; justify-content:space-between; gap:10px; position:relative; z-index:1; }
.marker{ flex:1; text-align:center; max-width:250px; }
.marker .post{
  width:76px; height:76px; margin:0 auto 16px;
  background:var(--wood); color:var(--cream);
  border-radius:10px; transform:rotate(-3deg);
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces', serif; font-weight:700; font-size:1.1rem;
  box-shadow:3px 4px 0 rgba(69,50,36,0.35);
  border:2px solid var(--wood-dark);
}
.marker:nth-child(2) .post{ transform:rotate(2deg); background:var(--sage-deep); }
.marker:nth-child(3) .post{ transform:rotate(-2deg); background:var(--rose-deep); }
.marker:nth-child(4) .post{ transform:rotate(3deg); background:var(--bluebonnet-deep); }
.marker h3{ font-size:1.05rem; margin-bottom:6px; }
.marker p{ font-size:0.9rem; color:var(--text-soft); }
@media (max-width:780px){
  .trail-line{ display:none; }
  .trail-markers{ flex-direction:column; gap:34px; }
  .marker{ max-width:100%; }
}

.story-body{ max-width:720px; margin:60px auto 0; }
.story-body p{ margin-bottom:20px; color:var(--text-soft); }
.story-body strong{ color:var(--text); }
.aside-note{
  margin-top:28px; padding:18px 22px; background:var(--cream-deep);
  border-left:4px solid var(--rose); border-radius:6px;
  font-family:'Caveat', cursive; font-size:1.25rem; color:var(--rose-deep);
}

/* ---------- mission today (welcome-sign style) ---------- */
.mission{
  padding:80px 0; background:var(--sage); color:var(--paper); text-align:center;
  position:relative;
}
.mission h2{ color:var(--paper); }
.mission-sign{
  max-width:720px; margin:0 auto; padding:52px 44px;
  background:var(--paper); color:var(--text); border-radius:14px;
  box-shadow:0 14px 0 var(--sage-deep);
  border:2px solid var(--cream-deep);
}
.mission-sign h2{ font-size:clamp(1.7rem,3.4vw,2.3rem); color:var(--wood-dark); }
.mission-photo{
  width:100%; max-height:320px; object-fit:cover; border-radius:10px;
  box-shadow:0 8px 20px rgba(69,50,36,0.15); margin-bottom:24px;
}
.mission-sign p{ color:var(--text-soft); margin-top:16px; }

/* ---------- three pillars ---------- */
.pillars{ padding:90px 0; }
.pillar-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
@media (max-width:900px){ .pillar-grid{ grid-template-columns:1fr; } }
.pillar{
  background:var(--paper); border-radius:12px; padding:34px 28px;
  border:1px solid var(--line);
  box-shadow:0 10px 24px rgba(69,50,36,0.06);
  display:flex; flex-direction:column; gap:14px;
  position:relative; overflow:hidden;
}
.pillar::before{
  content:""; position:absolute; top:0; left:0; right:0; height:6px;
}
.pillar.p1::before{ background:var(--sage); }
.pillar.p2::before{ background:var(--rose); }
.pillar.p3::before{ background:var(--bluebonnet); }
.pillar-icon{ width:46px; height:46px; }
.pillar h3{ font-size:1.3rem; }
.pillar .sub{ font-family:'Caveat',cursive; font-size:1.15rem; margin-top:-10px; }
.pillar.p1 .sub{ color:var(--sage-deep); }
.pillar.p2 .sub{ color:var(--rose-deep); }
.pillar.p3 .sub{ color:var(--bluebonnet-deep); }
.pillar-photo{
  width:100%; height:170px; object-fit:cover; border-radius:8px;
  box-shadow:0 8px 18px rgba(69,50,36,0.12); border:1px solid var(--line);
}
.pillar-photo-tall{
  display:block; width:auto; max-width:100%; max-height:280px;
  object-fit:contain; border-radius:8px; margin:0 auto;
  box-shadow:0 8px 18px rgba(69,50,36,0.12); border:1px solid var(--line);
}
.pillar p.body-text{ color:var(--text-soft); font-size:0.96rem; flex-grow:1; }
.pillar ul{ padding-left:18px; color:var(--text-soft); font-size:0.9rem; margin-top:4px;}
.pillar ul li{ margin-bottom:4px; }
.pillar .attribution{ font-size:0.78rem; color:var(--text-soft); font-style:italic; margin-top:6px; }
.pillar .pillar-link{
  align-self:flex-start; font-size:0.85rem; font-weight:700;
  color:var(--rose-deep); text-decoration:none; margin-top:2px;
}
.pillar .pillar-link:hover{ text-decoration:underline; }

/* ---------- photo gallery modals ---------- */
.gallery-modal{
  position:fixed; inset:0; background:rgba(61,51,43,0.85);
  display:none; align-items:center; justify-content:center;
  z-index:200; padding:24px;
}
.gallery-modal.open{ display:flex; }
.gallery-modal-inner{
  background:var(--paper); border-radius:14px; max-width:920px; width:100%;
  max-height:85vh; overflow-y:auto; padding:36px 30px; position:relative;
}
.gallery-modal-inner h3{ margin:2px 0 22px; }
.gallery-modal .script{ color:var(--rose-deep); font-size:1.2rem; display:block; }
.gallery-modal-close{
  position:absolute; top:16px; right:16px; width:38px; height:38px;
  border-radius:50%; background:var(--rose); color:var(--paper); border:none;
  font-size:1.3rem; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 0 var(--rose-deep);
}
.gallery-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr));
  gap:24px; padding-top:6px;
}
.gallery-grid .postcard{ margin:0 auto; }

/* ---------- nourish the children photo strip ---------- */
.malawi-strip{ padding:90px 0; background:var(--paper); }
.postcards{
  display:flex; gap:26px; overflow-x:auto; padding:24px 10px 34px;
  scroll-snap-type:x proximity;
}
.postcard{
  flex:0 0 auto; width:230px; background:var(--cream);
  padding:12px 12px 30px; border-radius:4px;
  box-shadow:0 10px 22px rgba(69,50,36,0.18);
  scroll-snap-align:center;
}
.postcard:nth-child(odd){ transform:rotate(-2.5deg); }
.postcard:nth-child(even){ transform:rotate(2.5deg); }
.postcard img{
  width:100%; height:260px; object-fit:cover; border-radius:2px; display:block;
}
.postcard .caption{
  font-family:'Caveat', cursive; font-size:1.25rem; color:var(--rose-deep);
  text-align:center; margin-top:12px;
}

/* ---------- get involved (stepping stones) ---------- */
.involved{ padding:90px 0; background:var(--cream-deep); }
.steps{ display:flex; align-items:stretch; gap:16px; margin-top:20px; }
@media (max-width:900px){ .steps{ flex-direction:column; } }
.step{
  flex:1; background:var(--paper); border-radius:12px; padding:30px 24px;
  border:1px solid var(--line); text-align:center;
  box-shadow:0 8px 20px rgba(69,50,36,0.06);
}
.step .tier-label{
  display:inline-block; font-family:'Caveat', cursive; font-size:1.2rem;
  padding:4px 16px; border-radius:999px; margin-bottom:14px;
}
.step.s1 .tier-label{ background:rgba(138,154,126,0.18); color:var(--sage-deep); }
.step.s2 .tier-label{ background:rgba(201,143,127,0.2); color:var(--rose-deep); }
.step.s3 .tier-label{ background:rgba(91,108,143,0.18); color:var(--bluebonnet-deep); }
.step h3{ font-size:1.15rem; margin-bottom:10px; }
.step p{ color:var(--text-soft); font-size:0.92rem; margin-bottom:18px; }
.step .btn + .btn{ margin-top:12px; }
.airbnb-options{ display:flex; gap:10px; margin-bottom:4px; }
@media (max-width:900px){ .airbnb-options{ flex-direction:column; } }
.airbnb-option{ flex:1; display:flex; flex-direction:column; align-items:center; gap:5px; }
.airbnb-photo{
  width:100%; height:56px; object-fit:cover; border-radius:6px;
  box-shadow:0 4px 10px rgba(69,50,36,0.12); border:1px solid var(--line);
}
.airbnb-name{ font-family:'Caveat', cursive; font-size:0.98rem; color:var(--bluebonnet-deep); line-height:1.15; }
.step-arrow{ display:flex; align-items:center; justify-content:center; color:var(--wood); font-size:1.6rem; }
@media (max-width:900px){ .step-arrow{ transform:rotate(90deg); margin:-6px 0; } }

/* ---------- footer ---------- */
footer{ padding:64px 0 40px; text-align:center; }
footer .brand{ justify-content:center; margin-bottom:14px; }
footer p{ color:var(--text-soft); font-size:0.92rem; }
footer .contact{ margin:22px 0; display:flex; flex-wrap:wrap; justify-content:center; gap:22px; font-size:0.92rem; }
footer .script{ display:block; margin-top:26px; font-size:1.6rem; color:var(--rose-deep); }

/* ---------- generic fallback content (blog/page templates) ---------- */
.fallback-content{ padding:70px 0; max-width:760px; margin:0 auto; }
.fallback-content h2{ margin-bottom:16px; }
.fallback-content article{ margin-bottom:50px; }

/* reveal on scroll */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }
/* ---------- floating donate button ---------- */
.floating-donate{
  position:fixed; right:22px; bottom:22px; z-index:80;
  display:flex; align-items:center; gap:8px;
  background:var(--rose-deep); color:#fff; text-decoration:none;
  padding:13px 20px 13px 16px; border-radius:999px;
  box-shadow:0 10px 26px rgba(69,50,36,0.28);
  font-family:"Karla", sans-serif; font-weight:700; font-size:0.95rem;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.floating-donate:hover{
  background:var(--rose); transform:translateY(-2px);
  box-shadow:0 14px 32px rgba(69,50,36,0.32); color:#fff;
}
.floating-donate-heart{ font-size:1.15rem; line-height:1; }
.floating-donate-modal{
  position:fixed; right:22px; bottom:90px; z-index:81;
  width:min(320px, calc(100vw - 44px));
  opacity:0; visibility:hidden; transform:translateY(12px);
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease;
  pointer-events:none;
}
.floating-donate-modal.is-open{
  opacity:1; visibility:visible; transform:translateY(0); pointer-events:auto;
}
.floating-donate-modal-inner{
  position:relative; background:var(--paper); border:1px solid var(--line);
  border-radius:16px; padding:20px 18px 18px; box-shadow:0 18px 40px rgba(69,50,36,0.24);
}
.floating-donate-modal-inner h3{
  font-family:"Fraunces", serif; font-size:1.05rem; color:var(--wood-dark);
  margin:0 0 8px;
}
.floating-donate-modal-inner p{
  font-family:"Karla", sans-serif; font-size:0.85rem; color:var(--text-soft);
  line-height:1.45; margin:0 0 14px;
}
.floating-donate-close{
  position:absolute; top:10px; right:12px; background:none; border:none;
  font-size:1.3rem; line-height:1; color:var(--text-soft); cursor:pointer; padding:4px;
}
.floating-donate-close:hover{ color:var(--wood-dark); }
@media (max-width:520px){
  .floating-donate{ right:14px; bottom:14px; padding:12px 16px; }
  .floating-donate-modal{ right:14px; bottom:82px; }
}