/* =====================================================
   THE UNIVERSAL PRAYER — styles.css
   Dark navy + gold devotional aesthetic
   ===================================================== */

/* ── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0a0d14;
  --bg-surface:   #111520;
  --bg-card:      #161b2e;
  --gold:         #c9a84c;
  --gold-light:   #e8c97a;
  --gold-dim:     #8a6e2f;
  --white:        #f0ece4;
  --white-dim:    #a09890;
  --border:       rgba(201,168,76,0.18);
  --radius:       12px;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Lato', system-ui, sans-serif;
  --transition:   0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── SCROLLBAR ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ── HEADER ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,13,20,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--gold);
}

.site-logo .cross {
  font-size: 1.25rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.lang-toggle {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-toggle:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* ── HOME: HERO ───────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.25rem 4rem;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--gold-light);
  margin-bottom: 1rem;
  position: relative;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--white-dim);
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}

/* ── HOME: INTERCESSORS GRID ──────────────────────── */
.main-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.intercessors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.intercessor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.intercessor-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-dim);
  box-shadow: 0 8px 32px rgba(201,168,76,0.12);
}

.card-image-wrap {
  position: relative;
  height: 220px;
  background: var(--bg-surface);
  overflow: hidden;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.intercessor-card:hover .card-image-wrap img { opacity: 1; }

.card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 4rem;
  color: var(--gold-dim);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.card-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold-light);
}
.card-feast {
  font-size: 0.82rem;
  color: var(--white-dim);
  letter-spacing: 0.03em;
}
.card-badges {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.72rem;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  border-radius: 99px;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.04em;
}

/* ── INTERCESSOR PAGE: HERO ───────────────────────── */
.intercessor-hero {
  position: relative;
  height: clamp(300px, 45vw, 480px);
  overflow: hidden;
}

.intercessor-image-wrap {
  position: absolute;
  inset: 0;
}
.intercessor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.intercessor-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,13,20,0.2) 0%, rgba(10,13,20,0.85) 100%);
}

.intercessor-hero-text {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  padding: 0 1.25rem;
}

.intercessor-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--gold-light);
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
  margin-bottom: 0.4rem;
}
.feast-day {
  font-size: 0.9rem;
  color: var(--white-dim);
  letter-spacing: 0.06em;
}
.feast-label { color: var(--gold-dim); margin-right: 0.3rem; }

/* ── TABS NAVIGATION ──────────────────────────────── */
.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  position: sticky;
  top: 57px;
  z-index: 90;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--white-dim);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--gold); }
.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.tab-btn.chaplet-tab { display: none; }
.tab-btn.chaplet-tab.visible { display: block; }

/* ── TABS CONTENT ─────────────────────────────────── */
.tabs-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── CONTENT CARD ─────────────────────────────────── */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--white);
}
.content-card p { margin-bottom: 1rem; }
.content-card p:last-child { margin-bottom: 0; }
.content-card h3 {
  font-family: var(--font-serif);
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

/* ── NOVENA ───────────────────────────────────────── */
.novena-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.day-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: transparent;
  color: var(--white-dim);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.day-btn:hover { border-color: var(--gold); color: var(--gold); }
.day-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 700;
}

.novena-day-label {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.novena-arrows {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.arrow-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 1.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.arrow-btn:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ── NO CHAPLET ───────────────────────────────────── */
.no-chaplet { text-align: center; color: var(--white-dim); font-style: italic; }

/* ── LOADING SCREEN ───────────────────────────────── */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
}
.loading-cross {
  font-size: 3rem;
  color: var(--gold);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

/* ── NOT FOUND ────────────────────────────────────── */
.not-found {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.not-found-inner {
  text-align: center;
  padding: 2rem;
}
.cross.large { font-size: 3rem; color: var(--gold); display: block; margin-bottom: 1rem; }
.not-found-inner h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}
.not-found-inner p { color: var(--white-dim); margin-bottom: 1.5rem; }
.btn-home {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  padding: 0.65rem 1.75rem;
  border-radius: 99px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  transition: all var(--transition);
}
.btn-home:hover { background: var(--gold); color: var(--bg); }

/* ── HAMBURGER BUTTON ─────────────────────────────── */
.hamburger {
  background: transparent;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color var(--transition);
}
.hamburger:hover { border-color: var(--gold); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: background var(--transition);
}

/* ── SIDE NAV ─────────────────────────────────────── */
.side-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.side-nav-overlay.open { display: block; }

.side-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100dvh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.side-nav.open { right: 0; }

.side-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.side-nav-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.side-nav-close {
  background: transparent;
  border: none;
  color: var(--white-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color var(--transition);
}
.side-nav-close:hover { color: var(--gold); }

.side-nav-list {
  list-style: none;
  padding: 0.75rem 0;
  flex: 1;
}
.side-nav-link {
  display: block;
  padding: 0.85rem 1.5rem;
  color: var(--white-dim);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.side-nav-link:hover {
  color: var(--gold-light);
  background: rgba(201,168,76,0.06);
  border-left-color: var(--gold);
}
.side-nav-home { color: var(--white-dim); }
.side-nav-prayer { color: var(--gold-dim); font-style: italic; }
.side-nav-prayer:hover { color: var(--gold-light); }
.side-nav-divider {
  padding: 0.4rem 1.5rem 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  opacity: 0.7;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.side-nav-divider span { display: block; padding-top: 0.5rem; }

/* ── QUICK NAV ────────────────────────────────────── */
.quick-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.quick-nav::-webkit-scrollbar { display: none; }

.quick-nav-inner {
  display: flex;
  gap: 0.5rem;
  padding: 0.2rem 1rem;
  width: max-content;
  margin: 0 auto;
}
@media (min-width: 940px) {
  .quick-nav-inner {
    justify-content: center;
    width: auto;
  }
}

.quick-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  flex-shrink: 0;
  width: 62px;
  transition: transform var(--transition);
}
.quick-nav-item:hover { transform: translateY(-3px); }

.quick-nav-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(201,168,76,0.20);
  background-size: cover;
  background-position: top center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.quick-nav-item:hover .quick-nav-circle {
  border-color: var(--item-color, var(--gold));
  box-shadow: 0 0 10px var(--item-color, rgba(201,168,76,0.4));
}

.quick-nav-label {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
  text-align: center;
  color: var(--white-dim);
  line-height: 1.3;
  width: 62px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── HOME: 3-COLUMN LAYOUT ─────────────────────────── */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  align-items: start;
}

.support-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 76px;
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
  padding-bottom: 1rem;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.support-card-title {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.prayer-ref { margin-bottom: 1.1rem; }
.prayer-ref:last-child { margin-bottom: 0; }

.prayer-ref-title {
  font-size: 0.72rem;
  color: var(--gold-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  font-family: var(--font-sans);
  font-weight: 400;
}

.prayer-ref-text {
  font-size: 0.83rem;
  line-height: 1.8;
  color: var(--white-dim);
}

.prayer-instructions {
  background: rgba(201,168,76,0.06);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.prayer-instructions-text {
  font-size: 0.87rem;
  line-height: 1.75;
  color: var(--white-dim);
  font-style: italic;
}

.prayer-col { min-width: 0; }
.universal-prayer-inner { max-width: none; margin: 0; }

.universal-prayer-dedication {
  text-align: center;
  font-style: italic;
  color: var(--white-dim);
  font-size: 0.95rem;
  margin-top: -1rem;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.universal-prayer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  line-height: 1.9;
  font-size: 1.05rem;
  color: var(--white);
}

.universal-prayer-card p {
  margin-bottom: 1.2rem;
}

.prayer-pause {
  text-align: center;
  color: var(--gold-dim);
  font-size: 0.95rem;
  margin: 1.5rem 0 !important;
}

.prayer-scripture {
  border-left: 3px solid var(--gold-dim);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
}

.prayer-closing {
  text-align: center;
  font-weight: 400;
  color: var(--white-dim);
  margin-bottom: 0.8rem !important;
}

.prayer-amen {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-top: 1.5rem !important;
  letter-spacing: 0.04em;
}

/* ── FOOTER ───────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--white-dim);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.footer-domains { margin-top: 0.4rem; color: var(--gold-dim); }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1024px) {
  .home-layout { grid-template-columns: 1fr 1.6fr 1fr; gap: 1.25rem; }
}

@media (max-width: 768px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem 3rem;
  }
  .support-col {
    position: static;
    max-height: none;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .support-col .support-card { flex: 1 1 220px; }
  .prayer-col { order: -1; }
}

@media (max-width: 600px) {
  .tab-btn { padding: 0.85rem 1rem; font-size: 0.8rem; }
  .content-card { padding: 1.25rem; }
  .intercessors-grid { grid-template-columns: 1fr 1fr; }
  .support-col { flex-direction: column; }
}
