/*
Theme Name: MPF Theme
Theme URI: https://mpfoman.org
Description: Child theme of Hello Elementor for Muscat Pentecostal Fellowship. Provides MPF brand fonts, colors, and helper styles. Pair with the included Elementor templates (mpf-home, mpf-overflow, mpf-podcast) which use native Elementor widgets — every text, image, button, and color is editable directly in Elementor.
Author: MPF
Author URI: https://mpfoman.org
Template: hello-elementor
Version: 3.7.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: mpf-theme
Tags: elementor, church, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   MPF brand variables — change once, applies site-wide.
   ============================================================ */
:root {
  --mpf-orange: #FF6B1F;
  --mpf-orange-soft: rgba(255, 107, 31, 0.10);
  --mpf-orange-border: rgba(255, 107, 31, 0.30);
  --mpf-stone-50: #fafaf9;
  --mpf-stone-100: #f5f5f4;
  --mpf-stone-200: #e7e5e4;
  --mpf-stone-400: #a8a29e;
  --mpf-stone-600: #57534e;
  --mpf-stone-900: #1c1917;
  --mpf-stone-950: #0c0a09;
  --mpf-white: #ffffff;

  /* Brand typography: headings use mpf-neue, body/content uses mpf-typewriter. */
  --mpf-neue: 'mpf-neue', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mpf-typewriter: 'mpf-typewriter', 'Courier New', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --mpf-font: var(--mpf-typewriter);
}

/* ============================================================
   Global typography
   ============================================================ */
body,
body.elementor-page,
body.elementor-page .elementor-widget-text-editor,
body.elementor-page p,
body.elementor-page li,
body.elementor-page span,
body.elementor-page input,
body.elementor-page textarea,
body.elementor-page button {
  font-family: var(--mpf-typewriter) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.elementor-widget-heading .elementor-heading-title,
.mpf-neue,
.mpf-h,
.mpf-h-xl,
.mpf-h-lg,
.mpf-h-md,
.mpf-hero-wordmark,
.mpf-hero-wordmark-wide {
  font-family: var(--mpf-neue) !important;
}

.mpf-typewriter {
  font-family: var(--mpf-typewriter) !important;
}

body { color: var(--mpf-stone-900); background: var(--mpf-white); }

/* v3.2: site-wide safety net against horizontal scroll. Anything that tries
   to overflow horizontally (slider clones, oversized wordmarks, off-canvas
   menus) gets clipped silently rather than expanding the document width.
   v3.2.2: also disables Safari's swipe-back-to-navigate gesture so the
   "swipe right to open menu" gesture doesn't trigger browser back instead. */
html, body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

/* v3.2.2: when the mobile menu is open, freeze the body and hide every
   floating UI element so the menu fills the screen cleanly. */
body.mpf-menu-open {
  overflow: hidden !important;
  height: 100vh;
  touch-action: none;
}
body.mpf-menu-open .mpf-whatsapp-btn,
body.mpf-menu-open [class*="scroll-to-top"],
body.mpf-menu-open [class*="back-to-top"],
body.mpf-menu-open [id*="scroll-to-top"],
body.mpf-menu-open [id*="back-to-top"],
body.mpf-menu-open [class*="elementor-button-link"][href="#"] {
  display: none !important;
}

::selection { background: var(--mpf-orange); color: var(--mpf-white); }

/* Hide the default WP page title that Hello Elementor inserts.
   When the user sets the page template to "Elementor Canvas" this is moot,
   but if they forget, this is a safety net. */
.entry-header .entry-title,
.page .page-header .entry-title { display: none; }

/* ============================================================
   Helpers — drop into any Elementor widget's "Advanced → CSS Classes"
   ============================================================ */
.mpf-orange,
.mpf-orange .elementor-heading-title { color: var(--mpf-orange) !important; }
.mpf-bg-orange { background-color: var(--mpf-orange) !important; color: var(--mpf-white) !important; }
.mpf-bg-stone-50 { background-color: var(--mpf-stone-50) !important; }
.mpf-bg-stone-900 { background-color: var(--mpf-stone-900) !important; color: var(--mpf-white) !important; }

/* Decorative orange underline behind heading text */
.mpf-underline,
.mpf-underline .elementor-heading-title {
  text-decoration: underline;
  text-decoration-color: var(--mpf-orange-border);
  text-underline-offset: 8px;
  text-decoration-thickness: 6px;
}

/* ============================================================
   Hero wordmark — giant condensed white "MPF"
   Targets both the wrapper class and the inner heading title element
   to beat Elementor's default heading styles.
   ============================================================ */
.mpf-hero-wordmark,
.mpf-hero-wordmark .elementor-heading-title {
  font-family: var(--mpf-neue) !important;
  font-size: clamp(7rem, 18vw, 22rem) !important;
  font-weight: 900 !important;
  line-height: 0.85 !important;
  letter-spacing: -0.05em !important;
  text-transform: uppercase !important;
  color: var(--mpf-white) !important;
  text-align: center !important;
  margin: 0 !important;
}

@media (max-width: 767px) {
  .mpf-hero-wordmark,
  .mpf-hero-wordmark .elementor-heading-title {
    font-size: 28vw !important;
  }
}

/* Wide-word variant — for 7-9 character hero words like OVERFLOW that
   would overflow at 18vw. Caps at the visible viewport so the word always
   fits between the navbar's left/right edges. */
.mpf-hero-wordmark-wide,
.mpf-hero-wordmark-wide .elementor-heading-title {
  font-family: var(--mpf-neue) !important;
  font-size: clamp(3rem, 11vw, 13rem) !important;
  font-weight: 900 !important;
  line-height: 0.95 !important;
  letter-spacing: -0.04em !important;
  text-transform: uppercase !important;
  color: var(--mpf-white) !important;
  text-align: center !important;
  margin: 0 !important;
  white-space: nowrap;
  /* If a wider word still pushes against the edges, the wrapper section's
     overflow:hidden + body overflow-x:hidden clip it cleanly. */
}
@media (max-width: 767px) {
  .mpf-hero-wordmark-wide,
  .mpf-hero-wordmark-wide .elementor-heading-title {
    font-size: 15vw !important;
  }
}

/* Section heading style — heavy Inter, tight tracking. Apply class "mpf-h" */
.mpf-h,
.mpf-h .elementor-heading-title {
  font-family: var(--mpf-neue) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.05 !important;
}

/* ============================================================
   Pill button (Visit Us) — beats Elementor's default green/blue button
   Targets both the wrapper class and the inner .elementor-button element.
   ============================================================ */
.mpf-pill .elementor-button-wrapper,
.mpf-pill .elementor-button-wrapper a,
.mpf-pill a.elementor-button,
.mpf-pill button.elementor-button {
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid currentColor !important;
  border-radius: 9999px !important;
  padding: 14px 40px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  transition: all .25s ease !important;
  box-shadow: none !important;
}
.mpf-pill .elementor-button-wrapper a:hover,
.mpf-pill a.elementor-button:hover {
  background: var(--mpf-white) !important;
  color: var(--mpf-stone-900) !important;
}

/* Solid orange pill — apply class "mpf-pill-orange" */
.mpf-pill-orange .elementor-button {
  background: var(--mpf-orange) !important;
  color: var(--mpf-white) !important;
  border-color: var(--mpf-orange) !important;
}

/* Solid black pill — apply class "mpf-pill-black" */
.mpf-pill-black .elementor-button {
  background: var(--mpf-stone-900) !important;
  color: var(--mpf-white) !important;
  border-color: var(--mpf-stone-900) !important;
}

/* ============================================================
   Rounded image cards
   ============================================================ */
.mpf-rounded-3xl img,
.mpf-rounded-3xl .elementor-image img {
  border-radius: 3rem !important;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.mpf-rounded-2xl img,
.mpf-rounded-2xl .elementor-image img {
  border-radius: 2rem !important;
}

/* ============================================================
   Cards
   ============================================================ */
.mpf-card-dark {
  background: var(--mpf-stone-900);
  color: var(--mpf-white);
  border-radius: 3rem;
  padding: 3rem;
}
.mpf-card-dark h3, .mpf-card-dark h4 { color: var(--mpf-white); }

.mpf-card-light {
  background: var(--mpf-white);
  border-radius: 2rem;
  border: 1px solid var(--mpf-stone-200);
  padding: 2rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.mpf-card-light:hover {
  border-color: var(--mpf-orange-border);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

.mpf-accent-stripe { border-left: 4px solid var(--mpf-orange); padding-left: 2rem; }
.mpf-accent-stripe-muted { border-left: 4px solid var(--mpf-stone-200); padding-left: 2rem; }

/* ============================================================
   FAQ accordion — kill default +/- icons, draw a clean CSS chevron
   ============================================================ */
.mpf-faq .elementor-accordion-icon,
.mpf-faq .elementor-accordion-icon-closed,
.mpf-faq .elementor-accordion-icon-opened { display: none !important; }

.mpf-faq .elementor-accordion-item {
  border: 1px solid var(--mpf-stone-200) !important;
  border-radius: 1rem !important;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--mpf-white);
  transition: border-color .2s ease;
}
.mpf-faq .elementor-accordion-item:hover { border-color: var(--mpf-orange-border) !important; }

.mpf-faq .elementor-tab-title {
  position: relative;
  padding: 1.5rem 4rem 1.5rem 1.5rem !important;
  background: var(--mpf-stone-50) !important;
  font-family: var(--mpf-neue) !important;
  font-weight: 700 !important;
  font-size: 1.125rem !important;
  border: 0 !important;
  color: var(--mpf-stone-900) !important;
  cursor: pointer;
  display: block;
}
.mpf-faq .elementor-tab-title.elementor-active {
  background: var(--mpf-orange) !important;
  color: var(--mpf-white) !important;
}
.mpf-faq .elementor-tab-title a { color: inherit !important; text-decoration: none !important; }

.mpf-faq .elementor-tab-title::after {
  content: "";
  position: absolute;
  right: 1.75rem;
  top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  transition: transform .25s ease;
}
.mpf-faq .elementor-tab-title.elementor-active::after {
  transform: translateY(-30%) rotate(135deg);
}

.mpf-faq .elementor-tab-content {
  padding: 1.5rem !important;
  background: var(--mpf-white) !important;
  font-family: var(--mpf-typewriter) !important;
  color: var(--mpf-stone-600) !important;
  line-height: 1.7;
  border: 0 !important;
  border-top: 1px solid var(--mpf-stone-100) !important;
}

/* v3.7.2 — FAQ typography: question/title uses mpf-neue; answers/content use mpf-typewriter. */
.mpf-faq .elementor-heading-title,
.mpf-faq .elementor-accordion-title,
.mpf-faq .elementor-tab-title,
.mpf-faq .elementor-tab-title a {
  font-family: var(--mpf-neue) !important;
}

.mpf-faq .elementor-tab-content,
.mpf-faq .elementor-tab-content p,
.mpf-faq .elementor-tab-content li,
.mpf-faq .elementor-tab-content span,
.mpf-faq .elementor-tab-content div,
.mpf-faq .elementor-tab-content a {
  font-family: var(--mpf-typewriter) !important;
}

/* ============================================================
   v3.3: Live YouTube banner (auto-detects MPF / Overflow streams)
   ============================================================ */
.mpf-live-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60; /* above navbar (z=50), below mobile menu (z=9999) */
  height: 52px;
  display: flex;
  align-items: stretch;
  background: linear-gradient(90deg, #b91c1c 0%, #ef4444 50%, #b91c1c 100%);
  background-size: 200% 100%;
  animation: mpfLiveBannerSlide 14s linear infinite;
  color: var(--mpf-white);
  font-family: var(--mpf-font);
  box-shadow: 0 8px 24px -12px rgba(220,38,38,0.6);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
  pointer-events: none;
}
body.mpf-live-banner-active .mpf-live-banner {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
@keyframes mpfLiveBannerSlide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* When the banner is active, push the navbar (and any other top-fixed UI)
   down by 52px so it sits below the banner. */
body.mpf-live-banner-active .mpf-nav {
  top: 52px;
}

.mpf-live-banner__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 4rem 0 1rem;
  color: var(--mpf-white) !important;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: center;
}
.mpf-live-banner__pulse {
  position: relative;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  flex: 0 0 12px;
}
.mpf-live-banner__pulse span {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #fff;
  animation: mpfLivePulse 1.4s ease-out infinite;
}
@keyframes mpfLivePulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0;   }
}
.mpf-live-banner__badge {
  background: rgba(0,0,0,0.25);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  flex-shrink: 0;
}
.mpf-live-banner__text {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mpf-live-banner__text strong { font-weight: 800; }
.mpf-live-banner__cta {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}
.mpf-live-banner__close {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--mpf-white);
  border: 0;
  cursor: pointer;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  opacity: 0.85;
  transition: background .2s ease, opacity .2s ease;
}
.mpf-live-banner__close:hover {
  background: rgba(0,0,0,0.2);
  opacity: 1;
}

@media (max-width: 600px) {
  .mpf-live-banner { height: 48px; }
  body.mpf-live-banner-active .mpf-nav { top: 48px; }
  .mpf-live-banner__link { padding: 0 3rem 0 0.75rem; gap: 0.5rem; }
  .mpf-live-banner__text { font-size: 0.8rem; }
  .mpf-live-banner__cta { display: block; font-size: 0.7rem; }
  .mpf-live-banner__badge { font-size: 0.6rem; padding: 3px 8px; }
}

/* ============================================================
   Floating WhatsApp button (rendered globally by functions.php)
   ============================================================ */
.mpf-whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  background: #FF4500;
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
  text-decoration: none !important;
  transition: transform .2s ease;
  text-transform: lowercase;
}
.mpf-whatsapp-btn:hover { transform: scale(1.05); }
.mpf-whatsapp-btn svg { width: 20px; height: 20px; }

/* v3.2.2: icon-only WhatsApp on phones (saves space, matches native chat FABs). */
@media (max-width: 640px) {
  .mpf-whatsapp-btn {
    padding: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    bottom: 1.25rem;
    right: 1.25rem;
    gap: 0;
    justify-content: center;
  }
  .mpf-whatsapp-btn span { display: none; }
  .mpf-whatsapp-btn svg { width: 26px; height: 26px; }
}

/* ============================================================
   Responsive nudges
   ============================================================ */
@media (max-width: 767px) {
  .mpf-card-dark { padding: 2rem; border-radius: 2rem; }
  .mpf-rounded-3xl img,
  .mpf-rounded-3xl .elementor-image img { border-radius: 2rem !important; }
}

/* v3.6 — requested global fixes */
.mpf-pill-orange a.elementor-button,
.mpf-pill-orange .elementor-button,
.mpf-pill-orange .elementor-button-wrapper a {
  background: #FF6B1F !important;
  background-color: #FF6B1F !important;
  color: #ffffff !important;
  border-color: #FF6B1F !important;
}
.mpf-pill-orange a.elementor-button:hover,
.mpf-pill-orange .elementor-button:hover,
.mpf-pill-orange .elementor-button-wrapper a:hover {
  background: #1c1917 !important;
  background-color: #1c1917 !important;
  color: #ffffff !important;
  border-color: #1c1917 !important;
}
.mpf-card-light { height:100%; display:flex; flex-direction:column; }
.mpf-card-light > .elementor-widget-container { flex:1; display:flex; flex-direction:column; }
@media (max-width: 767px) {
  .mpf-hero-wordmark-wide,
  .mpf-hero-wordmark-wide .elementor-heading-title,
  .mpf-hero-wordmark-services,
  .mpf-hero-wordmark-services .elementor-heading-title {
    font-size: clamp(3.2rem, 12vw, 4.9rem) !important;
    line-height: .95 !important;
    letter-spacing: -.055em !important;
    white-space: nowrap !important;
    max-width: 96vw !important;
  }
}

/* ============================================================
   v3.7.3 — Heading span typography fix
   Keeps coloured words/spans (for example orange "mpf") visually consistent
   with the rest of the heading. The colour remains unchanged; only the font
   family/typographic rhythm inherits from the parent heading.
   ============================================================ */
h1 span, h2 span, h3 span, h4 span, h5 span, h6 span,
.elementor-widget-heading .elementor-heading-title span,
.mpf-neue span,
.mpf-h span,
.mpf-h-xl span,
.mpf-h-lg span,
.mpf-h-md span,
.mpf-hero-wordmark span,
.mpf-hero-wordmark-wide span,
.mpf-yt-title span,
.mpf-services-title span,
.mpf-testimonials-slider h1 span,
.mpf-testimonials-slider h2 span,
.mpf-testimonials-slider h3 span {
  font-family: inherit !important;
  font-style: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
}
