/* =============================================================
   Meserete Kristos Church — stylesheet
   Palette: Royal purple, sun gold, lalibela red, parchment cream
   ============================================================= */
:root {
  --green: #4a1472;
  --green-700: #6b2d9f;
  --green-50: #f3eaff;
  --gold: #f4c430;
  --gold-700: #c69b1e;
  --red: #c8102e;
  --red-700: #9e0a23;
  --cream: #faf6ef;
  --ink: #1c2521;
  --muted: #5a6660;
  --line: #e6e0d2;
  --white: #ffffff;
  --shadow: 0 6px 24px rgba(74, 20, 114, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}
body.lang-am, .lang-am button, .lang-am input, .lang-am textarea, .lang-am select {
  font-family: 'Noto Sans Ethiopic', 'Inter', sans-serif;
}
h1,h2,h3,h4 {
  font-family: 'Cormorant Garamond', 'Noto Sans Ethiopic', serif;
  color: var(--green);
  margin: 0 0 .5em;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.lang-am h1, .lang-am h2, .lang-am h3, .lang-am h4 {
  font-family: 'Noto Sans Ethiopic', 'Cormorant Garamond', serif;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.4rem; }
p  { margin: 0 0 1em; }
a  { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---------- Top bar with cross accent ---------- */
.topbar {
  background: var(--green);
  color: #e8d8f5;
  font-size: .82rem;
  border-bottom: 3px solid var(--gold);
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 1.25rem;
}
.topbar a { color: #fff; }
.topbar a.active { color: var(--gold); font-weight: 600; }
.sep { opacity: .4; margin: 0 .5rem; }
.topbar-left { display: inline-flex; align-items: center; gap: .55rem; }
.mkc-cross { display: inline-flex; align-items: center; }
.mkc-cross.sm svg { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.mkc-cross.lg { display: inline-block; margin-bottom: .25rem; }
.mkc-cross.lg svg { filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }

/* ---------- Navbar ---------- */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.25rem; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  color: var(--green); text-decoration: none;
}
.brand-mark img { display:block; width: 52px; height: 52px; object-fit: contain; }
.brand-text strong { display:block; font-size: 1rem; line-height:1.1; max-width: 18rem; }
.brand-text span { font-size: .75rem; color: var(--muted); letter-spacing:.04em; text-transform: uppercase; }
.nav-links {
  list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  display:inline-block; padding: .55rem .85rem; border-radius: 8px;
  color: var(--ink); font-weight: 500; font-size: .94rem;
}
.nav-links a:hover { background: var(--green-50); color: var(--green); }
.cta-link {
  background: var(--red); color: #fff !important; font-weight: 600;
}
.cta-link:hover { background: var(--red-700) !important; color:#fff !important; }
.admin-link { background: var(--gold); color: var(--green) !important; }
.nav-toggle {
  display: none; border: 0; background: transparent; font-size: 1.6rem; cursor: pointer; color: var(--green);
}

@media (max-width: 920px) {
  .nav-toggle { display:block; }
  .nav-links {
    display:none; width:100%; flex-direction: column; padding: .5rem 0; gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width:100%; padding: .9rem 1rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-inner { flex-wrap: wrap; }
}

/* ---------- Flash messages ---------- */
.flash-wrap { padding: 1rem 1.25rem 0; }
.flash {
  padding: .85rem 1rem; border-radius: 10px; margin-bottom: .5rem;
  border-left: 4px solid var(--green);
  background: var(--green-50); color: var(--green);
}
.flash-danger { background: #fdecee; color: var(--red-700); border-color: var(--red); }
.flash-warning { background: #fff7df; color: #7a5c00; border-color: var(--gold); }
.flash-info { background: #eef4ff; color: #1f3a8a; border-color: #1f3a8a; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(rgba(35, 5, 70, .76), rgba(35, 5, 70, .55)),
    url('https://images.unsplash.com/photo-1520637836862-4d197d17c93a?auto=format&fit=crop&w=1800&q=70') center/cover no-repeat;
  color: #fff;
  padding: 6rem 0 7rem;
  overflow: hidden;
}
.hero::before, .hero::after {
  content:''; position: absolute; left:0; right:0; height: 8px;
}
.hero::before {
  top:0; background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
}
.hero::after {
  bottom:0; background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { font-size: 1.2rem; max-width: 60ch; opacity: .92; }
.hero-actions { margin-top: 1.6rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.hero .verse-card {
  margin-top: 2.5rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(6px);
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius);
  max-width: 720px;
}
.hero .verse-card .reference { color: var(--gold); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; }
.hero .verse-card .verse { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; line-height:1.4; margin: .4rem 0; }
.hero .verse-card .verse-am { font-family: 'Noto Sans Ethiopic', serif; font-size: 1.05rem; opacity:.95; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .85rem 1.4rem;
  border-radius: 999px; font-weight: 600; border: 0; cursor: pointer;
  font-size: .98rem; transition: transform .15s ease, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--green); }
.btn-primary:hover { background: #ffdd6b; color: var(--green); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid #fff; }
.btn-outline:hover { background:#fff; color: var(--green); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-sm { padding: .55rem .9rem; font-size: .85rem; }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head .eyebrow {
  color: var(--red); letter-spacing: .2em; font-weight: 600;
  font-size: .8rem; text-transform: uppercase;
}
.section-head h2 { margin-top: .4rem; }
.section-head p { color: var(--muted); max-width: 60ch; margin: 0 auto; }

/* ---------- Stats strip ---------- */
.stats {
  background: var(--green); color: #fff; padding: 2.4rem 0;
  border-top: 4px solid var(--gold); border-bottom: 4px solid var(--red);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stats-grid .num { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; color: var(--gold); }
.stats-grid .label { opacity: .85; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase;}
@media (max-width:760px){ .stats-grid { grid-template-columns: repeat(2, 1fr);} }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1.5rem; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px){ .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 600px){ .card-grid { grid-template-columns: 1fr !important; } }

.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(74,20,114,.12); }
.card .thumb {
  aspect-ratio: 16/10; background-size: cover; background-position: center;
  background-color: var(--green-50);
}
.card .thumb.tall { aspect-ratio: 4/5; }
.card .body { padding: 1.2rem 1.3rem 1.4rem; flex: 1; display:flex; flex-direction: column; }
.card .meta { font-size: .8rem; color: var(--red); letter-spacing: .15em; text-transform: uppercase; margin-bottom: .4rem; font-weight: 600; }
.card h3 { margin-bottom: .4rem; font-size: 1.35rem; }
.card .actions { margin-top: auto; padding-top: 1rem; }

/* ---------- Event list ---------- */
.event-row {
  display: grid; grid-template-columns: 100px 1fr auto;
  gap: 1.4rem; align-items: center;
  background: #fff; padding: 1.1rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line); margin-bottom: .9rem; box-shadow: var(--shadow);
}
.event-date { text-align: center; background: var(--green-50); border-radius: 12px; padding: .6rem .4rem; }
.event-date .d { font-size: 1.6rem; font-weight: 700; color: var(--green); display:block; line-height:1; }
.event-date .m { font-size: .75rem; letter-spacing: .15em; color: var(--red); text-transform: uppercase; }
.event-cat {
  display:inline-block; font-size: .7rem; font-weight:700; letter-spacing: .14em;
  background: var(--gold); color: var(--green); padding: .15rem .55rem; border-radius: 4px;
  text-transform: uppercase;
}
@media (max-width: 600px){ .event-row { grid-template-columns: 80px 1fr; } .event-row .actions { grid-column: 1/-1; } }

/* ---------- About / content ---------- */
.content-wrap {
  background: #fff; border-radius: var(--radius); padding: 2.4rem;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  max-width: 920px; margin: 0 auto;
}
.content-wrap p { font-size: 1.04rem; }
.amharic { font-family: 'Noto Sans Ethiopic', serif; }

/* ---------- Forms ---------- */
form .field { margin-bottom: 1rem; display:flex; flex-direction: column; gap: .35rem; }
form label { font-weight: 600; color: var(--green); font-size: .92rem; }
form input, form textarea, form select {
  width: 100%; padding: .8rem .95rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink);
}
form input:focus, form textarea:focus, form select:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(74,20,114,.12);
}
form .row-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px){ form .row-2 { grid-template-columns: 1fr; } }
form button[type=submit] {
  margin-top: .5rem;
}
.checkbox { display:flex; align-items:center; gap:.5rem; }
.checkbox input { width:auto; }

.auth-card {
  max-width: 480px; margin: 3rem auto;
  background:#fff; padding: 2.2rem; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}

/* ---------- Newsletter form (footer) ---------- */
.newsletter { display: flex; gap: .4rem; }
.newsletter input { flex:1; padding: .6rem .75rem; border-radius: 8px; border:1px solid #6b2d9f; background:#2d0a52; color:#fff; }
.newsletter input::placeholder { color: #c4a8e0; }
.newsletter button {
  background: var(--gold); color: var(--green); border: 0; border-radius:8px;
  padding: 0 1rem; font-weight:700; cursor:pointer;
}

/* ---------- Footer ---------- */
.footer { background: var(--green); color: #dbc8f0; margin-top: 4rem; }
.footer-stripe {
  height: 6px; background: linear-gradient(90deg, var(--green-700), var(--gold), var(--red));
}
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.4fr; gap: 2rem;
  padding: 3rem 1.25rem 2rem;
}
.footer h4 { color: #fff; margin-bottom: .8rem; font-family: 'Inter', sans-serif; font-weight:700; font-size: 1rem; letter-spacing: .03em; text-transform: uppercase;}
.footer .muted { color: #c4a8e0; }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { margin-bottom: .4rem; }
.foot-links a { color: #dbc8f0; }
.foot-links a:hover { color: var(--gold); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem 1.5rem; font-size: .85rem; color: #c4a8e0;
  border-top: 1px solid #6b1fa0;
}
.ethio-stripe {
  width: 80px; height: 6px; border-radius: 4px;
  background: linear-gradient(90deg, var(--green-700) 33%, var(--gold) 33% 66%, var(--red) 66%);
}
@media (max-width: 800px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px){ .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Tables (admin) ---------- */
.table { width:100%; border-collapse: collapse; background:#fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align:left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table th { background: var(--green); color: #fff; font-weight: 600; letter-spacing: .03em; }
.table tr:hover td { background: var(--green-50); }
.badge { display:inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; background: var(--green-50); color: var(--green); }
.badge.red { background: #fdecee; color: var(--red-700); }
.badge.gold { background: #fff5cf; color: #7a5c00; }

/* ---------- Admin layout ---------- */
.admin-shell { display:grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 2rem 0; }
.admin-side {
  background: #fff; border-radius: var(--radius); padding: 1.2rem; height: fit-content;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.admin-side h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.admin-side a { display:block; padding:.55rem .7rem; border-radius:8px; color: var(--ink); margin-bottom:.2rem; }
.admin-side a:hover, .admin-side a.active { background: var(--green-50); color: var(--green); }
@media (max-width: 800px){ .admin-shell { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-grid .gitem { aspect-ratio: 4/3; background-size: cover; background-position: center; border-radius: 12px; overflow: hidden; position: relative; }
.gallery-grid .gitem .cap { position: absolute; left:0; right:0; bottom:0; padding: .8rem; background: linear-gradient(transparent, rgba(0,0,0,.7)); color:#fff; font-size: .9rem; }
@media (max-width: 700px){ .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Branch / give grids ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px){ .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: #fff; padding: 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--green-50); color: var(--green);
  display:flex; align-items:center; justify-content:center;
  font-size: 1.4rem; font-weight: 700; margin-bottom: .8rem;
}
.feature h3 { margin-bottom: .3rem; }

.give-methods { display:grid; grid-template-columns: repeat(2,1fr); gap: 1rem; margin-top: 1rem; }
@media (max-width:600px){ .give-methods { grid-template-columns: 1fr; } }
.give-method { padding: 1rem 1.2rem; border-radius: 12px; background: var(--green-50); border: 1px solid #d5bef0; }
.give-method strong { color: var(--green); }
.give-method code { background: #fff; padding: .12rem .4rem; border-radius: 4px; }

/* ---------- Page header ---------- */
.page-header {
  background: linear-gradient(rgba(74,20,114,.85), rgba(74,20,114,.85)),
    url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=1800&q=70') center/cover;
  color: #fff; padding: 3.5rem 0 3rem; text-align: center;
  border-bottom: 4px solid var(--gold);
}
.page-header h1 { color:#fff; }
.page-header .crumb { font-size: .85rem; color: var(--gold); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Daily verse strip on home ---------- */
.verse-strip {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-700) 100%);
  color: #fff; padding: 2rem 0;
  border-top: 3px solid var(--gold); border-bottom: 3px solid var(--red);
}
.verse-strip .ref { color: var(--gold); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.verse-strip .vt { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; max-width: 70ch; margin: .4rem auto; }
.verse-strip .va { font-family: 'Noto Sans Ethiopic', serif; opacity: .9; max-width: 70ch; margin: 0 auto; }

/* ---------- Iframes (sermons) ---------- */
.video-wrap { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.video-wrap iframe { width:100%; height:100%; border:0; }

/* ---------- Misc ---------- */
.error-page { text-align:center; padding: 6rem 1rem; }
.error-page .code { font-family: 'Cormorant Garamond', serif; font-size: 6rem; color: var(--gold); margin: 0; }
