/* בסיס טיפוגרפי ונוחות RTL */
:root{
  --bg:#0b0b0b; --fg:#f5f5f5; --muted:#b9b9b9;
  --brand:#e41e2b;
  --card:#161616; --border:#262626; --accent:#ffcd4b;
  --container: 1100px;
  --radius: 12px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:#0e0e0e; color:var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.6;
}

/* Responsive Images Base */
img{
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Ensure images don't exceed container width */
img:not(.about-pic) {
  width: 100%;
}

/* Image loading optimization */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Tour card image container */
.tour-card {
  position: relative;
  overflow: hidden;
}

.tour-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* Add a subtle overlay on images for better text contrast */
.tour-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 60%,
    rgba(0,0,0,0.1) 100%
  );
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tour-card:hover::after {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 50%,
    rgba(0,0,0,0.15) 100%
  );
}
a{color:inherit; text-decoration:none}
.container{max-width:var(--container); margin-inline:auto; padding-inline:20px}

.skip-link{
  position:absolute; inset-inline-start:10px; top:-40px; padding:8px 12px;
  background:#000; color:#fff; border-radius:6px; z-index:1000
}
.skip-link:focus{top:10px}

.site-header{
  position:sticky; top:0; z-index:100; background:rgba(14,14,14,.7); backdrop-filter:saturate(150%) blur(8px);
  border-bottom:1px solid var(--border);
}
.nav-wrap{display:flex; align-items:center; gap:16px; padding-block:12px}
.brand{font-weight:800; letter-spacing:.3px}
.nav{margin-inline-start:auto}
.nav ul{display:flex; gap:14px; list-style:none; padding:0; margin:0}
.nav a{padding:8px 10px; border-radius:8px}
.nav a:hover{background:rgba(255,255,255,.06)}

.nav-toggle{
  display:none; background:none; border:0; cursor:pointer; padding:10px; border-radius:8px
}
.nav-toggle .bar{display:block; width:22px; height:2px; background:#fff; margin:4px 0}

.hero{position:relative; overflow:hidden; border-bottom:1px solid var(--border)}
.hero-inner{padding-block:80px; text-align:center}
.hero h1{margin:0 0 10px; font-size:clamp(28px,4vw,44px)}
.hero p{color:var(--muted); margin:0 0 24px}
.cta-group{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}

.btn{
  display:inline-block; padding:10px 16px; border:1px solid var(--border); border-radius:10px; font-weight:600
}
.btn-primary{background:var(--brand); border-color:transparent; color:#fff}
.btn-ghost{background:transparent}
.btn:hover{opacity:.95}

.hero-bg{
  position:absolute; inset:0; background:
    radial-gradient(600px 300px at 70% 20%, rgba(228,30,43,.20), transparent 70%),
    radial-gradient(400px 200px at 20% 80%, rgba(255,205,75,.18), transparent 70%);
  pointer-events:none
}

.section{padding-block:56px}
.section.alt{background:#0b0b0b; border-block:1px solid var(--border)}
.section-head{margin:0 0 20px}
.section-head h2{margin:0 0 6px; font-size:clamp(22px,3vw,32px)}
.section-head p{margin:0; color:var(--muted)}

.pricing{
  display:grid; grid-template-columns:repeat(2,1fr); gap:16px; margin-top:16px
}
.pricing.two-rows{grid-template-columns:repeat(2,1fr)}
.pricing-card{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px; display:flex; flex-direction:column; gap:10px
}
.pricing-card .price{font-size:28px; font-weight:800}
.pricing-card .subprice{font-size:14px}
.pricing-card .muted{color:var(--muted)}
.pricing-card ul{list-style:none; padding:0; margin:0; display:grid; gap:6px}
.pricing-card .btn{margin-top:auto}
.pricing-card.featured{outline:2px solid rgba(255,205,75,.35)}

.fine-print{color:var(--muted); margin-top:10px; font-size:14px}

.lectures-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:16px}
.lecture{background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px}
.lecture .muted{color:var(--muted)}

.press-list{display:grid; grid-template-columns:repeat(3,1fr); gap:16px}
.press-item{background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px}
.press-meta{color:var(--muted); font-size:14px; margin-bottom:6px}
.press-link{color:var(--accent); text-decoration:underline; text-underline-offset:3px}

.about-grid{display:grid; grid-template-columns:1.2fr .8fr; gap:20px; align-items:center}
.about-card{height:260px; border:1px solid var(--border); border-radius:var(--radius);
  background:
   radial-gradient(400px 200px at 30% 30%, rgba(228,30,43,.18), transparent 70%),
   url('assets/about.jpg') center/cover no-repeat;
}

details{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:14px 16px; margin:10px 0
}
details[open]{outline:1px solid rgba(255,255,255,.06)}
summary{cursor:pointer; font-weight:600}

.contact-form{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px
}
.contact-form .grid{display:grid; grid-template-columns:repeat(2,1fr); gap:12px}
label{display:flex; flex-direction:column; gap:6px; font-weight:600}
input, textarea{
  width:100%; padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:#0a0a0a; color:var(--fg)
}
input:focus, textarea:focus{outline:2px solid rgba(255,255,255,.12)}
.hp{position:absolute; left:-9999px}
.form-ok{margin-top:10px; color:#7fe39a}

.site-footer{border-top:1px solid var(--border); background:#0b0b0b}
.footer-grid{display:grid; grid-template-columns:1fr auto auto; gap:20px; padding-block:24px}
.footer-grid ul{list-style:none; padding:0; margin:0}
.footer-grid a{color:var(--muted)}
.footer-grid a:hover{color:var(--fg)}
.legal{color:var(--muted)}

@media (max-width: 1000px){
  .pricing{grid-template-columns:1fr}
  .lectures-grid,
  .press-list{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr}
  .nav-toggle{display:inline-block}
  .nav{position:fixed; inset-block-start:64px; inset-inline:0; background:#0b0b0b; border-top:1px solid var(--border); transform:translateY(-120%); transition:transform .2s ease; padding:12px}
  .nav.open{transform:translateY(0)}
  .nav ul{flex-direction:column}
}

/* === Tours Section Styling === */
.tours-subhead{ margin:20px 0 10px; font-weight:800; }
.tour-list{ list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.tour-item{ background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; overflow:hidden; }
.tour-pic{
  float:inline-start;
  width:112px; height:112px; object-fit:cover; border-radius:10px;
  margin-inline-end:12px; margin-block-end:4px; background:#111;
}
.tour-text{ line-height:1.7; }
@media (max-width:640px){ .tour-pic{ width:88px; height:88px; } }

/* === Lightbox === */
.lightbox[hidden]{display:none}
.lightbox{
  position:fixed; inset:0; z-index:1000;
  background:rgba(0,0,0,.72);
  display:flex; align-items:center; justify-content:center;
  padding:24px;
}
.lb-panel{
  background:#fff; color:#111; border-radius:14px;
  max-width:min(980px, 95vw); max-height:90vh;
  overflow:auto; box-shadow:0 10px 40px rgba(0,0,0,.35);
  padding:16px 16px 12px;
}
.lb-close{
  border:0; background:transparent; font-size:24px; line-height:1;
  float:inline-end; cursor:pointer; padding:6px 8px;
}
.lb-figure{ margin:0; display:grid; gap:12px; }
.lb-figure img{ width:100%; height:auto; border-radius:10px; }
.lb-caption h3{ margin:0 0 6px; font-size:1.2rem; }
.lb-caption p{ margin:0; line-height:1.7; }

.tours-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}


/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  text-align: center;
}

.modal img {
  max-width: 70%;
  max-height: 70vh;
  border-radius: 10px;
}

.modal-caption {
  color: #fff;
  margin-top: 20px;
}

.modal .close {
  position: absolute;
  top: 15px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}
.modal{ background: rgba(0,0,0,.85); } /* keep as overlay */

/* --- Modal Content --- */
.modal-content {
  background: #fff;
  color: #000;              /* black text inside modal */
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 600px;
  margin: 5% auto;
  text-align: left;         /* align explanation text inside */
  line-height: 1.6;
}

.about-card {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-pic {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* About layout */
.about-grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;   /* text | photo */
  gap: 24px;
  align-items: start;
}
#about p{ margin: 0 0 12px; line-height: 1.85; }
.about-card{ display:flex; justify-content:center; }
.about-pic{
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  object-fit: cover;
  width: 100%;
  max-height: 400px;
}

/* Stack on mobile */
@media (max-width: 800px){
  .about-grid{ 
    grid-template-columns: 1fr; 
    gap: 16px;
  }
  .about-card{ 
    order: -1; 
    margin-bottom: 12px; 
    height: auto;
  }
  .about-pic{
    max-height: 300px;
  }
}

@media (max-width: 480px){
  .about-pic{
    max-height: 250px;
  }
  .about-grid{
    gap: 12px;
  }
}

/* --- Modal layout & readability --- */
.modal{
  display:none; position:fixed; inset:0; z-index:1000;
  background:rgba(0,0,0,.85);
  display:flex; align-items:center; justify-content:center;
  padding:24px;
}
.modal-inner{
  background:#fff; color:#111; border-radius:14px; position:relative;
  max-width:min(1000px, 92vw); max-height:88vh;
  display:grid; grid-template-columns:1.1fr 0.9fr; gap:18px;
  padding:16px; overflow:auto;
}
.modal .close{
  position:absolute; inset-inline-end:10px; top:8px;
  font-size:28px; background:transparent; border:0; cursor:pointer; line-height:1;
}

#modalImg{
  width: 100%; 
  height: auto; 
  max-height: 74vh;
  object-fit: contain; 
  border-radius: 10px;
  display: block;
}

.modal-caption{
  overflow: auto; 
  max-height: 74vh;
  padding-inline: 2px;
}
.modal-caption h3{ 
  margin: 0 0 8px; 
  font-size: 1.25rem; 
  color: #111;
}
.modal-caption p{ 
  margin: 0; 
  line-height: 1.8; 
  font-size: 1rem; 
  color: #222; 
}

/* Mobile: stack image above text */
@media (max-width: 820px){
  .modal-inner{ 
    grid-template-columns: 1fr; 
    max-height: 95vh;
  }
  #modalImg{ 
    max-height: 50vh; 
    width: 100%;
    object-fit: cover;
  }
  .modal-caption{
    max-height: 45vh;
    overflow-y: auto;
  }
}

@media (max-width: 480px){
  .modal-inner{
    padding: 12px;
    margin: 10px;
  }
  #modalImg{
    max-height: 40vh;
  }
  .modal-caption h3{
    font-size: 1.1rem;
  }
  .modal-caption p{
    font-size: 0.9rem;
  }
}
.modal{ display:none; position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.85); align-items:center; justify-content:center; padding:24px; }
.modal.open{ display:flex; }   /* only visible when we add .open via JS */

/* Center overlay only when .open */
.modal{ display:none; position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.85); align-items:center; justify-content:center; padding:24px; }
.modal.open{ display:flex; }

.modal-inner{
  background:#fff; color:#111; border-radius:14px; position:relative;
  max-width:min(1000px, 92vw); max-height:88vh;
  display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,0.9fr);
  gap:18px; padding:16px; overflow:auto;
}
.modal-inner.checkout{ grid-template-columns:1fr; max-width:min(760px,92vw); }

.modal .close{ position:absolute; inset-inline-end:10px; top:8px; font-size:28px; background:transparent; border:0; cursor:pointer; line-height:1; }

#modalImg{ width:100%; height:auto; max-height:74vh; object-fit:contain; border-radius:10px; display:block; }

.modal-head{
  background: var(--primary, #7a0d12); /* deep red fallback */
  color:#fff; border-radius:10px; padding:10px 14px; margin-bottom:12px;
}
.modal-head h3{ margin:0; font-size:1.2rem; }

.tour-meta{ list-style:none; padding:0; margin:0 0 14px; }
.tour-meta li{ margin:0 0 6px; }

.mb-12{ margin-bottom:12px; }

/* Cart button */
.cart-btn{
  margin-inline-start:10px; padding:6px 10px; border-radius:999px;
  border:1px solid var(--border, #e2e2e2); background:var(--card, #fff); cursor:pointer;
}
#cartCount{ font-weight:700; }

/* Mobile stack */
@media (max-width:820px){
  .modal-inner{ grid-template-columns:1fr; }
  #modalImg{ max-height:50vh; }
}

/* Responsive tour gallery */
.tours-gallery{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 2rem;
  padding: 0 8px;
}

/* Tour cards with enhanced design */
.tour-card{
  background: #fff; 
  color: #111; 
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  padding: 0;
  display: flex; 
  flex-direction: column; 
  align-items: stretch; 
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.2);
}

.tour-card .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(228,30,43,0.05) 0%, rgba(255,205,75,0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
}

.tour-card:hover .card-overlay {
  opacity: 1;
}

.tour-card img{
  border-radius: 20px 20px 0 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-card .tour-title{ 
  margin: 20px 20px 24px; 
  font-size: 1.3rem; 
  font-weight: 700;
  padding: 0;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  line-height: 1.3;
  position: relative;
  z-index: 2;
}

.tour-card:hover{
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.1);
  border-color: rgba(228,30,43,0.2);
}

.tour-card:hover img{
  transform: scale(1.05);
}

.tour-card:focus{ 
  outline: 3px solid var(--brand,#e41e2b); 
  outline-offset: 4px; 
}

/* Add a subtle glow effect on hover */
.tour-card:hover {
  box-shadow: 
    0 20px 40px rgba(0,0,0,.15), 
    0 8px 16px rgba(0,0,0,.1),
    0 0 0 1px rgba(228,30,43,0.1),
    0 0 20px rgba(228,30,43,0.1);
}

/* Mobile responsiveness for tour gallery */
@media (max-width: 768px){
  .tours-gallery{
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
  
  .tour-card img{
    height: 200px;
  }
  
  .tour-card::after {
    height: 200px;
  }
  
  .tour-card .tour-title{
    font-size: 1.1rem;
  }
}

@media (max-width: 480px){
  .tours-gallery{
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .tour-card img{
    height: 180px;
  }
  
  .tour-card::after {
    height: 180px;
  }
}

/* Safety—no side scroll from the grid */
.tours-gallery{ overflow-x: clip; }
