/* ===========================
   Ohel Moed - style.css
   Cleaned & fixed (nav only redesigned)
   =========================== */

/* === RESET / BASE === */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
* { box-sizing: border-box; }

html, body {
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
}

h2{
  text-transform: uppercase;
}

body {
  margin: 0;
  background: #ffffff;
  color: #0b0b0b;
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- SECTION WRAPPER ---------- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 80px 20px;
}

/* ========== TOP BAR (SHUL NAME) ========== */
.top-bar {
  width: 100%;
  background: white;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 50;
}

.top-bar.hidden { display: none; }

.top-bar-inner {
  max-width: 1400px;
  margin: auto;
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: #333;
}

/* ---------- HEADER / NAVBAR ---------- */
/* default state: transparent header (over hero) */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 120;
  background: rgba(255, 255, 255, 0.884);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  backdrop-filter: blur(4px);
  transition: background 0.28s ease, box-shadow 0.28s ease, padding 0.28s ease;
}

/* scrolled state -> white background */
.site-header.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* keep desktop centered items balanced */
  gap: 12px;
  transition: padding 0.3s ease;
}

.site-header.scrolled .header-inner {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* BRAND */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo { height: 48px; width: auto; display: block; }
.brand-name {
  font-weight: 800;
  letter-spacing: 1px;
  color: #0f0f30;
  font-size: 16px;
}

/* ---------- DESKTOP NAV ---------- */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  justify-content: center;
}

.desktop-nav a {
  font-weight: 700;
  color: #0b0b0b;
  padding: 8px 10px;
  transition: color 0.3s ease, background 0.25s ease;
}

.desktop-nav a:hover {
  color: #6d6d75;
}

/* CTA button in nav (desktop) */
.desktop-nav .cta {
  background: #ffffff;
  color: #000000;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
  border: 2px solid rgb(0,0,0);
  font-weight: 800;
}
.desktop-nav .cta:hover {
  background: #000000;
  color: #ffffff;
}

/* ---------- HAMBURGER BUTTON ---------- */
.hamburger {
  display: none;
  background: none;
  border: 0;
  font-size: 28px;
  cursor: pointer;
  color: black;
  z-index: 200;
  position: relative;
}
.hamburger .material-icons { font-size: 28px; color: black; }

/* ---------- DESKTOP DROPDOWNS (only active on desktop) ---------- */
/* Desktop dropdown containers */
.dropdown { position: relative; display: inline-block; }

/* Dropdown trigger button appearance (desktop) */
.dropbtn {
  background: transparent;
  border: none;
  color: rgb(0,0,0);
  font-size: 1rem;
  cursor: pointer;
  padding: 8px 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* dropdown content (desktop) */
.dropdown-content {
  display: none;
  position: absolute;
  background: #111827;
  min-width: 220px;
  z-index: 999;
  border-radius: 6px;
  padding: 10px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.dropdown-content a {
  display: block;
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.dropdown-content a:hover {
  background: rgb(0, 0, 0);
  color: white;
}

/* sub-dropdown (desktop) */
.dropdown-sub { position: relative; }
.subbtn {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
  text-align: left;
  padding: 10px 15px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.subbtn:hover{
  color: white;
  background-color: black;
}
.dropdown-sub-content {
  display: none;
  position: absolute;
  left: 220px;
  top: 0;
  background: #111827;
  min-width: 220px;
  z-index: 9999;
  border-radius: 6px;
  padding: 10px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.dropdown-content .dropdown-sub:hover > .dropdown-sub-content { display: block; }

/* Desktop-only hover behavior (only for large screens) */
@media (min-width: 901px) {
  .dropdown:hover .dropdown-content { display: block; }
}

/* Fix tiny text inside desktop dropdowns */
.dropdown-content a,
.dropdown-sub-content a {
  font-size: 15px;
  font-weight: 600;
}

/* ---------- MOBILE NAV (Rebuilt, off-canvas from right) ---------- */
/* Base: hide desktop nav on mobile, show hamburger */
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .hamburger { display: block; }
  .header-inner { justify-content: flex-end; } /* keep hamburger right */
}

/* Mobile menu container - off canvas right */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  max-width: 420px;
  background: rgba(11, 11, 11, 0.98);
  color: #ffffff;
  transform: translateX(110%);
  transition: transform 0.36s cubic-bezier(.22,.9,.22,1);
  z-index: 9999;
  padding: 28px;
  overflow-y: auto;
}

/* open state */
.mobile-menu.open {
  transform: translateX(0);
}

/* close button */
.close-x {
  position: absolute;
  right: 18px;
  top: 16px;
  font-size: 36px;
  background: none;
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

/* Mobile nav list structure (ul/li) */
.mobile-nav { width: 100%; }
.mobile-list {
  list-style: none;
  padding: 64px 0 24px 0;
  margin: 0;
}
.mobile-list li { margin-bottom: 14px; }

/* top-level links */
.mobile-list > li > a {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  display: block;
  padding: 8px 0;
}

/* CTA style in mobile list (keeps existing inline style optional) */
.mobile-list .cta {
  display: inline-block;
  font-weight: 800;
}

/* Dropdown toggle buttons */
.dropdown-toggle,
.subdropdown-toggle {
  width: 100%;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  text-align: left;
  padding: 8px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}



/* Animated dropdown menus (nested lists) */
.dropdown-menu,
.subdropdown-menu {
  list-style: none;
  padding-left: 14px;
  margin: 6px 0 0 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.34s ease, opacity 0.28s ease, transform 0.28s ease;
}

/* open state for nested lists */
.dropdown-menu.open,
.subdropdown-menu.open {
  max-height: 900px; /* plenty of room */
  opacity: 1;
  transform: translateY(0);
}

/* links inside dropdowns */
.dropdown-menu a,
.subdropdown-menu a {
  font-size: 18px;
  display: block;
  padding: 8px 0;
  color: #ffffff;
  font-weight: 700;
}

/* staggered link animation via transition-delays */
.dropdown-menu.open a:nth-child(1) { transition-delay: 0.04s; }
.dropdown-menu.open a:nth-child(2) { transition-delay: 0.08s; }
.dropdown-menu.open a:nth-child(3) { transition-delay: 0.12s; }
.dropdown-menu.open a:nth-child(4) { transition-delay: 0.16s; }
.dropdown-menu.open a:nth-child(5) { transition-delay: 0.20s; }

.subdropdown-menu.open a:nth-child(1) { transition-delay: 0.04s; }
.subdropdown-menu.open a:nth-child(2) { transition-delay: 0.08s; }
.subdropdown-menu.open a:nth-child(3) { transition-delay: 0.12s; }
.subdropdown-menu.open a:nth-child(4) { transition-delay: 0.16s; }

/* set initial opacity/transform for nested link items */
.dropdown-menu a,
.subdropdown-menu a {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

/* when open, links animate in */
.dropdown-menu.open a,
.subdropdown-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

/* small visual spacing for nested lists on mobile */
.dropdown-menu { padding-left: 12px; }
.subdropdown-menu { padding-left: 18px; }

/* ensure large tap targets */
.mobile-list a,
.mobile-list button {
  line-height: 1.2;
  padding: 10px 2px;
}

/* ---------- HERO SECTION ---------- */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  background-image: linear-gradient(180deg, rgba(0,0,0,0.897), rgba(0,0,0,0.748)), url('img/10.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.hero-inner { max-width: 900px; padding: 24px; }
.hero-logo { padding-top: 20px; max-width: 400px; margin: 0 auto 12px; display: block; }
.hero-title {
  font-size: 6.6rem;
  margin: 8px 0 18px;
  font-weight: 800;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  background: transparent;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: none;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.18s cubic-bezier(.2,.9,.3,1), background 0.18s cubic-bezier(.2,.9,.3,1);
}
.btn:hover { transform: translateY(-3px); background: #958e8e; }

/* ---------- ABOUT SECTION ---------- */
.about { background: #ffffff; }
.about-container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 40px; }
.about-video {  max-width: 600px; }
.about-video video { width: 100%; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.1); object-fit: cover; }
.about-text { flex: 1 1 400px; color: #333333; }
.about-text h2 { font-size: 2rem; margin-bottom: 20px; color: #000000; font-weight: 800; }
.about-text p { font-size: 1.1rem; line-height: 1.6; font-weight: 500; }


/* ---------- BOOKING SECTION ---------- */
.booking { background:#ffffff; color:#0b0b0b; text-align:center; padding:40px 20px; }
.booking h2 { font-size:2.5rem; font-weight:800; color:#040420; margin-bottom:30px; }
.book-grid { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; margin-bottom:20px; }
.book-btn { background:#000000; color:#ffffff; padding:14px 26px; border-radius:8px; border:none; font-weight:700; cursor:pointer; transition:background 0.3s ease, transform 0.3s ease; }
.book-btn:hover { background:#610000; transform:translateY(-3px); }
.call-us { font-size:1.2rem; font-weight:600; }
.call-us a { color:#610000; text-decoration:none; }

/* ---------- GALLERY ---------- */
.gallery { background:#6a6969; text-align:center; padding:80px 20px; }
.gallery h2 { font-size:2.5rem; font-weight:800; margin-bottom:40px; }
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:15px; }
.gallery-grid img { width:100%; object-fit:cover; border-radius:10px; transition:transform .3s ease; }
.gallery-grid img:hover { transform:scale(1.05); }

/* ---------- HOURS ---------- */
.hours { background:#040420; color:#ffffff; text-align:center; padding:2px 20px; }
.hours h2 { font-size:2.5rem; font-weight:800; color:#ffffff; margin-bottom:40px; }
.hours-list { list-style:none; padding:0; margin:0; font-size:1.1rem; font-weight:600; line-height:2; }
.hours-list li { border-bottom:1px solid rgba(255,255,255,0.06); max-width:400px; margin:0 auto; display:flex; justify-content:space-between; padding:10px 0; }
.hours-list span { font-weight:700; color:#ffffff; }

/* ---------- CONTACT ---------- */
.contact { background:#ffffff; padding:80px 20px; text-align:center; }
.contact h2 { font-size:2.5rem; font-weight:800; margin-bottom:40px; }
.contact-container { max-width:1200px; margin:0 auto; }
.contact-grid { display:flex; flex-wrap:wrap; gap:40px; align-items:flex-start; justify-content:center; text-align:left; }
.map-container { flex:1 1 400px; min-width:300px; max-width:500px; }
.contact-info { flex:1 1 300px; display:flex; flex-direction:column; gap:30px; color:#0b0b0b; }
.contact-box h3 { font-size:1.5rem; font-weight:800; margin-bottom:8px; color:#000000; }
.contact-box p { font-size:1.1rem; font-weight:500; }

/* ---------- FOOTER ---------- */
.footer { background:#000000; color:#cccccc; text-align:center; padding:24px; font-size:0.95rem; }

/* ---------- ERUV ---------- */
.eruv {
  background: #ffffff;
  color: #000000;
  text-align: center;
  padding: 40px 20px;
}

.eruv h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.eruv .stars {
  font-size: 2rem; /* size of stars */
  color: #f5c518; /* golden stars */
  margin-bottom: 12px;
}

.eruv .status {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.eruv .eruv-comment {
  font-size: 1.1rem;
  font-weight: 500;
  color: #555555;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .eruv h2 {
    font-size: 2rem;
  }

  .eruv .stars {
    font-size: 1.8rem;
  }

  .eruv .status {
    font-size: 1.5rem;
  }

  .eruv .eruv-comment {
    font-size: 1rem;
  }
}

/* ---------- UTILITIES / RESPONSIVE ADJUSTMENTS ---------- */
@media (max-width: 900px) {
  .about-container { flex-direction: column; }
  .svc-item { flex-direction: column; align-items:flex-start; }
  .svc-time, .svc-price { text-align:left; min-width:auto; margin-top:6px; }
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
  .eruv h2 { font-size:2rem; }
  .eruv .stars { font-size:1.8rem; }
  .eruv .status { font-size:1.5rem; }
  .eruv .eruv-comment { font-size:1rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 4.6rem; } /* reduce for small screens */
  .about-text h2 { font-size:1.6rem; }
  .tab-btn { padding:10px 12px; font-size:0.95rem; }
  .gallery-grid img { height:140px; object-fit:cover; }
}

/* ---------- SMALL HELPERS ---------- */
.learn-more-btn {
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  font-weight: 700;
  background: #ffffff;
  color: #000000;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
  border: 2px solid #000000;
  display: inline-block;
  margin-top: 20px;
}
.learn-more-btn:hover { background:#000000; color:#ffffff; }



/* FIX: Center desktop nav links */
@media (min-width: 901px) {
  .header-inner {
    justify-content: center !important;
  }

  /* Prevent brand from pushing layout */
  .brand {
    position: absolute;
    left: 24px;
  }

  /* Keep hamburger hidden on desktop */
  .hamburger {
    display: none !important;
  }
}


/* ========== DAVENING + SHABBAT TIMES SECTION ========== */

.davening-section {
  background: #9f9f9f;
  color: #000;
  padding: 80px 20px;
  font-family: 'Montserrat', sans-serif;
}

.parsha-title {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 40px;
  color: #000;
}

.parsha-title span {
  color: #0c1532;
  font-weight: 800;
}

.davening-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 40px;
}

.davening-box {
  background: #f8f8f8;
  padding: 30px 30px 40px;
  border-radius: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.davening-header {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: #0c1532;
}

/* Shabbat Times List */
.times-list {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.9;
  font-size: 1.1rem;
  font-weight: 600;
}

.times-list span {
  font-weight: 800;
}

/* Weekday blocks */
.weekday-block {
  margin-bottom: 25px;
}

.weekday-block h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #333333;
}

.weekday-block p {
  margin: 4px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .parsha-title {
    font-size: 2rem;
  }

  .davening-header {
    font-size: 1.6rem;
  }
}

/* === ANNOUNCEMENT BUTTON UNDER DAVENING SECTION === */
.announcements-btn-wrapper {
  text-align: center;
  margin-top: -20px;
}

.announcements-btn {
  text-transform: uppercase;
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
 padding: 8px 12px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000;
  border-radius: 0;
  text-decoration: none;
  transition: all 0.25s ease;
}

.announcements-btn:hover {
  background: #000000;
  color: white;
  
}

/* Eruv buttons layout */
.eruv-buttons {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}


/* PERFECT TEXT-WIDTH UNDERLINE */
.site-header .desktop-nav a {
  position: relative;
  padding: 8px 10px; /* keep your padding */
}

.site-header .desktop-nav a span {
  position: relative;
  display: inline-block;
}

.site-header  .desktop-nav a span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px; /* <-- adjust closer/higher */
  height: 2px;
  background: #000;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s ease;
}

/* Hover animation */
.site-header .desktop-nav a:hover span::after {
  transform: scaleX(1);
}



/* ============================
   WEEKLY ANNOUNCEMENTS CTA STRIP
============================ */
.cta-strip {
  background: #f4f4f4;
  padding: 60px 20px;
  text-align: center;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.cta-strip h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
  color: #000;
}

.cta-strip p {
  font-size: 1.15rem;
  font-weight: 500;
  max-width: 700px;
  margin: 0 auto 25px;
  color: #444;
}

.cta-strip .announcements-btn {
  text-transform: uppercase;
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 12px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000;
  border-radius: 0;
  text-decoration: none;
  transition: all 0.25s ease;
}

.cta-strip .announcements-btn:hover {
  background: #000000;
  color: white;
}

.content-section {
  padding: 60px 20px;
  background: #f8f8f8;
  color: #000000;
}

.content-inner {
  max-width: 900px;
  margin: auto;
  line-height: 1.8;
  font-size: 1.05rem;
}

.content-section h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-align: center;
}

.content-section ul {
  margin-top: 20px;
  padding-left: 20px;
}

.content-section li {
  margin-bottom: 12px;
}

.rabbi-photo {
  float: left;
  width: 220px; /* adjust size if you want */
  height: auto;
  margin: 0 20px 15px 0; /* spacing between image and text */
  border-radius: none; /* optional: rounded corners */
  object-fit: cover;
}

/* Mobile fix: image should not float (avoids weird wrapping) */
@media (max-width: 700px) {
  .rabbi-photo {
    float: none;
    display: block;
    margin: 0 auto 20px auto;
    width: 65%;
  }
}

/* ----- Make footer stick to bottom ----- */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
}

/* ============================
   DONATE SECTION
============================ */
.donate {
  background: #9F9F9F;
  padding: 70px 20px;
  text-align: center;
  color: #000;
}

.donate h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 25px;
  text-transform: uppercase;
}

/* Main donate button (matches your announcements buttons) */
.donate-btn {
  text-transform: uppercase;
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 20px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.donate-btn:hover {
  background: #000000;
  color: #ffffff;
}

/* Payment badge row */
.donate-cards {
  margin-top: 25px;
}

.donate-cards img {
  width: 260px;
  max-width: 90%;
  opacity: 0.9;
}

/* Center the credit card badges in the donate section */
.donate-cards {
  text-align: center;
  margin-top: 20px;
}

.donate-cards img {
  display: inline-block;
  max-width: 100%;
}

/* Third-level dropdown (Photos) */
.dropdown-sub .dropdown-sub .dropdown-sub-content {
  left: 220px;
  top: 0;
}

.dropdown-sub:hover > .dropdown-sub-content {
  display: block;
}

/* Mobile third-level */
.mobile-nav .has-subdropdown .subdropdown-menu .has-subdropdown .subdropdown-menu {
  padding-left: 20px;
}

/* ---------------------------
   PHOTO GALLERY GRID
---------------------------- */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.photo-gallery a {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid #ddd;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.photo-gallery img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* Hover effect */
.photo-gallery a:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
