/* ==========================================================================
   Bat-Yam Art Institute — Shared Stylesheet
   ========================================================================== */

:root {
  --bg: #FAF9F6;
  --bg-alt: #F2EFE9;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --muted: #8A8A8A;
  --line: #E5E0D6;
  --accent: #C4704F;
  --accent-dark: #A85A3C;
  --gold: #C9A227;
  --green: #25D366;
  --green-dark: #128C7E;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
  --radius: 4px;
  --radius-lg: 12px;
  --ease: cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Heebo', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 0.5em; }
h3 { font-size: 1.35rem; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 { margin-bottom: 0.4rem; }
.section-title .subtitle {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.section-title .accent-line {
  width: 50px;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s var(--ease);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  gap: 2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
}
.logo-img { height: 48px; width: auto; display: block; }
@media (max-width: 480px) { .logo-img { height: 38px; } }
.logo-mark {
  width: 42px;
  height: 42px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}
.logo-text small { display: block; font-weight: 400; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.1em; }
.main-nav { display: flex; align-items: center; gap: 1.8rem; }
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--accent); }

.wa-pill {
  background: var(--green);
  color: white !important;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.wa-pill:hover { background: var(--green-dark); transform: translateY(-1px); }
.wa-pill::after { display: none !important; }

.mobile-toggle { display: none; font-size: 1.5rem; }

/* Hero */
.hero {
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(196,112,79,0.06), transparent 60%),
    var(--bg);
}
.hero-logo {
  width: 90px;
  height: 90px;
  margin: 0 auto 2rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero .quote {
  max-width: 620px;
  margin: 0 auto 1.2rem;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}
.hero .quote cite { display: block; font-style: normal; font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.hero .tagline {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 2.5rem;
}

/* Buttons */
.btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-wa {
  background: var(--green); color: white; padding: 1rem 2rem; font-size: 1.05rem;
  border-radius: 999px;
}
.btn-wa:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* About */
.about { background: var(--bg-alt); }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.about-stat {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.about-stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.about-stat .num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.about-stat .label { color: var(--ink-soft); font-size: 0.95rem; }

.about-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* Course cards */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 2rem;
}
.course-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  position: relative;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.course-image {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #d8c7b0, #b89878);
  position: relative;
  overflow: hidden;
}
.course-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.course-card:hover .course-image img { transform: scale(1.08); }
.age-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}
.free-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.course-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.course-instructor { color: var(--accent); font-size: 0.85rem; margin-bottom: 0.4rem; letter-spacing: 0.05em; }
.course-title { font-size: 1.3rem; margin-bottom: 0.8rem; }
.course-meta { list-style: none; margin-bottom: 1.2rem; color: var(--ink-soft); font-size: 0.92rem; }
.course-meta li { padding: 0.25rem 0; display: flex; gap: 0.5rem; }
.course-meta li::before { content: '•'; color: var(--accent); }
.course-price {
  margin-top: auto;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  margin-bottom: 1rem;
}
.course-actions { display: flex; gap: 0.5rem; }
.course-actions .btn { flex: 1; padding: 0.7rem 1rem; font-size: 0.9rem; }
.course-actions .btn-wa { padding: 0.7rem 1rem; }

/* Children variant - warmer */
.children-section { background: linear-gradient(180deg, #fff9f3, var(--bg)); }
.children-section .course-card { border-color: #f0d9c4; }
.children-section .course-image { background: linear-gradient(135deg, #ffd7b3, #f5a878); }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.gallery-item:nth-child(3n+1) { aspect-ratio: 3/4; }
.gallery-item:nth-child(5n) { aspect-ratio: 4/3; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(20%);
  transition: transform 0.7s var(--ease), filter 0.4s;
}
.gallery-item:hover img { transform: scale(1.1); filter: grayscale(0%); }

/* Contact */
.contact { background: var(--ink); color: var(--bg); }
.contact h2 { color: var(--bg); }
.contact .section-title .subtitle { color: var(--muted); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.contact-card {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s, transform 0.3s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.contact-card .icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}
.contact-card h4 { margin-bottom: 0.5rem; }
.contact-card p, .contact-card a { color: rgba(255,255,255,0.8); font-size: 0.95rem; line-height: 1.6; }
.contact-card a:hover { color: var(--accent); }

/* Footer */
.site-footer {
  background: #111;
  color: #aaa;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}
.footer-grid h5 { color: white; margin-bottom: 1rem; font-size: 1rem; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { padding: 0.3rem 0; font-size: 0.9rem; }
.footer-grid ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}
.social-icons { display: flex; gap: 0.8rem; margin-top: 1rem; }
.social-icons a {
  width: 36px; height: 36px;
  border: 1px solid #333;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: all 0.2s;
}
.social-icons a:hover { background: var(--accent); border-color: var(--accent); color: white; }

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 60px;
  height: 60px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  animation: wa-pulse 2s infinite;
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.1); background: var(--green-dark); }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.8), 0 0 0 12px rgba(37, 211, 102, 0); }
}

/* Page hero (for inner pages) */
.page-hero {
  padding: 5rem 1.5rem 3rem;
  text-align: center;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 0.8rem; }
.page-hero p { color: var(--ink-soft); max-width: 600px; margin: 0 auto; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a:hover { color: var(--accent); }

/* Course detail page */
.course-detail { padding: 4rem 0; }
.course-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
}
.detail-image {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #d8c7b0, #b89878);
}
.detail-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-content h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.detail-instructor {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  display: inline-block;
  padding: 0.3rem 0;
  border-bottom: 2px solid var(--accent);
}
.detail-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}
.detail-bio {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border-right: 3px solid var(--accent);
}
.detail-bio h4 { margin-bottom: 0.5rem; }
.detail-bio p { color: var(--ink-soft); font-size: 0.95rem; }

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
}
.schedule-table th, .schedule-table td {
  padding: 0.85rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.schedule-table th { background: var(--bg-alt); font-weight: 600; }

.detail-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.sidebar-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.sidebar-price small { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.sidebar-divider { height: 1px; background: var(--line); margin: 1.5rem 0; }
.sidebar-info { margin-bottom: 1rem; }
.sidebar-info strong { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.2rem; }
.map-placeholder {
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
  margin: 1rem 0;
  background-image: url('https://maps.googleapis.com/maps/api/staticmap?center=Bat+Yam&zoom=14&size=600x400');
  background-size: cover;
  background-position: center;
  position: relative;
}
.map-placeholder::after {
  content: '📍';
  font-size: 2.5rem;
  background: white;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
}

/* Admin */
.admin-container { max-width: 900px; margin: 4rem auto; padding: 0 1.5rem; }
.login-box {
  max-width: 400px;
  margin: 6rem auto;
  background: white;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-box input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  margin: 1.5rem 0 1rem;
  text-align: center;
  direction: ltr;
}
.login-box input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.admin-dash { background: white; padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.8rem; text-align: right; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.admin-table th { background: var(--bg-alt); }
.admin-table tr.inactive { opacity: 0.5; }
.admin-table input, .admin-table textarea {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.9rem;
}
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  background: #ccc;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-switch.on { background: var(--green); }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}
.toggle-switch.on::after { transform: translateX(-20px); }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.85rem; border-radius: 3px; }
.btn-danger { background: #c84141; color: white; }
.btn-success { background: var(--green-dark); color: white; }

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============ Responsive — tablet ============ */
@media (max-width: 860px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; right: 0; left: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.75rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .main-nav a:last-of-type { border-bottom: none; }
  .mobile-toggle { display: block; font-size: 1.8rem; padding: 0.3rem 0.6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .course-detail-grid { grid-template-columns: 1fr; gap: 2rem; }
  .detail-sidebar { position: static; }
  .section { padding: 3rem 0; }
  .hero { padding: 2.5rem 1.5rem 3rem; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
  h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
}

/* ============ Responsive — phone ============ */
@media (max-width: 600px) {
  body { font-size: 0.95rem; }
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .section-title { margin-bottom: 2rem; }
  .section-title .subtitle { font-size: 0.85rem; }

  /* Header */
  .site-header .header-inner { padding: 0.7rem 1rem; gap: 0.4rem; }
  .logo-img { height: 36px; }
  .main-nav .wa-pill { padding: 0.5rem 0.9rem; }

  /* Hero — biggest fix */
  .hero { padding: 2rem 1rem 2.5rem; }
  .hero img[alt*="המכון"] { max-width: 240px !important; width: 70% !important; margin-bottom: 1.2rem !important; }
  .hero h1 { font-size: 1.15rem !important; line-height: 1.4; margin-bottom: 1rem; padding: 0 0.5rem; }
  .hero .quote { font-size: 0.95rem; padding: 0 0.5rem; }
  .hero .tagline { font-size: 0.85rem; margin-top: 1rem !important; padding: 0 0.5rem; }

  /* Buttons stack & full-width */
  .btn-group { flex-direction: column; gap: 0.7rem; padding: 0 0.5rem; }
  .btn-group .btn { width: 100%; justify-content: center; padding: 0.85rem 1.2rem; }

  /* About stats — 2 columns */
  .about-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 2rem; }
  .about-stat { padding: 1.2rem 0.5rem; }
  .about-stat .num { font-size: 1.8rem; }
  .about-stat .label { font-size: 0.8rem; }
  .about-intro { font-size: 0.98rem; }

  /* Course cards — full width, larger touch targets */
  .course-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .course-card { border-radius: 10px; }
  .course-body { padding: 1.2rem; }
  .course-title { font-size: 1.15rem; }
  .course-meta { font-size: 0.88rem; }
  .course-actions { flex-direction: column; gap: 0.5rem; }
  .course-actions .btn { padding: 0.85rem 1rem; font-size: 0.95rem; }

  /* Gallery — 2 columns instead of cramped */
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .gallery-item, .gallery-item:nth-child(3n+1), .gallery-item:nth-child(5n) { aspect-ratio: 1; }

  /* Footer — single column, centered */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .footer-grid .social-icons { justify-content: center; }
  .footer-grid .logo { justify-content: center; }
  .footer-grid p { max-width: 100% !important; }
  .site-footer { padding: 2.5rem 0 1rem; }

  /* Contact cards */
  .contact-grid { grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
  .contact-card { padding: 1.5rem 1rem; }
  .contact-card .icon { font-size: 1.5rem; margin-bottom: 0.5rem; }

  /* Floating WA — smaller, doesn't cover content */
  .wa-float { width: 52px; height: 52px; bottom: 1rem; left: 1rem; font-size: 1.5rem; }
  .wa-float svg { width: 26px; height: 26px; }

  /* Page hero for inner pages */
  .page-hero { padding: 3rem 1rem 2rem; }
  .page-hero h1 { font-size: 1.7rem !important; }
  .page-hero p { font-size: 0.95rem; }
  .breadcrumb { font-size: 0.8rem; margin-bottom: 1rem; }

  /* Course detail page */
  .course-detail { padding: 2rem 0; }
  .detail-content h1 { font-size: 1.6rem !important; }
  .detail-instructor { font-size: 1rem; }
  .detail-description { font-size: 0.98rem; line-height: 1.7; }
  .detail-sidebar { padding: 1.5rem; margin-top: 1.5rem; }
  .sidebar-price { font-size: 1.8rem; }
  .schedule-table th, .schedule-table td { padding: 0.6rem 0.5rem; font-size: 0.88rem; }
  .detail-image { aspect-ratio: 16/11; margin-bottom: 1.5rem; }

  /* Admin — mobile-friendly table */
  .admin-container { margin: 1.5rem auto; padding: 0 1rem; }
  .login-box { margin: 3rem auto; padding: 2rem 1.2rem; }
  .admin-dash { padding: 1.2rem; }
  .admin-header h2 { font-size: 1.3rem; }
  .admin-table th, .admin-table td { padding: 0.5rem 0.4rem; font-size: 0.82rem; }
  .admin-table th:nth-child(3), .admin-table td:nth-child(3),
  .admin-table th:nth-child(5), .admin-table td:nth-child(5) { display: none; }

  /* Hero logo block */
  .hero-logo { width: 70px; height: 70px; font-size: 1.5rem; margin-bottom: 1.2rem; }
}

/* ============ Tiny phones (iPhone SE etc) ============ */
@media (max-width: 380px) {
  .hero h1 { font-size: 1rem !important; }
  .hero .quote { font-size: 0.88rem; }
  .logo-img { height: 32px; }
  .header-inner { padding: 0.6rem 0.7rem; }
  .main-nav .wa-pill { padding: 0.45rem 0.7rem; font-size: 0.85rem; }
  .main-nav .wa-pill span { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ============ Touch device niceties ============ */
@media (hover: none) {
  .course-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .course-card:hover .course-image img { transform: none; }
  .gallery-item:hover img { transform: none; filter: grayscale(20%); }
  .about-stat:hover { transform: none; }
  .btn-primary:hover { transform: none; }
  .wa-float:hover { transform: none; }
}

/* ============================================================
   נגישות — Accessibility Widget (Israeli Standard 5568)
   ============================================================ */

#a11y-widget { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; direction: rtl; font-family: 'Heebo', sans-serif; }

#a11y-toggle {
  width: 60px; height: 60px; border-radius: 50%;
  background: #0066CC; color: white; border: 3px solid white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  cursor: pointer; display: grid; place-items: center;
  transition: transform 0.2s, background 0.2s;
}
#a11y-toggle:hover, #a11y-toggle:focus-visible { background: #0052A3; transform: scale(1.08); outline: 3px solid #FFC107; outline-offset: 2px; }
#a11y-toggle svg { display: block; }

#a11y-panel {
  position: absolute; bottom: 80px; right: 0;
  width: min(360px, calc(100vw - 2rem));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: white; color: #1A1A1A;
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  border: 2px solid #0066CC;
  opacity: 0; pointer-events: none; transform: translateY(10px) scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
}
#a11y-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.a11y-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; background: #0066CC; color: white;
  border-radius: 10px 10px 0 0;
}
.a11y-header h2 { font-size: 1.1rem; margin: 0; color: white; }
#a11y-close {
  background: transparent; color: white; border: none; font-size: 1.4rem;
  cursor: pointer; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
}
#a11y-close:hover, #a11y-close:focus-visible { background: rgba(255,255,255,0.2); outline: 2px solid white; }

.a11y-body { padding: 1rem 1.25rem; }
.a11y-group { margin-bottom: 1.25rem; }
.a11y-group:last-child { margin-bottom: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.a11y-group h3 { font-size: 0.95rem; margin-bottom: 0.5rem; color: #333; font-weight: 600; }

.a11y-row, .a11y-grid { display: grid; gap: 0.4rem; }
.a11y-row { grid-template-columns: 1fr 1fr 1fr; }
.a11y-grid { grid-template-columns: 1fr 1fr; }

#a11y-panel button, #a11y-panel a {
  background: #F3F4F6; color: #1A1A1A; border: 2px solid #D1D5DB;
  padding: 0.6rem 0.5rem; border-radius: 6px; font-family: inherit;
  font-size: 0.88rem; font-weight: 500; cursor: pointer; text-align: center;
  text-decoration: none; display: block;
  transition: all 0.15s;
}
#a11y-panel button:hover, #a11y-panel a:hover,
#a11y-panel button:focus-visible, #a11y-panel a:focus-visible {
  background: #E5E7EB; border-color: #0066CC; outline: 2px solid #0066CC; outline-offset: 1px;
}
#a11y-panel button.a11y-active {
  background: #0066CC; color: white; border-color: #0066CC;
}
#a11y-reset { background: #FEF3C7 !important; border-color: #D97706 !important; }
#a11y-statement-link { background: #DBEAFE !important; border-color: #2563EB !important; color: #1E40AF !important; }

/* === Applied accessibility modes === */
html.a11y-contrast-high, html.a11y-contrast-high body { background: #000 !important; color: #FFFF00 !important; }
html.a11y-contrast-high *:not(#a11y-widget):not(#a11y-widget *) {
  background-color: #000 !important; color: #FFFF00 !important; border-color: #FFFF00 !important;
}
html.a11y-contrast-high a, html.a11y-contrast-high a * { color: #00FFFF !important; }
html.a11y-contrast-high img:not(#a11y-widget img) { filter: grayscale(100%) contrast(1.2); }

html.a11y-contrast-inverted { filter: invert(1) hue-rotate(180deg); }
html.a11y-contrast-inverted img, html.a11y-contrast-inverted iframe, html.a11y-contrast-inverted #a11y-widget { filter: invert(1) hue-rotate(180deg); }

html.a11y-contrast-grayscale { filter: grayscale(100%); }
html.a11y-contrast-grayscale #a11y-widget { filter: grayscale(0); }

html.a11y-highlight-links a:not(#a11y-widget a) {
  background: #FFFF00 !important; color: #000 !important;
  outline: 2px solid #000 !important; padding: 2px 4px !important;
}
html.a11y-underline-links a:not(#a11y-widget a) { text-decoration: underline !important; text-decoration-thickness: 2px !important; }
html.a11y-highlight-headings h1:not(#a11y-widget h1):not(#a11y-widget h2):not(#a11y-widget h3),
html.a11y-highlight-headings h2:not(#a11y-widget h2),
html.a11y-highlight-headings h3:not(#a11y-widget h3) {
  outline: 3px dashed #C4704F !important; outline-offset: 4px !important;
  background: rgba(196,112,79,0.1) !important;
}

html.a11y-big-cursor, html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path fill='%23000' stroke='%23fff' stroke-width='1.5' d='M5 2l5 15 2.5-7 7-2.5z'/></svg>") 0 0, auto !important;
}

html.a11y-pause-animations *, html.a11y-pause-animations *::before, html.a11y-pause-animations *::after {
  animation-duration: 0s !important; animation-delay: 0s !important;
  transition-duration: 0s !important; transition-delay: 0s !important;
}

html.a11y-readable-font, html.a11y-readable-font * {
  font-family: 'Arial', 'Heebo', sans-serif !important;
  font-style: normal !important; letter-spacing: 0.02em !important;
  line-height: 1.7 !important;
}

@media (max-width: 600px) {
  #a11y-widget { bottom: 5rem; right: 1rem; }
  #a11y-toggle { width: 52px; height: 52px; }
  #a11y-toggle svg { width: 26px; height: 26px; }
  #a11y-panel { bottom: 70px; }
}
