/* ═══════════════════════════════════════════════════════════════
   Rabbi Website - Main Stylesheet
   Direction: RTL | Language: Hebrew
   Aesthetic: Moroccan-Jewish — Warm Amber, Parchment, Deep Brown
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@300;400;500;700;900&family=Noto+Serif+Hebrew:wght@300;400;600;700&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Dark tones — deep warm brown from image shadows */
  --navy:       #1c0e04;
  --navy-mid:   #2e1a0a;
  --navy-light: #432510;

  /* Gold / Amber — from the lantern and light rays */
  --gold:       #c8831a;
  --gold-light: #e6aa40;
  --gold-pale:  #f0d890;
  /* Accessible gold for TEXT on light/cream backgrounds (WCAG 2.0 AA, >=4.5:1) */
  --gold-text:  #8a5810;

  /* Parchment / Cream — from the central glow of the image */
  --cream:      #fdf6e8;
  --cream-dark: #ede3c8;
  --white:      #fff8f0;

  /* Moroccan teal — from the tile details */
  --teal:       #1e6060;
  --teal-light: #2a8a8a;

  /* Text */
  --text-dark:  #1c0e04;
  --text-mid:   #5a3a1a;
  --text-light: #9a7a5a;

  --font-display: 'Frank Ruhl Libre', 'Times New Roman', serif;
  --font-body:    'Noto Serif Hebrew', 'David', serif;

  --shadow-sm:   0 2px 8px rgba(28,14,4,0.12);
  --shadow-md:   0 8px 32px rgba(28,14,4,0.20);
  --shadow-lg:   0 20px 60px rgba(28,14,4,0.30);
  --shadow-gold: 0 4px 20px rgba(200,131,26,0.35);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  direction: rtl;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  /* Moroccan background — fixed so it stays in place while scrolling */
  background-image: url('../img/marocn_background_01.png');
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  background-color: #1c0e04;
}

a { color: var(--gold-text); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--navy); }
/* Links on dark sections stay bright gold (accessible on dark) */
.section-alt a, .page-hero a, footer a { color: var(--gold); }
.section-alt a:hover, .page-hero a:hover, footer a:hover { color: var(--gold-light); }

/* ─── Accessibility: visible keyboard focus (WCAG 2.4.7) ─────── */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ─── Accessibility: skip-to-content link (WCAG 2.4.1) ──────── */
.skip-link {
  position: absolute;
  right: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus {
  right: 0;
  color: #fff;
}

img { max-width: 100%; height: auto; display: block; }

/* ─── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.3rem; }

p { margin-bottom: 1.2rem; }

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Sections sit as semi-transparent parchment panels over the background */
.section {
  padding: 80px 0;
  background: rgba(253,246,232,0.90);
  backdrop-filter: blur(3px);
}

.section-alt {
  background: rgba(28,14,4,0.88);
  backdrop-filter: blur(3px);
  color: var(--cream);
}

.section-alt h2, .section-alt h3 { color: var(--gold-light); }
.section-alt p { color: var(--cream-dark); }

/* ─── Header / Navigation ───────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: rgba(28,14,4,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(200,131,26,0.3);
  transition: var(--transition);
}

#site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-logo .logo-emblem {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  font-weight: 900;
  box-shadow: var(--shadow-gold);
}

.site-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo .logo-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.site-logo .logo-subtitle {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.5px;
}

/* Navigation */
.primary-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.primary-nav a {
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav .current-menu-item a {
  color: var(--gold-light);
  background: rgba(200,131,26,0.15);
}

.nav-cta a {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy) !important;
  font-weight: 700 !important;
  padding: 8px 20px !important;
  border-radius: 50px !important;
}

.nav-cta a:hover {
  background: var(--gold-light) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: var(--transition);
}

/* ─── Hero Section ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 70px;
  /* Let body background show — just a warm dark overlay for text contrast */
  background: transparent;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(200,131,26,0.10) 0%, transparent 60%),
    linear-gradient(to left, rgba(28,14,4,0.35) 0%, rgba(28,14,4,0.70) 55%, rgba(28,14,4,0.80) 100%);
}

/* Remove the old geometric pattern — image provides the texture */
.hero-pattern { display: none; }


.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: center;
}

.hero-text .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,131,26,0.18);
  border: 1px solid rgba(200,131,26,0.40);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.82rem;
  color: var(--gold-light);
  margin-bottom: 28px;
}

.hero-text h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(28,14,4,0.6);
}

.hero-text .hero-title-gold {
  color: var(--gold-light);
  display: block;
}

.hero-text .hero-title-rabbi {
  display: block;
  color: var(--cream);
  font-size: 0.5em;
  font-weight: 600;
  margin-top: 6px;
  white-space: nowrap;
  overflow: visible;
}

.hero-text .hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.8;
  text-shadow: 0 1px 8px rgba(28,14,4,0.5);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(200,131,26,0.3);
}

.hero-stat .stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(28,14,4,0.4);
}

.hero-stat .stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

/* Hero image card */
.hero-image-card { position: relative; }

.hero-image-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(28,14,4,0.6);
  border: 2px solid rgba(200,131,26,0.25);
}

.hero-image-frame img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.hero-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,14,4,0.6) 0%, transparent 50%);
}

.hero-image-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-gold);
  text-align: center;
  z-index: 3;
}

.hero-image-badge .badge-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
}

.hero-image-badge .badge-text {
  font-size: 0.75rem;
  color: var(--navy-mid);
  font-weight: 600;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200,131,26,0.5);
  color: var(--navy);
}

.btn-outline {
  background: rgba(253,246,232,0.15);
  color: var(--white);
  border: 1.5px solid rgba(253,246,232,0.5);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(253,246,232,0.25);
  border-color: rgba(253,246,232,0.8);
  color: var(--white);
}

.btn-dark {
  background: var(--navy);
  color: var(--gold-light);
  border: 1px solid rgba(200,131,26,0.35);
}

.btn-dark:hover {
  background: var(--navy-mid);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-lg  { padding: 16px 36px; font-size: 1rem; }
.btn-sm  { padding: 8px 18px;  font-size: 0.85rem; }

/* ─── Section Headers ───────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-text);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 { margin-bottom: 16px; }

.section-header p {
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section-header.light h2          { color: var(--gold-light); }
.section-header.light p            { color: rgba(253,246,232,0.75); }
.section-header.light .section-eyebrow { color: var(--gold); }

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: 20px auto 0;
  border-radius: 2px;
}

/* ─── Video Cards ───────────────────────────────────────────── */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.video-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(200,131,26,0.15);
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(200,131,26,0.4);
}

.video-thumbnail {
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--navy);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover .video-thumbnail img { transform: scale(1.04); }

.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28,14,4,0.35);
  transition: var(--transition);
}

.video-play-btn .play-icon {
  width: 56px;
  height: 56px;
  background: rgba(200,131,26,0.90);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.video-play-btn .play-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--navy);
  margin-right: -3px;
}

.video-card:hover .play-icon {
  transform: scale(1.1);
  background: var(--gold);
}

.video-duration {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(28,14,4,0.80);
  color: var(--cream);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.video-info { padding: 20px; }

.video-info .video-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--navy);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-description {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.video-meta .video-date::before   { content: '📅 '; }
.video-meta .video-length::before { content: '⏱ '; }
.video-meta .video-views::before  { content: '👁 '; }

.video-category-badge {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid rgba(200,131,26,0.35);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
}

/* ─── Product Cards ─────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(200,131,26,0.12);
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200,131,26,0.35);
}

.product-badge-new {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  z-index: 2;
}

.product-image {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--cream-dark);
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img { transform: scale(1.04); }

.product-info { padding: 20px; }

.product-info h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.product-info .product-desc {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 16px;
  line-height: 1.6;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}

.product-price .currency {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
}

/* ─── Appointment Section ───────────────────────────────────── */
.appointment-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.calendar-widget {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(200,131,26,0.2);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calendar-header h3 {
  font-size: 1.1rem;
  color: var(--navy);
}

.calendar-nav-btn {
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.calendar-nav-btn:hover {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.calendar-day-name {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  padding: 6px 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: default;
  transition: var(--transition);
  font-family: var(--font-display);
}

.calendar-day.available {
  background: rgba(200,131,26,0.12);
  color: var(--navy);
  cursor: pointer;
  border: 1px solid rgba(200,131,26,0.30);
  font-weight: 600;
}

.calendar-day.available:hover {
  background: var(--gold);
  color: var(--navy);
  transform: scale(1.1);
  box-shadow: var(--shadow-gold);
}

.calendar-day.selected {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.calendar-day.today {
  border: 2px solid var(--gold);
  font-weight: 700;
}

.calendar-day.empty,
.calendar-day.past,
.calendar-day.unavailable {
  color: var(--text-light);
  opacity: 0.4;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.time-slot {
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.time-slot:hover, .time-slot.selected {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--navy);
}

/* Appointment Form */
.appointment-form-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(200,131,26,0.15);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-group label .required { color: var(--gold); }

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream);
  transition: var(--transition);
  direction: rtl;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(200,131,26,0.14);
}

textarea.form-control { resize: vertical; min-height: 100px; }

.form-notice {
  background: var(--gold-pale);
  border: 1px solid rgba(200,131,26,0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 24px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ─── Chat Widget ───────────────────────────────────────────── */
#chat-bubble {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 900;
}

.chat-toggle-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(200,131,26,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.5rem;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(200,131,26,0.55);
}

.chat-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #c0392b;
  border-radius: 50%;
  font-size: 0.72rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid var(--cream);
}

.chat-window {
  position: absolute;
  bottom: 76px;
  left: 0;
  width: 360px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(28,14,4,0.30);
  display: flex;
  flex-direction: column;
  height: 500px;
  overflow: hidden;
  border: 1px solid rgba(200,131,26,0.2);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  transform-origin: bottom left;
}

.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(200,131,26,0.2);
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
}

.chat-header-info h4 { color: var(--white); font-size: 0.95rem; margin: 0; }

.chat-status {
  font-size: 0.75rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #4caf50;
  border-radius: 50%;
}

.chat-close {
  margin-right: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: var(--transition);
}

.chat-close:hover { color: white; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  background: var(--cream);
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 2px; }

.chat-msg { max-width: 80%; animation: msgFadeIn 0.25s ease; }

@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot  { align-self: flex-end; }
.chat-msg.user { align-self: flex-start; }

.chat-msg .msg-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.chat-msg.bot .msg-bubble {
  background: var(--navy);
  color: var(--cream);
  border-bottom-right-radius: 4px;
}

.chat-msg.user .msg-bubble {
  background: var(--gold-pale);
  color: var(--navy);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(200,131,26,0.30);
}

.chat-msg .msg-time {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 4px;
  padding: 0 6px;
}

.chat-msg.bot  .msg-time { text-align: right; }
.chat-msg.user .msg-time { text-align: left; }

.chat-typing {
  display: flex;
  gap: 5px;
  padding: 12px 16px;
  background: var(--navy);
  border-radius: 18px;
  border-bottom-right-radius: 4px;
  width: fit-content;
  align-self: flex-end;
}

.chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  gap: 10px;
  background: var(--white);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  border: 1.5px solid var(--cream-dark);
  border-radius: 50px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  direction: rtl;
  transition: var(--transition);
  background: var(--cream);
}

.chat-input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover { background: var(--gold); }

.chat-send-btn svg { width: 18px; height: 18px; fill: var(--gold); }
.chat-send-btn:hover svg { fill: var(--navy); }

/* ─── Footer ────────────────────────────────────────────────── */
#site-footer {
  background: rgba(28,14,4,0.95);
  backdrop-filter: blur(10px);
  color: rgba(253,246,232,0.75);
  padding: 60px 0 0;
  border-top: 1px solid rgba(200,131,26,0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-text { color: var(--white); margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  color: var(--gold-light);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200,131,26,0.25);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
  color: rgba(253,246,232,0.60);
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-col ul a:hover { color: var(--gold-light); padding-right: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(253,246,232,0.08);
  padding: 20px 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(253,246,232,0.35);
}

/* ─── Admin Bar Offset ──────────────────────────────────────── */
.admin-bar #site-header { top: 32px; }

/* ─── Page Hero (inner pages) ───────────────────────────────── */
.page-hero {
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: rgba(28,14,4,0.72);
  backdrop-filter: blur(2px);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 50% 100%, rgba(200,131,26,0.08), transparent);
}

.page-hero h1 {
  color: var(--white);
  position: relative;
  text-shadow: 0 2px 16px rgba(28,14,4,0.5);
}

.page-hero .breadcrumb {
  color: rgba(253,246,232,0.55);
  font-size: 0.85rem;
  margin-top: 12px;
  position: relative;
}
.page-hero .breadcrumb a { color: var(--gold); }

/* ─── Notices & Alerts ──────────────────────────────────────── */
.notice {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.notice-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.notice-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.notice-info    { background: var(--gold-pale); border: 1px solid rgba(200,131,26,0.3); color: var(--text-dark); }

/* ─── Loading spinner ───────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(200,131,26,0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-image-card { display: none; }
  .appointment-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .primary-nav { display: none; }
  .primary-nav.open {
    display: block;
    position: absolute;
    top: 70px; right: 0; left: 0;
    background: rgba(28,14,4,0.97);
    padding: 16px;
    backdrop-filter: blur(14px);
  }
  .primary-nav.open ul { flex-direction: column; }
  .menu-toggle { display: flex; flex-direction: column; }
  .section { padding: 60px 0; }
  .videos-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .chat-window { width: 92vw; left: 50%; transform: translateX(-50%) scale(0.9) translateY(20px); }
  .chat-window.open { transform: translateX(-50%) scale(1) translateY(0); }
  #chat-bubble { left: 50%; transform: translateX(calc(-50% + 120px)); }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .container { padding: 0 16px; }
}

/* ─── Pidyon Nefesh Page ────────────────────────────────────── */

/* Two-column content layout */
.pidyon-content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: start;
}

.pidyon-text-block h3 {
  color: var(--navy);
  margin: 28px 0 12px;
  font-size: 1.2rem;
}

.pidyon-text-block h3:first-child { margin-top: 0; }

.pidyon-quote {
  background: var(--gold-pale);
  border-right: 4px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 28px 0 0;
}

.pidyon-quote p {
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.7;
  margin: 0 0 8px;
  font-style: italic;
}

.pidyon-quote cite {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  font-style: normal;
}

/* Info cards in the right column */
.pidyon-info-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pidyon-info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(200,131,26,0.18);
}

.pidyon-info-card h4 {
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cream-dark);
}

.pidyon-sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pidyon-sources-list li {
  font-size: 0.92rem;
  color: var(--text-mid);
  padding-right: 18px;
  position: relative;
}

.pidyon-sources-list li::before {
  content: '✦';
  position: absolute;
  right: 0;
  color: var(--gold);
  font-size: 0.65rem;
  top: 4px;
}

.pidyon-how-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pidyon-how-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.pidyon-how-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* Name input section */
.pidyon-name-section {
  max-width: 560px;
  margin: 0 auto 48px;
  text-align: center;
}

.pidyon-name-label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.pidyon-name-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 400;
  margin-top: 4px;
}

.pidyon-name-input {
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
}

/* Payment plans grid — 4 equal columns */
.pidyon-plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

.pidyon-plan {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1.5px solid rgba(200,131,26,0.18);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
}

.pidyon-plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200,131,26,0.4);
}

.pidyon-plan-featured {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.pidyon-plan-featured:hover {
  box-shadow: 0 12px 48px rgba(200,131,26,0.40);
}

.pidyon-plan-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
}

.pidyon-plan-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--cream-dark);
  background: var(--cream);
}

.pidyon-plan-featured .pidyon-plan-header {
  background: linear-gradient(135deg, rgba(200,131,26,0.10), rgba(200,131,26,0.03));
}

.pidyon-plan-title {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 2.6rem;
  display: flex;
  align-items: center;
}

.pidyon-plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 6px;
  line-height: 1;
}

.pidyon-price-currency {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}

.pidyon-price-amount {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--navy);
}

.pidyon-price-period {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-right: 4px;
}

.pidyon-plan-desc {
  font-size: 0.78rem;
  color: var(--text-light);
  margin: 0;
}

.pidyon-plan-body {
  flex: 1;
  padding: 20px 24px;
}

.pidyon-plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pidyon-plan-features li {
  font-size: 0.88rem;
  color: var(--text-mid);
  padding-right: 20px;
  position: relative;
  line-height: 1.4;
}

.pidyon-plan-features li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--teal);
  font-weight: 700;
}

.pidyon-feature-highlight {
  color: var(--navy) !important;
  font-weight: 600;
}

.pidyon-feature-highlight::before {
  color: var(--gold) !important;
}

.pidyon-plan-footer {
  padding: 20px 24px 28px;
}

.pidyon-plan-footer .btn {
  width: 100%;
  justify-content: center;
}

/* WhatsApp note */
.pidyon-whatsapp-note {
  text-align: center;
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--text-light);
}

.pidyon-whatsapp-note a { color: var(--gold); }

/* Responsive: collapse to 2 columns on tablet */
@media (max-width: 1100px) {
  .pidyon-plans-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .pidyon-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .pidyon-plans-grid { grid-template-columns: 1fr; }
  .pidyon-plan-title { min-height: auto; }
}

/* ─── Rabbi White — Front Page Hero (centered, full hero height) ── */
.hero-rabbi-white {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 70px;   /* start right below fixed nav */
  bottom: 0;
  width: 22%;
  background: url('../img/rabbi_white.jpeg') no-repeat bottom center;
  background-size: contain;
  opacity: 0.32;
  mask-image: linear-gradient(to top, black 55%, rgba(0,0,0,0.6) 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 55%, rgba(0,0,0,0.6) 80%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 1024px) {
  .hero-rabbi-white { width: 28%; opacity: 0.24; }
}

@media (max-width: 768px) {
  .hero-rabbi-white {
    width: 42%;
    opacity: 0.16;
    mask-image: linear-gradient(to top, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 40%, transparent 100%);
  }
}

/* ─── Rabbi Green — Shop / Product Pages ────────────────────────── */
body.woocommerce #site-content,
body.woocommerce-page #site-content,
body.single-product #site-content {
  position: relative;
}

body.woocommerce #site-content::before,
body.woocommerce-page #site-content::before,
body.single-product #site-content::before {
  content: '';
  position: fixed;
  left: 0;
  top: 70px;
  bottom: 0;
  width: 52%;
  background: url('../img/rabbit_green.jpeg') no-repeat center left;
  background-size: contain;
  opacity: 0.28;
  mask-image: linear-gradient(to right, black 20%, rgba(0,0,0,0.5) 55%, transparent 90%),
              linear-gradient(to top, transparent 0%, black 10%);
  -webkit-mask-image: linear-gradient(to right, black 20%, rgba(0,0,0,0.5) 55%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 768px) {
  body.woocommerce #site-content::before,
  body.woocommerce-page #site-content::before,
  body.single-product #site-content::before {
    width: 100%;
    opacity: 0.15;
    background-position: center top;
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
  }
}

/* ─── Single Post ─────────────────────────────────────────────── */
.single-post {
    max-width: 820px;
    margin: 0 auto;
}

.single-post__thumbnail {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.single-post__thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post__meta {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.single-post__content {
    font-family: var(--font-body);
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--text-dark);
}

.single-post__content p { margin-bottom: 1.4em; }

.single-post__content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: 16px 0;
    display: block;
}

.single-post__content h2,
.single-post__content h3 {
    font-family: var(--font-display);
    color: var(--navy);
    margin: 1.6em 0 0.6em;
}
