/* ============================================================
   Beis Medrash Radishitz — Custom Stylesheet
   Design system from Elementor backup (March 2024)
   ============================================================ */

:root {
  --color-primary:   #1a4480;  /* deep navy blue */
  --color-secondary: #1E2D3D;  /* dark navy      */
  --color-text:      #3d3d3d;  /* near-dark gray */
  --color-accent:    #61CE70;  /* green */
  --color-white:     #ffffff;
  --color-dark:      #111827;
  --color-gold:      #B8972E;  /* warm gold */
  --font-heading:    'Playfair Display', Georgia, serif;
  --font-serif:      'Playfair Display', Georgia, serif;
  --font-body:       'Lato', 'Roboto', sans-serif;
  --container:       1140px;
  --header-height:   80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: #fff;
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- LAYOUT ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--gray { background: #f7f8fa; }
.section--dark { background: var(--color-secondary); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--color-gold); text-decoration: none; }
.section--dark a:hover { color: #d4a830; }

/* Centered section header (used in dark section) */
.section-header-centered {
  text-align: center;
  margin-bottom: 52px;
}

.section-header-centered h2 {
  margin-bottom: 16px;
}

.section-header-centered .section-subtext {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-top: 8px;
}

/* Section-tag on dark background */
.section--dark .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
}
.section--dark .section-tag::before,
.section--dark .section-tag::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.5;
}

/* ---- HEADER ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
}

.site-logo img {
  height: 56px;
  width: auto;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo-text .shul-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.1;
}

/* Nav */
.site-nav { display: flex; align-items: center; gap: 36px; list-style: none; }
.site-nav a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
  text-decoration: none;
}

/* Hamburger */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 25px; height: 2px; background: var(--color-secondary); transition: all 0.3s; }

/* ---- HERO ---- */
.hero {
  margin-top: var(--header-height);
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('images/synagogue-prayer.jpg');
  background-size: cover;
  background-position: center 55%;
  filter: brightness(0.45);
  transition: transform 8s ease;
}

.hero:hover .hero__bg { transform: scale(1.04); }

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero__logo {
  width: 140px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.6));
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.55);
}

.hero__title span { color: var(--color-gold); }

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.hero__cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 14px 40px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: all 0.25s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-gold);
  color: #fff;
  border-color: var(--color-gold);
}
.btn-primary:hover { background: #9c7c22; border-color: #9c7c22; }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.75);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* Nav donate button */
.site-nav a.nav-donate {
  background: var(--color-gold);
  color: #fff;
  border: 2px solid var(--color-gold);
  border-radius: 2px;
  padding: 8px 22px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}
.site-nav a.nav-donate:hover,
.site-nav a.nav-donate:focus {
  background: #9c7c22;
  border-color: #9c7c22;
  color: #fff;
}

/* ---- WELCOME SECTION ---- */
.welcome {
  text-align: center;
}

.welcome .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
}
.welcome .section-tag::before,
.welcome .section-tag::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.6;
}

.welcome h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-secondary);
}

.welcome p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ---- FEATURE CARDS ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.card {
  background: #fff;
  border-radius: 3px;
  border-top: 3px solid var(--color-gold);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  padding: 40px 32px;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none !important;
  display: block;
  color: inherit;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.11);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  font-size: 1.5rem;
  color: var(--color-gold);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--color-secondary);
}
.card p { font-size: 0.95rem; line-height: 1.75; color: #555; }

/* ---- TIMES SECTION ---- */
.times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 0;
}

.time-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-top: 2px solid var(--color-gold);
  border-radius: 4px;
  padding: 32px 24px;
  text-align: center;
  transition: background 0.2s, transform 0.2s;
}

.time-block:hover {
  background: rgba(255,255,255,0.07);
  transform: translateY(-3px);
}

.time-block h3 {
  color: var(--color-gold);
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.time-block .time-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
  font-weight: 600;
}

.time-block .time-note {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
}

/* ---- PAGE HEADER (inner pages) ---- */
.page-header {
  margin-top: var(--header-height);
  background: linear-gradient(135deg, var(--color-secondary) 0%, #0d1f2d 100%);
  padding: 64px 0;
  text-align: center;
  border-bottom: 3px solid var(--color-gold);
}

.page-header h1 {
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.page-header p {
  color: rgba(255,255,255,0.7);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ---- IFRAME / EMBED SECTION ---- */
.iframe-section { padding: 48px 0; }

/* Info card above the embed */
.embed-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #f7f8fa;
  border: 1px solid #e4e7eb;
  border-left: 4px solid var(--color-gold);
  border-radius: 4px;
  padding: 20px 28px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.embed-intro__text h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-secondary);
  margin-bottom: 5px;
}

.embed-intro__text p {
  font-size: 0.88rem;
  color: #666;
  margin: 0;
  line-height: 1.6;
}

.btn-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-external:hover { background: #0a1520; color: #fff; }

/* Source header strip sitting directly above the iframe */
.embed-source-bar {
  background: var(--color-secondary);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  border-radius: 4px 4px 0 0;
}

.embed-source-bar__label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.embed-source-bar__link {
  font-size: 0.78rem;
  color: var(--color-gold);
  text-decoration: none;
  font-weight: 600;
}
.embed-source-bar__link:hover { text-decoration: underline; }

.iframe-wrapper {
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(0,0,0,0.1);
  border: 1px solid #e4e7eb;
  border-top: none;
}

.iframe-wrapper iframe {
  display: block;
  width: 100%;
  border: none;
}

/* ---- FOOTER ---- */
.site-footer {
  background: #0a1520;
  color: rgba(255,255,255,0.8);
  padding: 56px 0 0;
  border-top: 3px solid var(--color-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
}

.footer-col h4 {
  font-family: var(--font-body);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-gold);
  display: inline-block;
}

.footer-col p { font-size: 0.9rem; line-height: 1.8; }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--color-primary); }

.footer-logo { width: 80px; margin-bottom: 16px; }

.footer-bottom {
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .site-nav { display: none; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: #fff; padding: 20px 24px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 1rem; padding: 10px 0; border-bottom: 1px solid #eee; }
  .hamburger { display: flex; }
  .hero { min-height: 500px; }
  .hero__logo { width: 100px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards-grid { grid-template-columns: 1fr; }
  .times-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .times-grid { grid-template-columns: 1fr; }
}

/* ---- DonorFuse popup overrides ----
   embed.js injects: #donorfuse-popup-wpr (overlay), #donorfuse-popup-id (container), and an <iframe> inside.
   It sets inline (non-!important) styles, so !important here wins. Navbar is z-index:1000, so we sit well above it. */
#donorfuse-popup-wpr {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.6) !important;
  z-index: 2147483000 !important;
}
#donorfuse-popup-id {
  position: fixed !important;
  inset: 0 !important;
  margin: auto !important;
  transform: none !important;
  width: min(500px, 94vw) !important;
  height: min(90vh, 90dvh) !important;
  max-height: 90dvh !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  z-index: 2147483001 !important;
}
#donorfuse-popup-id iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: inherit !important;
}
/* Full-screen on small phones so nothing is clipped; dvh keeps the bottom button visible under mobile toolbars */
@media (max-width: 599px) {
  #donorfuse-popup-id {
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
  #donorfuse-popup-id iframe { border-radius: 0 !important; }
}
/* Lock background scroll while the popup is open */
body.donorfuse-open { overflow: hidden !important; }
