/* ================================================================
   03 — HEART OF HOPE MODULES LAYER
   Version: Phase 4.1 (Modules Only — Optimized)
   Purpose: Scripture Rotator, Notices Board, Audio Player,
            Footer Card, and future modules
================================================================ */

/* ===============================================================
   1. UNIVERSAL MODULE WRAPPER
================================================================ */

.hoh-module {
  background: var(--color-surface);
  border-radius: var(--radius-medium);
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4) var(--space-3);
  margin: var(--space-5) auto;
  max-width: var(--container-narrow);
  transition: transform 0.25s ease; /* Removed shadow animation */
}

.hoh-module:hover {
  transform: translateY(-3px);
}

/* ===============================================================
   2. MODULE HEADER (Universal)
================================================================ */

.hoh-module__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  text-align: center;
}

.hoh-module__icon {
  font-size: 1.4rem;
  color: var(--color-accent);
}

.hoh-module__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
}

.hoh-module__divider {
  height: 2px;
  background: var(--color-accent);
  opacity: 0.4;
  margin: var(--space-3) auto var(--space-4);
  width: 60%;
}

/* ===============================================================
   3. AUDIO PLAYER MODULE (Streamlined, Same Look)
================================================================ */

.hoh-audio-module {
  max-width: var(--container-medium);
  margin: var(--space-5) auto;
}

/* Section heading */
.hoh-audio-module .podcast-archive-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: var(--space-2) auto var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--color-accent);
  max-width: 600px;
  text-align: center;
}

/* Controls bar */
.hoh-audio-module .music-player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto var(--space-3);
  padding: 0 var(--space-2);
}

/* Audio stack container */
.hoh-audio-module .music-player-stack {
  width: 100%;
  max-width: 600px;
  margin: var(--space-2) auto var(--space-4);
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

/* Track block */
.hoh-audio-module .track {
  width: 100%;
  max-width: 500px;
  text-align: center;
}

/* Track title */
.hoh-audio-module .track-title {
  margin-bottom: var(--space-1);
  font-weight: 600;
  color: var(--color-heading);
}

/* Audio element */
.hoh-audio-module audio {
  width: 100%;
  max-width: 500px;
  min-height: 40px;
  margin: 0 auto;
  border-radius: var(--radius-soft);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  outline: none;
}

/* Repeat toggle button */
.hoh-audio-module #repeat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.25rem 0.75rem;
  font-size: 0.9rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-soft);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
}

.hoh-audio-module #repeat-toggle:hover {
  background: var(--color-accent-dark);
}

.hoh-audio-module #repeat-toggle img.emoji {
  width: 1rem;
  height: 1rem;
}

/* ===============================================================
   4. AUDIO PLAYER — WEBKIT CONTROL THEMING
================================================================ */

.hoh-audio-module audio::-webkit-media-controls-play-button,
.hoh-audio-module audio::-webkit-media-controls-pause-button {
  background-color: var(--color-accent) !important;
  border-radius: 50% !important;
  color: #fff !important;
}

.hoh-audio-module audio::-webkit-media-controls-play-button:hover,
.hoh-audio-module audio::-webkit-media-controls-pause-button:hover {
  background-color: var(--color-accent-dark) !important;
}

.hoh-audio-module audio::-webkit-media-controls-timeline,
.hoh-audio-module audio::-webkit-media-controls-volume-slider {
  background-color: var(--color-accent-light, #e8ddff);
  color: var(--color-heading);
}

.hoh-audio-module audio::-webkit-media-controls-current-time-display,
.hoh-audio-module audio::-webkit-media-controls-time-remaining-display {
  color: var(--color-heading);
  font-weight: 600;
}

/* ===============================================================
   5. RESPONSIVE AUDIO MODULE
================================================================ */

@media (max-width: 600px) {
  .hoh-audio-module .podcast-archive-heading {
    font-size: 1.25rem;
    margin: var(--space-1) auto var(--space-2);
  }

  .hoh-audio-module .music-player-stack {
    padding: var(--space-2);
    margin: var(--space-2);
  }

  .hoh-audio-module #repeat-toggle {
    width: 100%;
    font-size: 1rem;
  }
}

/* ===============================================================
   6. SCRIPTURE ROTATOR + NOTICES BOARD
================================================================ */


/* Shared rotator + notices board container styles */
.scripture-rotator,
.hoh-notices-board {
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-soft);
  background: var(--color-surface);
  border-radius: var(--radius-medium);
  padding: var(--space-4);
}

/* Scripture Rotator — No layout shift */
.scripture-rotator .quote {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  transition: opacity 0.6s ease;
}

.scripture-rotator .quote.active {
  visibility: visible;
  opacity: 1;
  position: relative;
}

/* Scripture Rotator — Text Color */
.scripture-rotator .quote,
.scripture-rotator .quote.active {
  color: var(--color-accent-dark);
}

/* Notices Board rows */
.hoh-notices-board .notice-row {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

/* Mobile notices board */
@media (max-width: 600px) {
  .hoh-notices-board .notice-row {
    grid-template-columns: 1fr;
  }
}

/* Fix the 600–700px squeeze zone */
@media (max-width: 700px) and (min-width: 600px) {
  .scripture-rotator {
    margin-top: var(--space-7);
  }
}



/* ===============================================================
   7. FOOTER CARD MODULE
================================================================ */

.hoh-footer-card {
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
  margin: var(--space-5) auto var(--space-6);
  max-width: var(--container-medium);
  text-align: center;
  color: var(--color-heading);
}

.hoh-footer-card ul {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.hoh-footer-card ul li {
  font-weight: 600;
  color: var(--color-accent);
}

.hoh-footer-card .footer-tagline {
  margin-top: var(--space-2);
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .hoh-footer-card {
    padding: var(--space-4);
    max-width: var(--container-narrow);
  }
}

/* ============================================================
   IMAGE OF THE DAY MODULE
   Matches Scripture Rotator, Notices, Audio Player
============================================================ */

.hoh-image-of-day__img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  display: block;
}

/* ============================================================
   IMAGE OF THE DAY — TRANSLUCENT CARD STYLE
============================================================ */

.hoh-module.hoh-image-of-day {
  background: rgba(255, 255, 255, 0.15); /* soft translucent white */
  backdrop-filter: blur(8px);            /* subtle glass effect */
  -webkit-backdrop-filter: blur(8px);    /* Safari support */
  border-radius: var(--radius-large);
  padding: var(--space-large);
  box-shadow: var(--shadow-soft);
}

.hoh-module.hoh-image-of-day {
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hoh-image-of-day__img:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}
/* ============================================================
   ULTIMATE HEADER FIX — FORCE TRUE CENTERING ON DESKTOP
============================================================ */

/* Override theme grid with maximum specificity */
body .site-header.header-layout--split .header-inner {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 3rem !important;
  width: 100% !important;
}

/* Prevent theme from stretching slots */
body .site-header.header-layout--split .header-slot {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
}

/* Left menu hugs toward logo */
body .site-header.header-layout--split .header-slot.header-left {
  justify-content: flex-end !important;
}

/* Right menu hugs toward logo */
body .site-header.header-layout--split .header-slot.header-right {
  justify-content: flex-start !important;
}

/* ============================================================
   NAV GROUPS — KEEP CENTERED
============================================================ */

body .nav-left,
body .nav-right {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

body .nav-left ul,
body .nav-right ul {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  gap: 1.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* ============================================================
   MOBILE — KEEP YOUR PERFECT STACK
============================================================ */

@media (max-width: 700px) {

  body .site-header.header-layout--split .header-inner {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
  }

  body .site-header.header-layout--split .header-slot {
    justify-content: center !important;
    width: 100% !important;
  }

  body .nav-left ul,
  body .nav-right ul {
    flex-direction: row !important;
    gap: 1rem !important;
  }

  body .header-slot.header-left { order: 1 !important; }
  body .header-slot.header-center { order: 2 !important; }
  body .header-slot.header-right { order: 3 !important; }
}

/* ============================================================
   FIX: Restore Purple Font Color (High Specificity)
============================================================ */

body .nav-left a,
body .nav-right a {
  color: #6a0dad !important;   /* HOH purple */
  font-weight: 600;
  font-family: Inter, system-ui, sans-serif;
}


/* ============================================================
   FIX: Mobile Menus Drifting Left/Right
============================================================ */

@media (max-width: 700px) {

  /* Center each slot fully */
  body .site-header.header-layout--split .header-slot.header-left,
  body .site-header.header-layout--split .header-slot.header-right {
    justify-content: center !important;
    text-align: center !important;
  }

  /* Keep menus horizontal and centered */
  body .nav-left ul,
  body .nav-right ul {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 1rem !important;
  }
}


/* ============================================================
   SCROLL-DIRECTION HEADER — HIDE DOWN, SHOW UP
============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: transform 0.35s ease, box-shadow 0.3s ease;
  will-change: transform;
}

/* Hidden state (scrolling down) */
.site-header.header--hidden {
  transform: translateY(-100%);
}

/* Visible state (scrolling up) */
.site-header.header--visible {
  transform: translateY(0);
}

/* Optional: subtle shadow when visible */
.site-header.header--visible {
  box-shadow: 0 4px 12px rgba(106, 13, 173, 0.15);
}

/*Hover Underline animation*/

body .nav-left a,
body .nav-right a {
  position: relative;
  transition: color 0.25s ease;
}

body .nav-left a::after,
body .nav-right a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: #6a0dad;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

body .nav-left a:hover::after,
body .nav-right a:hover::after {
  width: 100%;
}

/*Active Page highlight*/
body .nav-left .current-menu-item > a,
body .nav-right .current-menu-item > a {
  color: #4b0082 !important;
  font-weight: 700;
}

body .nav-left .current-menu-item > a::after,
body .nav-right .current-menu-item > a::after {
  width: 100%;
  background: #4b0082;
}

/*Header Glow on Hover*/
.site-header:hover {
  box-shadow: 0 4px 12px rgba(106, 13, 173, 0.15);
}

/*Logo Pulse on Hover*/
.header-slot.header-center img {
  transition: transform 0.25s ease;
}

.header-slot.header-center img:hover {
  transform: scale(1.03);
}

/* ============================================================
   HEADER BACKGROUND FIX — SOLID WHEN MOVING, TRANSLUCENT WHEN STILL
============================================================ */

/* Default (when page is at the top) — keep your translucent look */
.site-header {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease;
}

/* When header is sliding (visible after scroll) — make it solid */
.site-header.header--visible,
.site-header.header--hidden {
  background: #ffffff !important;   /* solid white */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ============================================================
   HEADER CARD — ROUNDED CORNERS
============================================================ */

.site-header {
  border-radius: 0 0 20px 20px; /* round bottom corners only */
  overflow: hidden;            /* ensures the blur stays inside the curve */
}

/* ============================================================
   HEADER CARD — ALWAYS START WHITE
============================================================ */

.site-header {
  background: #ffffff !important;   /* solid white card */
  border-radius: 0 0 20px 20px;     /* rounded bottom corners */
  overflow: hidden;                 /* keeps blur/edges clean */
}


/* ============================================================
   LATEST POSTS — AUTO MINI CARD (NO WRAPPER NEEDED)
============================================================ */

.wp-block-latest-posts {
  background: #ffffff !important;
  border: 2px solid var(--color-accent) !important;
  border-radius: 20px !important;
  padding: var(--space-4) !important;
  margin: var(--space-4) auto !important;
  box-shadow: 0 4px 12px rgba(106, 13, 173, 0.12) !important;
  max-width: var(--container-narrow) !important;
  list-style: none !important;
}

/* Remove default bullets */
.wp-block-latest-posts li {
  list-style: none !important;
  margin-bottom: var(--space-2) !important;
}

/* Link styling */
.wp-block-latest-posts__post-title {
  font-family: var(--font-heading) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #6a0dad !important; /* HOH purple */
  text-decoration: none !important;
  position: relative !important;
  transition: color 0.25s ease !important;
}

/* Hover color shift */
.wp-block-latest-posts__post-title:hover {
  color: #8b3de3 !important;
}

/* Underline reveal animation */
.wp-block-latest-posts__post-title::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  bottom: -3px !important;
  width: 0 !important;
  height: 2px !important;
  background: #6a0dad !important;
  transition: all 0.3s ease !important;
  transform: translateX(-50%) !important;
}

.wp-block-latest-posts__post-title:hover::after {
  width: 100% !important;
}

body .hoh-latest-posts-card .wp-block-latest-posts__post-title:hover::after {
  width: 100% !important;
}


/* ============================================================
   HOH — Reusable Button
   ============================================================ */

/* Force center alignment even inside flex/grid blocks */
.hoh-center {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 20px 0;
}

/* HOH Button */
.hoh-button {
  display: inline-block;
  background: rgba(var(--color-heading-rgb), 0.50); /* purple + opacity */
  color: var(--color-surface);
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--color-accent);
  transition: all 0.2s ease;
}

.hoh-button:hover {
  background: rgba(var(--color-accent-rgb), 0.85); /* accent + opacity */
  color: var(--color-heading);
  border: 2px solid var(--color-heading);
  box-shadow: 0 0 8px var(--color-accent);
}



/*===========================================================
/* HOH — Force Better Messages full width on mobile 
==============================================================*/
@media (max-width: 600px) {
  .entry-content .bp-messages-wrap-main,
  .entry-content .bp-messages-wrap,
  .bp-messages-column,
  .bp-messages-wrap-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Remove theme padding that causes the initial squeeze */
  .entry-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 600px) {
  .bp-messages-wrap-main {
    min-width: 100vw !important;
  }
}

/* ============================================================
   HOH — Music Player Controls Bar
   ============================================================ */

.music-player-controls {
  display: flex;
  gap: 12px; /* space between buttons */
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* wrap on mobile */
  margin: 20px 0 30px;
}

/* Optional: tighten emoji alignment inside buttons */
.music-player-controls .hoh-button img,
.music-player-controls .hoh-button .emoji {
  height: 1.1em;
  width: 1.1em;
  vertical-align: -2px;
  margin-right: 6px;
}

/* ============================================================
   HOH — Music Player Active States
   ============================================================ */

/* Active (ON) state for toggle buttons */
.hoh-button.is-active {
  background: var(--color-accent);
  color: var(--color-heading);
  border: 2px solid var(--color-heading);
  box-shadow: 0 0 10px var(--color-accent);
}

/* Optional: subtle animation when toggling */
.hoh-button.is-active {
  transform: translateY(-1px);
}

/* ============================================================
   HOH — Active Track Highlight
   ============================================================ */

.track.is-active {
  border: 2px solid var(--color-accent);
  border-radius: 10px;
  padding: 12px;
  background: rgba(180, 150, 255, 0.08); /* soft lavender wash */
  box-shadow: 0 0 10px rgba(180, 150, 255, 0.4);
  transition: all 0.25s ease;
}

.music-player {
  max-width: 700px;
  width: 100%;
}

/* ============================================================
   HOH — Audio Player Button Refinements
   ============================================================ */

/* Refinements FIRST */
.music-player-controls .hoh-button {
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  height: 42px;
}

/* Base override LAST */
.music-player-controls .hoh-button {
  background: var(--color-heading); /* deep purple */
  color: var(--color-surface);      /* white/light text */
  border: 2px solid var(--color-heading);
}


/* Icon alignment */
.music-player-controls .hoh-button img,
.music-player-controls .hoh-button .emoji {
  height: 1.1em;
  width: 1.1em;
  vertical-align: -2px;
}

/* Hover */
.music-player-controls .hoh-button:hover {
  background: var(--color-accent);
  color: var(--color-heading);
  border-color: var(--color-heading);
  box-shadow: 0 0 10px var(--color-accent);
}

/* Active (ON) state */
.music-player-controls .hoh-button.is-active {
  background: var(--color-accent);
  color: var(--color-heading);
  border: 2px solid var(--color-heading);
  box-shadow: 0 0 12px var(--color-accent);
  transform: translateY(-1px);
}

.music-player-title {
  text-align: center;
  margin-bottom: 25px;
  color: var(--color-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.now-playing {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--color-heading);
  font-weight: 600;
}

/* ================================================================
   PHASE 5 — MODULE SYSTEM
================================================================ */

.hoh-module {
  background: var(--color-surface);
  border-radius: var(--radius-soft);
  padding: var(--space-4);
  margin: var(--space-5) 0;
  box-shadow: var(--shadow-soft);
}

.hoh-module__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.hoh-module__icon {
  font-size: var(--scale-4);
  color: var(--color-heading);
}

.hoh-module__title {
  font-family: var(--font-heading);
  font-size: var(--scale-4);
  margin: 0;
  color: var(--color-heading);
}

.hoh-module__divider {
  height: 2px;
  width: 60px;
  background: var(--color-accent-dark);
  opacity: 0.2;
  margin-bottom: var(--space-3);
}

/* ===============================================================
   2. FOOTER COMPONENT (HOH-FOOTER-MENU-UNIFIED v1.3)
================================================================ */

/* Mobile-first */
#menu-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

#menu-footer-menu a {
  text-decoration: none;
  color: var(--color-body);
  opacity: 0.85;
  font-size: 0.9rem;
}

#menu-footer-menu a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Desktop layout */
@media (min-width: 640px) {
  #menu-footer-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
  }
}

footer.site-footer .footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  max-width: var(--container-medium);
}

/* BuddyPress footer alignment override */
body.groups footer.site-footer .footer-inner,
body.bp-groups footer.site-footer .footer-inner {
  max-width: none !important;
  width: 100% !important;
}

/* ===============================================================
   5. HOH FOOTER CARD (Unified Footer System)
================================================================ */

.hoh-footer-card {
  background: var(--color-surface);              /* Pure White */
  border: 2px solid var(--color-accent);         /* Solid Lavender */
  border-radius: var(--hoh-component-radius);
  box-shadow: var(--hoh-component-shadow);
  padding: var(--space-3);
  margin: var(--space-4) auto;
  max-width: var(--container-medium);
  text-align: center;
  color: var(--color-body);                      /* default text color */
}

/* Footer links inside the card */
.hoh-footer-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.hoh-footer-card a {
  color: var(--color-body);
  text-decoration: none;
  opacity: 0.85;
  font-size: 0.9rem;
}

.hoh-footer-card a:hover {
  opacity: 1;
  color: var(--color-accent-dark);               /* Deep Rich Purple */
  text-decoration: underline;
}

/* Main footer text line */
.hoh-footer-card > p {
  margin: 0;
  color: var(--color-body);
}

/* Tagline line */
.hoh-footer-card .footer-tagline {
  font-size: 0.9rem;
  margin-top: var(--space-1);
  color: var(--color-body);                      /* Dark Grey */
  opacity: 0.9;
}

/* Highlighted part in tagline */
.hoh-footer-card .footer-tagline strong {
  color: var(--color-heading);                   /* Royal Violet */
  font-weight: 700;
}

/* Footer tagline color fix */
.hoh-footer-card .footer-tagline {
  color: var(--color-body) !important;      /* Dark grey */
  opacity: 0.9;
}

/* Highlighted part */
.hoh-footer-card .footer-tagline strong {
  color: var(--color-heading) !important;   /* Royal Violet */
  font-weight: 700;
}


/* ===============================================================
   8. FUTURE MODULE HOOKS
================================================================ */

.hoh-pdf-module {}
.hoh-resource-module {}
.hoh-community-module {}
