/* ======================================================
   GLOBAL PAGE STYLES  Feb 26 (CLEANED + DEDUPED)
   ====================================================== */

/* ---------- Theme vars (so var(--...) never breaks) ---------- */
:root{
  --bg: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.05);
  --border: #ddd;
  --border-soft: #eee;
  --muted: #666;
  --link: #b00020;
  --link-active: #333;
}

/* Base body settings + linen background */
body { 
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: #222;
  line-height: 1.6;

  background-image:
    url("/images/holyimages.webp"),
    url("/images/excelbg.webp");
  background-position: left top, center;
  background-repeat: no-repeat, repeat;
  background-size: 200px auto, auto;
}

/* Rosary page can opt-in via <body class="bg-rosary"> (kept) */
body.bg-rosary {
  background-image:
    url("/images/holyimages.webp"),
    url("/images/excelbg.webp");
  background-position: left top, center;
  background-repeat: no-repeat, repeat;
  background-size: 200px auto, auto;
}

/* =========================
   PILL LABELS (STEP TAGS)
   ========================= */

.pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #444;
  background-color: #fafafa;
  margin-right: 0.4rem;
  line-height: 1.2;
  vertical-align: middle;
}

/* ======================================================
   CENTRAL WHITE PAGE WRAPPER / LAYOUT
   ====================================================== */

.page {
  max-width: 960px;
  margin: 1.5rem auto;
  background-color: var(--bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 70vh;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .page {
    margin: 0.5rem;
    border-radius: 0;
    box-shadow: none;
  }
  main {
    padding: 1rem;
  }
}

/* ======================================================
   HEADER & HERO
   ====================================================== */

header {
  padding: 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}

.hero-text {
  max-width: 800px;
  margin: 1rem auto;
  padding: 0 1rem;
  text-align: center;
}

.hero-image {
  text-align: center;
  margin: 0.5rem 0 1.5rem;
}

.hero-image img {
  max-width: 100%;
  width: 600px;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

/* ======================================================
   TYPOGRAPHY
   ====================================================== */

h1 {
  margin: 0;
  font-weight: 650;
  text-align: center;
}

h2 {
  margin-top: 1.5rem;
  font-weight: 650;
  text-align: center;
}

h3 {
  margin-top: 1.25rem;
  font-weight: 650;
}

.intro {
  text-align: center;
  max-width: 820px;
  margin: 0.75rem auto 1.25rem;
  color: #333;
}

/* Lists */
ol, ul { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin: 0.5rem 0; }

/* Mobile: hide <br class="mobile-hidden"> line breaks on small screens */
@media screen and (max-width: 767px) {
  br.mobile-hidden { display: none; }
}

/* ======================================================
   COMPONENTS
   ====================================================== */

/* Tip box */
.tip {
  border-left: 4px solid var(--border);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1rem 0;
  color: var(--muted);
}

/* ======================================================
   GLOBAL NAVIGATION LINKS Feb/26
   ====================================================== */

.nav-links {
  margin-top: 0.5rem;
  font-size: 0.98rem;
  text-align: center;
}

.nav-links a {
  color: #b00020;
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover { text-decoration: underline; }

.nav-links a.active {
  color: var(--link-active);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
  text-decoration-color: rgba(176, 0, 32, 0.45);
  cursor: default;
}

/* ======================================================
   UNIVERSAL TOGGLE SECTION (CORE SYSTEM) Feb/26
   ====================================================== */

.toggle-section {
  max-width: 800px;
  margin: 0.5rem auto;
  padding: 0.75rem;              /* a little breathing room */
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: #ffffff;
}

/* IMPORTANT: Remove big global H2 top margin inside toggles (fixes dead space) */
.toggle-section h2,
.toggle-section .toggle-heading {
  margin: 0;
  padding: 0;
}

/* If you want even tighter spacing between toggle sections */
.toggle-section + .toggle-section {
  margin-top: 0.5rem;
}

.toggle-button {
  width: 100%;
  padding: 0.6rem 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #b00020;
  background-color: #ffffff;
  border: 1px solid #b00020;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}

.toggle-button:hover { background-color: #f7f5f2; }

/* FIX: prayer text spacing (this was causing the bunched look) */
.toggle-content {
  margin-top: 0.75rem;
  line-height: 1.65;            /* readable prayer spacing */
  font-family: inherit;          /* ensures same font as site */
}

.toggle-content[data-open="false"] { display: none; }

/* Restore paragraph spacing inside prayers */
.toggle-content p {
  margin: 0 0 1rem;
}

/* Make <hr> not create huge gaps */
.toggle-content hr {
  margin: 1rem 0;
}

/* Toggle ACTION BUTTONS (SHARE / PRINT) Feb/26 */
.toggle-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toggle-actions button {
  padding: 0.35rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #b00020;
  background-color: #ffffff;
  border: 1px solid #b00020;
  border-radius: 6px;
  cursor: pointer;
}

.toggle-actions button:hover { background-color: #f7f5f2; }

/* Toggle MOBILE ADJUSTMENTS */
@media (max-width: 600px) {
  .toggle-section { padding: 0.75rem; }
}

/* ======================================================
   PRAYER DIVIDER + CALLOUT
   ====================================================== */

.callout {
  border-left: 4px solid #ddd;
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: #444;
}

.prayer-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.prayer-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #ccc;
  z-index: 0;
}

.prayer-divider span {
  position: relative;
  padding: 0 0.75rem;
  background-color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #666;
  z-index: 1;
}

/* ======================================================
   Responsive YouTube embed
   ====================================================== */

.yt-embed { margin: 1.25rem 0; }

.yt-title { 
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.yt-responsive {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
}

.yt-responsive iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.yt-source { 
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
}

/* ======================================================
   TODAY'S DAILY MESSAGE
   ====================================================== */

.daily-message {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: #ffffff;
  text-align: center;
}

#daily-message {
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Reflection block (if used above a prayer) */
.prayer-reflection {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.prayer-reflection h3 {
  text-align: center;
  margin-bottom: 0.75rem;
}

.prayer-reflection ul {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

/* ======================================================
   ROSARY TRACKER (kept as-is, but now variables are defined)
   ====================================================== */

.tracker {
  max-width: 760px;
  margin: 0 auto;
}

.tracker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tracker-row button {
  padding: 0.45rem 0.8rem;
  font-weight: 700;
  color: var(--link);
  background: #fff;
  border: 1px solid var(--link);
  border-radius: 6px;
  cursor: pointer;
}

.tracker-row button:hover { background: #f7f5f2; }

.tracker-bar {
  flex: 1;
  height: 16px;
  border: 3px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.tracker-fill {
  height: 100%;
  width: 0%;
  background: rgba(176, 0, 32, 0.35);
}

.tracker-meta {
  text-align: center;
  margin: 0.75rem 0 0.25rem;
  color: var(--muted);
}

.tracker-reset {
  margin-left: 0.5rem;
  padding: 0.25rem 0.6rem;
  font-weight: 700;
}

.decade-title {
  margin: 0.85rem 0 0.25rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 650;
}

.decade-text {
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.mystery-media {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0 0.25rem;
}

.mystery-media img {
  max-width: 360px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ======================================================
   FOOTER
   ====================================================== */

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid var(--border-soft);
}

/* ======================================================
   Begin Miracles Page
   ====================================================== */

/* Details scripture expander */
.scripture {
  margin: 0.35rem 0 0.75rem;
  padding: 0;
}

.scripture > summary {
  display: inline-block;
  cursor: pointer;
  color: #b00020;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
}

.scripture > summary::-webkit-details-marker { display: none; }

.scripture > summary::before { content: "▸ "; }
.scripture[open] > summary::before { content: "▾ "; }

.scripture-text {
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 4px solid #ddd;
  color: #444;
}

.scripture-note {
  margin: 0.35rem 0 0;
  color: #555;
  font-size: 0.95rem;
}

.scripture-text p { margin: 0.4rem 0; }

/* Miracle list override (no extra indent) */
.miracle-list {
  list-style-type: disc;
  padding-left: 0;
  margin: 0;
}

/* ======================================================
   End of Miracles Page
   ====================================================== */

/* =========================
   FORM
   Purpose: Contact form layout + field styles
   ========================= */

form { /* Form wrapper */
  margin-top: 1rem; /* Space above form */
  border: 1px solid #ddd; /* Form border */
  border-radius: 8px; /* Rounded corners */
  padding: 1rem; /* Inner padding */
  background-color: #fff; /* White background */
}

label { /* Form labels */
  display: block; /* Each label on its own line */
  font-weight: 600; /* Bold labels */
  margin-top: 0.85rem; /* Space above each label */
}

input,
textarea { /* Field styles */
  width: 100%; /* Full width */
  padding: 0.6rem; /* Inner padding */
  margin-top: 0.35rem; /* Space between label and field */
  border: 1px solid #ccc; /* Border */
  border-radius: 6px; /* Rounded corners */
  font-size: 1rem; /* Readable input text */
  box-sizing: border-box; /* Prevent overflow */
}

textarea { /* Message box */
  min-height: 140px; /* Comfortable minimum height */
  resize: vertical; /* Allow vertical resizing only */
}

/* Submit button */
button[type="submit"] {
  margin-top: 1rem; /* Space above button */
  padding: 0.55rem 1rem; /* Button padding */
  font-size: 1rem; /* Text size */
  font-weight: 700; /* Bold */
  color: #b00020; /* Sacred red */
  background-color: #fff; /* White background */
  border: 1px solid #b00020; /* Red outline */
  border-radius: 6px; /* Rounded corners */
  cursor: pointer; /* Pointer cursor */
}

button[type="submit"]:hover {
  background-color: #f7f5f2; /* Soft hover background */
}

