/* ========== Reset ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  color: #111;
  background: #f5f6f7;
}

/* ========== Page structure ========== */
.page-wrap { display: block; }

/* Main container: single centered column (no sidebar) */
.container {
  max-width: 960px;
  margin: 16px auto 24px;
  padding: 0 16px;
  display: block;
}

.content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* Hide traditional sidebar column for now (using edge ad instead) */
.sidebar { display: none; }

/* ========== Header (full width dark) ========== */
.site-header {
  background: #1f2937;
  color: #fff;
  margin: 0 0 12px 0;
  padding-top: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .site-branding,
.site-header .site-nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}
.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.site-title:hover { text-decoration: underline; }
.site-tagline {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 0.95rem;
}
.site-nav {
  padding: 10px 0 12px;
  border-bottom: 0;
  margin-bottom: 0;
}

/* Menu (centered on dark bg) */
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.menu a {
  text-decoration: none;
  color: #e5e7eb;
  padding: 6px 2px;
}
.menu a:hover, .menu a:focus {
  text-decoration: underline;
  color: #fff;
}

/* ========== Top Ad ========== */
/* Wrapper keeps top ad aligned with main content width */
.ad-top-wrap {
  max-width: 960px;    /* match main content width */
  margin: 12px auto 0; /* space under header */
  padding: 0 16px;
}
/* Banner appearance */
.ad-top {
  margin: 0 auto;
  padding: 8px 12px;
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
  min-height: 90px;
}

/* ========== Content sections ========== */
.intro h1 { margin: 0 0 8px; font-size: 1.6rem; }
.votd {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
}
.votd blockquote { margin: 8px 0 0; padding-left: 10px; border-left: 3px solid #ddd; }
.latest { margin-top: 18px; }
.latest h2 { margin: 0 0 10px; }
.card {
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fff;
}
/* ===== Card hover effect ===== */
.card {
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: scale(1.02);
  background-color: #f9fafb; /* soft light grey */
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card h3 a { text-decoration: none; color: #222; }
.card h3 a:hover { text-decoration: underline; }
.card .meta { color: #777; font-size: 0.9rem; }

/* Homepage article + quote */
.home-article { margin-top: 6px; }
.home-quote {
  margin: 14px 0;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  border-left: 3px solid #cbd5e1;
}

/* Section tiles grid */
.sections {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); /* bigger tiles */
  gap: 16px;
  justify-content: center; /* centers if screen is wider than the tiles */
}

@media (max-width: 760px) {
  .sections {
    grid-template-columns: 1fr; /* single column on phones */
  }
}
.tile {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: #111;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.15s ease;
}
.tile h2 { margin: 0 0 6px; font-size: 1.15rem; }
.tile p { margin: 0; color: #444; font-size: 0.98rem; }
.tile:hover {
  transform: scale(1.02);
  background-color: #f9fafb;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

/* Keyboard focus states for tiles */
.tile:focus { outline: none; }
.tile:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  transform: scale(1.02);
  background-color: #f9fafb;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .tile { transition: background-color 0.2s ease, box-shadow 0.15s ease; }
  .tile:hover, .tile:focus-visible { transform: none; }
}

/* ========== Edge (floating) Ad ========== */
/* This targets the element in includes/ad-sidebar.php (id="edge-ad") */
@media (min-width: 1200px) {
  #edge-ad {
    position: fixed;
    right: 20px;      /* distance from right edge of window */
    top: 140px;       /* adjust to clear header/top ad */
    z-index: 1000;
  }
  #edge-ad .ad {
    width: 300px;
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    text-align: center;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    min-height: 250px;
  }
}
@media (max-width: 1199px) {
  #edge-ad { display: none; }
}

/* ========== Generic Ad styles ========== */
.ad {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  color: #475569;
  font-size: 0.95rem;
}
.ad-footer { min-height: 120px; }

/* Footer ad wrapper (aligns to content width, sits outside main box) */
.ad-footer-wrap {
  max-width: 960px;
  margin: 16px auto;
  padding: 0 16px;
}

/* ========== Footer (full-width bar) ========== */
.site-footer {
  background: #1f2937;
  color: #e5e7eb;
  margin-top: 24px;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.site-footer .footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* One-line footer links: Privacy • Terms • Socials */
.footer {
  text-align: center;
  font-size: 0.95rem;
}
.footer-links-inline {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.footer-links-inline a {
  color: #e5e7eb;
  text-decoration: none;
  line-height: 1;
}
.footer-links-inline a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.footer-links-inline span {
  color: #9ca3af;
  margin: 0 6px;
}

.copyright {
  color: #9ca3af;
  font-size: 0.85rem;
  margin-top: 6px;
}
/* ===== Cookie Banner ===== */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(31,41,55,0.95); /* dark footer tone */
  color: #f1f5f9;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.9rem;
  z-index: 2000;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.25);
}

.cookie-banner p {
  margin: 0;
}

.cookie-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 4px;
  margin-left: 10px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.9rem;
}
.cookie-btn:hover {
  background: #1d4ed8;
}

/* ===== Global card grid layout ===== */
.list, .latest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

/* individual cards adjust to grid width */
.card {
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.15s ease;
}

/* hover effect stays */
.card:hover {
  transform: scale(1.02);
  background-color: #f9fafb;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

/* === Universal card grid for all section lists === */
/* Applies to Home, Psalms, Verses, Stories, Reflections, etc. */
.list ul,
.latest,
.latest ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center; /* centers last odd card */
}

/* Optional: makes each card layout consistent */
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
/* ===== Responsive video embed ===== */
.feature-video {
  margin: 16px 0;
}
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}
/* ===== Reflection next/prev navigation ===== */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.post-nav a {
  color: #2563eb;
  text-decoration: none;
}

.post-nav a:hover {
  text-decoration: underline;
}
