/* אתר אגדלך — עיצוב לפי סקיצה: רקע בז'/קרם, ירוק כהה, זהב, RTL */

:root {
  --bg-page: #f5f0e8;
  --bg-card: #faf6f0;
  --green-dark: #1a4d3a;
  --green-btn: #1e5c45;
  --gold: #b8860b;
  --gold-light: #d4a84b;
  --text: #2c2c2c;
  --text-muted: #555;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 28px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 4px 20px rgba(26, 77, 58, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-btn: 0 2px 8px rgba(26, 77, 58, 0.25);
  --shadow-btn-hover: 0 4px 14px rgba(26, 77, 58, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --font-heebo: 'Heebo', sans-serif;
  --font-frank: 'Frank Ruhl Libre', serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Skip link — נגישות */
.skip-link {
  position: absolute;
  top: -3rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: var(--font-heebo);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-page);
  direction: rtl;
}

/* פס עליון כהה */
.top-bar {
  background: linear-gradient(180deg, #1f5540 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.top-links a {
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.top-links a:hover {
  text-decoration: underline;
}

.top-links a:focus-visible,
.main-nav a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.top-links .sep {
  color: rgba(255,255,255,0.6);
  margin: 0 0.1rem;
}

@media (max-width: 600px) {
  .top-links:not(.open) {
    display: none !important;
  }
  .top-links.open {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
  }
}

.btn-menu,
.btn-search {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1.1rem;
}
.btn-menu:focus-visible,
.btn-search:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* באנר ארגון אגדלך — רקע ירוק בהיר, לוגו במרכז */
.org-banner {
  background: #e2eadc;
  border-top: 2px solid #2a3d35;
  border-bottom: 2px solid #2a3d35;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.org-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.org-banner-block {
  flex: 0 1 auto;
  min-width: 0;
}
.org-banner-right {
  text-align: right;
}
.org-banner-left {
  text-align: left;
}
.org-banner-line {
  font-family: var(--font-frank);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--green-dark);
  letter-spacing: 0.02em;
}
.org-banner-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.org-banner-logo a {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.org-banner-logo-img {
  display: block;
  max-width: 140px;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 700px) {
  .org-banner-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .org-banner-right,
  .org-banner-left {
    text-align: center;
    width: 100%;
  }
  .org-banner-logo {
    order: -1;
    width: 100%;
  }
}

/* ניווט ראשי + לוגו */
.main-nav-wrap {
  background: linear-gradient(180deg, #ebe6de 0%, #e8e2d8 100%);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-ornament {
  display: block;
  margin: 0 auto;
  padding: 0;
  height: 14px;
  background: url('../images/ornament-header.svg') center no-repeat;
  background-size: 240px 14px;
}

.main-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.main-nav a:hover {
  color: var(--green-dark);
}

.main-nav .sep {
  color: var(--text-muted);
  margin: 0 0.1rem;
}

.logo-wrap {
  margin: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-link {
  display: block;
  text-decoration: none;
  line-height: 0;
}

.logo-img {
  display: block;
  max-width: 160px;
  max-height: 85px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.logo {
  margin: 0;
  font-family: var(--font-frank);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-align: center;
  border: 2px solid var(--gold-light);
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.2) 0%, rgba(184, 134, 11, 0.08) 50%, transparent 100%);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  box-shadow: 0 2px 12px rgba(184, 134, 11, 0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* וידאו — שיעורים ביוטיוב */
/* באנר קו אגדלך */
.promo-banner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}
.promo-banner-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.promo-banner-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.promo-banner-img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* אודות ארגון אגדלך */
.about-org {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}
.about-org-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

.video-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.video-intro {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.video-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(26, 77, 58, 0.06);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.video-thumb {
  display: block;
  width: 100%;
  padding-bottom: 56.25%;
  background-size: cover;
  background-position: center;
  background-color: #e0dcd4;
}

.video-label {
  display: block;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: var(--green-dark);
}

/* כרטיסים */
.cards-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  gap: 1.5rem;
}

.cards-row.three-cards {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.cards-row.two-cards {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease;
  border: 1px solid rgba(26, 77, 58, 0.06);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
  opacity: 0.5;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.card-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.card-list li {
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 0;
}
.card-list li .no-wrap {
  white-space: nowrap;
}

/* פריט עם טלפון — טקסט למעלה, נקודת החבר באמצע, מספר מתחת */
.card-list-item-with-phone .card-list-item-with-phone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.card-list-item-with-phone .card-list-item-text {
  display: block;
  text-align: center;
}
.card-list-item-with-phone .no-wrap {
  display: block;
  text-align: center;
}
.card-list-item-with-phone .card-phone {
  display: block;
  text-align: center;
}

.card-list .card-phone {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 500;
  margin-right: 2px;
  white-space: nowrap;
}
.card-list .card-phone:hover {
  text-decoration: underline;
}

.card-list .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--green-dark);
  border-radius: 4px;
  opacity: 0.8;
}

.card-list .with-photo img {
  border-radius: 50%;
  object-fit: cover;
}

.card-text {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-image {
  margin: 1rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(145deg, #e5e0d8 0%, #e0dcd4 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255,255,255,0.5);
  min-height: 220px;
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* שורת שלוש כרטיסים — גובה תמונה אחיד (יחס 400×220) */
.cards-row.three-cards .card-image {
  aspect-ratio: 400 / 220;
  min-height: 0;
}
.cards-row.three-cards .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* תמונת "רוצה חברותא?" — מוצגת במלואה בלי חיתוך */
#join .card-image img {
  object-fit: contain;
}

.card-image.small img {
  max-height: 160px;
  object-fit: cover;
}

.card-image-title {
  margin: 0.6rem 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.card-image-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* כפתורים */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-heebo);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, transform 0.15s;
  margin-top: auto;
  align-self: flex-start;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--green-btn) 0%, var(--green-dark) 100%);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #235a47 0%, var(--green-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-btn-hover);
}

.btn-secondary {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #1a1a1a;
  border: 1px solid rgba(184, 134, 11, 0.4);
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.25);
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #e0b85a 0%, var(--gold-light) 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.35);
}

/* חץ קישוטי — משתמש ב־SVG */
.divider-arrow {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  background: url('../images/ornament-arrow.svg') center no-repeat;
  background-size: 40px 40px;
}

.divider-ornament {
  text-align: center;
  margin: 1rem auto 1.5rem;
}

.divider-ornament img {
  width: 280px;
  height: 34px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* חדשות וערכים */
.news-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: 0.5rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.news-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.news-tabs button {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0,0,0,0.12);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-family: var(--font-heebo);
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, transform 0.15s;
}

.news-tabs button:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.news-tabs button[aria-selected="true"] {
  background: linear-gradient(180deg, var(--green-btn) 0%, var(--green-dark) 100%);
  color: #fff;
  border-color: var(--green-dark);
  box-shadow: 0 2px 8px rgba(26, 77, 58, 0.3);
}

.news-tabs button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.card-news .card-image {
  max-width: 100%;
}

.card-feature .card-image img {
  max-height: 280px;
  object-fit: cover;
}

/* CTA תחתון */
.cta-section {
  background: linear-gradient(180deg, var(--bg-card) 0%, #f0ebe2 100%);
  padding: 2.5rem 1rem;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.03);
}

.cta-title {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* footer */
.site-footer {
  background: linear-gradient(180deg, var(--green-dark) 0%, #153a2b 100%);
  color: #fff;
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  border-top: 3px solid rgba(212, 168, 75, 0.4);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
}

.site-footer p {
  margin: 0;
}

.site-footer .footer-links {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.site-footer .footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.site-footer .footer-links a:hover {
  text-decoration: underline;
}

/* מסמכים וקבצים */
.docs-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.docs-intro {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 480px;
  margin: 0 auto;
}

.docs-list li {
  margin: 0.5rem 0;
}

.docs-list a {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 500;
}

.docs-list a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .cards-row.three-cards {
    grid-template-columns: 1fr;
  }

  .cards-row.two-cards {
    grid-template-columns: 1fr;
  }

  .main-nav .logo-wrap {
    margin: 0.5rem 0;
    width: 100%;
  }

  .logo {
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {
  .top-links {
    display: none;
  }

  .main-nav a:not(.nav-search) {
    font-size: 0.9rem;
  }

  .card {
    padding: 1rem;
  }

  .cta-actions {
    flex-direction: column;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* טופס צור קשר */
.contact-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  background: linear-gradient(180deg, #faf6f0 0%, #f5f0e8 100%);
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.03);
}

.contact-form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-phone-line {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.contact-phone-line a {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 500;
}
.contact-phone-line a:hover {
  text-decoration: underline;
}
.contact-email-line {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-email-line a {
  color: var(--green-dark);
  text-decoration: none;
}

.contact-email-line a:hover {
  text-decoration: underline;
}

.contact-form-desc {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  font-weight: 500;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-heebo);
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  background: #fff;
  direction: rtl;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--green-dark);
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 77, 58, 0.2);
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 0;
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #c00;
  box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.15);
}

.contact-form button[type="submit"] {
  align-self: flex-start;
  cursor: pointer;
  border: none;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.form-note--dev {
  display: none; /* הסתרת הערת פיתוח ממשתמשי קצה */
}

/* placeholders לתמונות */
img[src*="placeholder"] {
  background: linear-gradient(145deg, #e5e0d8 0%, #d8d4cc 100%);
}

/* עיטורי פינה לכרטיסים (אופציונלי) */
.card-ornament {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0.35;
  pointer-events: none;
}

.card-ornament--top-right {
  top: 8px;
  left: 8px;
  background: url('../images/ornament-corner.svg') no-repeat;
  background-size: contain;
  transform: scaleX(-1) rotate(90deg);
}

.card-ornament--bottom-left {
  bottom: 8px;
  right: 8px;
  background: url('../images/ornament-corner.svg') no-repeat;
  background-size: contain;
  transform: rotate(-90deg);
}
