/* ================================================================
   styles.css — Linshom Landing Page
   ================================================================
   00. CSS Custom Properties
   01. Reset & Base
   02. Utilities
   03. Typography
   04. Buttons
   05. Layout
   06. Logo
   07. Hero
   08. About / Stats
   09. Videos Section
   10. Communities (Glassmorphism)
   11. Stories Carousel
   12. Contact + Donate
   13. Footer
   14. Accessibility
   15. Responsive
================================================================ */


/* ================================================================
   00. CSS Custom Properties
================================================================ */
:root {
  --color-navy:         #1a2e5a;
  --color-navy-hover:   #14234a;
  --color-pink:         #e8b4c4;
  --color-pink-hover:   #dda0b4;
  --color-light-blue:   #8aaede;
  --color-mint:         #a8d5a2;
  --color-mint-hover:   #8fc98a;
  --color-cream:        #fdf8f4;
  --color-white:        #ffffff;

  --gradient-sky-start: #ddf0fb;
  --gradient-sky-mid:   #c2e4f5;
  --gradient-sky-end:   #e8f6ff;

  --font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-bold:     700;
  --fw-extrabold:800;
  --fw-black:    900;

  --fs-sm:   clamp(0.82rem, 1.4vw, 0.9rem);
  --fs-base: clamp(0.95rem, 1.8vw, 1.05rem);
  --fs-lg:   clamp(1.1rem, 2vw, 1.3rem);
  --fs-xl:   clamp(1.35rem, 2.8vw, 1.8rem);
  --fs-2xl:  clamp(1.8rem, 4vw, 2.5rem);
  --fs-3xl:  clamp(2.4rem, 6vw, 3.8rem);

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 9999px;

  --shadow-card:  0 4px 24px rgba(26, 46, 90, 0.08);
  --shadow-hover: 0 10px 36px rgba(26, 46, 90, 0.14);
  --shadow-btn:   0 3px 10px rgba(0, 0, 0, 0.12);

  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  --container-max: 1100px;
  --container-pad: clamp(1.25rem, 5vw, 2.5rem);
}


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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-navy);
  background-color: var(--color-cream);
  direction: rtl;
  text-align: right;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }


/* ================================================================
   02. Utilities
================================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ================================================================
   03. Typography
================================================================ */
.section-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  color: var(--color-navy);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  display: block;
  width: clamp(44px, 8vw, 72px);
  height: clamp(3px, 0.4vw, 5px);
  background: linear-gradient(to left, var(--color-mint), var(--color-light-blue));
  border-radius: var(--radius-pill);
  margin: 0.6rem auto 0;
}


/* ================================================================
   04. Buttons
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(1.2rem, 3vw, 1.8rem);
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-base), border-color var(--transition-base),
              color var(--transition-base), transform var(--transition-base),
              box-shadow var(--transition-base);
  white-space: nowrap;
  line-height: 1;
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-btn); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--color-light-blue); outline-offset: 3px; }

.btn--mint {
  background-color: var(--color-mint); color: var(--color-navy);
  font-size: var(--fs-lg); padding: clamp(0.75rem, 2vw, 1rem) clamp(1.6rem, 4vw, 2.5rem);
}
.btn--mint:hover { background-color: var(--color-mint-hover); }

/* Hero CTA — glassmorphism + mint tint (iPhone-style) */
.hero .btn--mint {
  background: rgba(168, 213, 162, 0.48);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1.5px solid rgba(210, 240, 207, 0.9);
  color: var(--color-navy);
  box-shadow: 0 4px 20px rgba(26, 46, 90, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.hero .btn--mint:hover {
  background: rgba(168, 213, 162, 0.88);
  box-shadow: 0 8px 28px rgba(26, 46, 90, 0.20),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
}

.btn--outline {
  background-color: transparent; color: var(--color-navy); border-color: var(--color-navy);
}
.btn--outline:hover { background-color: var(--color-navy); color: var(--color-white); }

.btn--accent { background-color: var(--color-pink); color: var(--color-navy); }
.btn--accent:hover { background-color: var(--color-pink-hover); }

.btn--youtube { background-color: #ff0000; color: #fff; }
.btn--youtube:hover { background-color: #cc0000; color: #fff; }

.btn--spotify { background-color: #1db954; color: #fff; }
.btn--spotify:hover { background-color: #17a045; color: #fff; }

/* Glassmorphism button — used in communities section */
.btn--glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: var(--color-navy);
  font-size: var(--fs-lg);
  padding: 0.9rem 2rem;
}
.btn--glass:hover {
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(26,46,90,0.15);
}


/* ================================================================
   05. Layout
================================================================ */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-pad); }


/* ================================================================
   06. Logo
================================================================ */
.logo { display: flex; align-items: center; }
.logo__img        { height: clamp(42px, 5.5vw, 72px); width: auto; display: block; }
.logo__img--footer { height: clamp(38px, 5vw, 56px); }


/* ================================================================
   07. Hero
================================================================ */
.hero {
  position: relative;
  min-height: 100svh; min-height: 100vh;
  background:
    linear-gradient(180deg,
      rgba(10, 22, 58, 0.67) 0%,
      rgba(10, 22, 58, 0.55) 35%,
      rgba(10, 22, 58, 0.20) 62%,
      rgba(10, 22, 58, 0.00) 100%
    ),
    url('hero-bg.jpeg') center 60% / cover no-repeat;
  display: flex; flex-direction: column; overflow: hidden;
}
.hero__nav {
  padding: var(--space-md) var(--container-pad);
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 2;
}
.hero__nav-cta {
  font-size: clamp(0.78rem, 2.2vw, 1rem) !important;
  padding: clamp(0.4rem, 1.2vw, 0.65rem) clamp(0.9rem, 2.5vw, 1.4rem) !important;
  background: rgba(220, 245, 215, 0.72) !important;
  border: 1.5px solid rgba(200, 240, 195, 0.85) !important;
  color: var(--color-navy) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 12px rgba(26,46,90,0.10), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}
.hero__nav-cta:hover {
  background: rgba(220, 245, 215, 0.90) !important;
  transform: translateY(-2px);
}
.hero__content {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; text-align: center;
  padding: clamp(1.5rem,4vh,3.5rem) var(--container-pad) 0;
  gap: 1rem; position: relative; z-index: 2;
}
.hero__tagline { font-size: var(--fs-lg); font-weight: var(--fw-medium); color: rgba(255,255,255,0.90); letter-spacing: 0.02em; text-shadow: 0 1px 8px rgba(0,0,0,0.55); }
.hero__heading { font-size: var(--fs-3xl); font-weight: var(--fw-black); color: #ffffff; line-height: 1.12; max-width: 12ch; text-shadow: 0 2px 16px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.35); }
.hero__subheading { font-size: var(--fs-xl); font-weight: var(--fw-medium); color: rgba(255,255,255,0.92); margin-bottom: 0.5rem; text-shadow: 0 1px 8px rgba(0,0,0,0.55); }

.hero::before {
  content: ''; position: absolute; top: -10%; inset-inline-end: -8%;
  width: 45vw; height: 45vw; max-width: 400px; max-height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 15%; inset-inline-start: -5%;
  width: 30vw; height: 30vw; max-width: 280px; max-height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hero__wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; z-index: 1; }
.hero__wave svg { width: 100%; height: auto; fill: var(--color-cream); }


/* ================================================================
   08. About / Stats
================================================================ */
.about { background-color: var(--color-cream); padding: var(--space-lg) var(--container-pad); }
.about .container { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
.about__text { font-size: var(--fs-lg); font-weight: var(--fw-regular); color: var(--color-navy); max-width: 66ch; text-align: center; line-height: 1.9; opacity: 0.88; }

.stats { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; }
.stats__item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.75rem var(--space-md); min-width: 120px; }
.stats__item + .stats__item { border-inline-end: 2px solid var(--color-pink); }
.stats__number { font-size: var(--fs-2xl); font-weight: var(--fw-black); color: var(--color-navy); line-height: 1; display: block; }
.stats__label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--color-light-blue); text-transform: uppercase; letter-spacing: 0.07em; display: block; }


/* ================================================================
   09. Videos Section
================================================================ */
.videos-section {
  background: linear-gradient(160deg, #111e3d 0%, #1a2e5a 60%, #1e3566 100%);
  padding: var(--space-lg) var(--container-pad);
}

/* Section title + desc override for dark background */
.videos-section .section-title { color: #fff; }
.videos-section .section-title::after {
  background: linear-gradient(to left, #a8d5a2, #8aaede);
}

.videos-section__desc {
  text-align: center;
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--space-lg);
  margin-top: 0.5rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Dark card wrapping each video */
.video-card {
  background: #162247;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.55);
}

.video-card__info {
  padding: clamp(0.65rem, 1.8vw, 0.9rem) clamp(0.75rem, 2vw, 1.1rem) clamp(0.75rem, 2vw, 1.1rem);
}
.video-card__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: #fff;
  margin: 0 0 clamp(0.25rem, 0.6vw, 0.35rem);
  line-height: 1.4;
}
.video-card__subtitle {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.75);
  line-height: 1.55;
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.35s ease, margin 0.35s ease;
}
.video-card:hover .video-card__subtitle {
  max-height: 160px;
  opacity: 1;
  margin: 0 0 clamp(0.28rem, 0.7vw, 0.4rem);
}
.video-card__desc {
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
  color: rgba(255,255,255,0.4);
  line-height: 1.55;
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 0;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* YouTube Lite embed */
.video-wrapper.yt-lite { cursor: pointer; }
.yt-thumb {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.yt-lite:hover .yt-thumb { opacity: 0.82; }
.yt-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: none; border: none; padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.2s;
}
.yt-lite:hover .yt-play { transform: translate(-50%, -50%) scale(1.1); }

/* Hide extra video cards — desktop only */
@media (min-width: 701px) {
  .videos-grid .video-card--extra { display: none !important; }
  .videos-grid .video-card--extra.visible { display: block !important; }
}

/* Show more button — desktop only */
.videos-show-more {
  display: flex;
  justify-content: center;
  margin-top: var(--space-md);
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .videos-show-more { display: none; }
}
.btn--show-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 9999px;
  padding: 0.65rem 1.8rem;
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: 0.03em;
}
.btn--show-more:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
  color: #fff;
}
.btn--show-more__icon {
  transition: transform var(--transition-base);
  flex-shrink: 0;
}
.btn--show-more[aria-expanded="true"] .btn--show-more__icon {
  transform: rotate(180deg);
}

/* Placeholder style (if no iframe) */
.video-wrapper--placeholder {
  background: linear-gradient(135deg, #1a2e5a 0%, #2a4a8a 100%);
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: rgba(255,255,255,0.5);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--space-md);
}

.videos-section__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}


/* ================================================================
   10. Communities (Glassmorphism)
================================================================ */
.communities {
  background: linear-gradient(145deg,
    #6bb8d4 0%,
    #87ceeb 30%,
    #a8dcf0 60%,
    #c5e9f7 100%);
  padding: var(--space-xl) var(--container-pad);
  position: relative;
  overflow: hidden;
}

/* Decorative blobs in background */
.communities::before {
  content: '';
  position: absolute;
  top: -15%;
  inset-inline-start: -10%;
  width: 50vw; height: 50vw;
  max-width: 500px; max-height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.communities::after {
  content: '';
  position: absolute;
  bottom: -10%;
  inset-inline-end: -8%;
  width: 40vw; height: 40vw;
  max-width: 400px; max-height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

/* --- Header --- */
.communities__header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: var(--space-md);
  margin-bottom: var(--space-lg);
  position: relative; z-index: 1;
}

.communities__title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: var(--fw-black);
  color: var(--color-navy);
  line-height: 1.05;
  text-align: right;
  flex-shrink: 0;
  text-shadow: 0 2px 20px rgba(255,255,255,0.3);
}

.communities__meta {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: var(--space-sm);
  padding-top: 0.5rem;
}

.communities__stat-line {
  font-size: var(--fs-xl); font-weight: var(--fw-black);
  color: var(--color-navy); line-height: 1.2;
}

.communities__stat-sub {
  font-size: var(--fs-lg); font-weight: var(--fw-light);
  color: var(--color-navy); opacity: 0.7;
  margin-top: -0.5rem;
}

/* --- Tabs --- */
.comm-tabs {
  display: flex;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  margin-bottom: var(--space-md);
  position: relative; z-index: 1;
  gap: 0;
}

.comm-tab {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-family); font-size: var(--fs-base); font-weight: var(--fw-bold);
  color: var(--color-navy);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none; border-bottom: 3px solid transparent;
  margin-bottom: -2px; cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base);
  opacity: 0.65;
}
.comm-tab:hover { opacity: 0.9; background: rgba(255,255,255,0.25); }
.comm-tab--active {
  opacity: 1;
  background: rgba(255,255,255,0.35);
  border-bottom-color: var(--color-navy);
}
/* Facebook active — רקע לבן + טקסט/אייקון כחול פייסבוק */
#btn-facebook.comm-tab--active {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: #1877F2;
  color: #1877F2;
}
#btn-facebook.comm-tab--active svg { fill: #1877F2; color: #1877F2; }

/* WhatsApp active — רקע לבן + טקסט/אייקון ירוק וואטסאפ */
#btn-whatsapp.comm-tab--active {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: #25D366;
  color: #25D366;
}
#btn-whatsapp.comm-tab--active svg { fill: #25D366; color: #25D366; }
.comm-tab:focus-visible { outline: 3px solid white; outline-offset: 2px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

/* --- Panels --- */
.comm-panel--hidden { display: none; }

/* --- Grid --- */
.comm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 0.65rem;
  position: relative; z-index: 1;
}

/* --- Community item — glassmorphism --- */
.comm-item {
  display: flex; align-items: center; gap: clamp(0.5rem, 1.2vw, 0.75rem);
  padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(0.65rem, 1.5vw, 0.9rem);
  /* Apple-style glassmorphism */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(26,46,90,0.06), inset 0 1px 0 rgba(255,255,255,0.5);
  text-decoration: none; color: var(--color-navy);
  transition: background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}
.comm-item:hover {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 28px rgba(26,46,90,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  transform: translateY(-2px);
}
.comm-item:focus-visible { outline: 3px solid rgba(255,255,255,0.8); outline-offset: 2px; }

.comm-item__badge {
  width: clamp(38px, 4.5vw, 48px); height: clamp(38px, 4.5vw, 48px); border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.comm-item__badge svg { width: 100%; height: 100%; }
.comm-item__badge--img { padding: 0; overflow: hidden; background: none; }
.comm-item__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.comm-badge--teal   { background: linear-gradient(135deg, #4ecdc4, #38b2ac); }
.comm-badge--blue   { background: linear-gradient(135deg, #45b7d1, #2b9cbe); }
.comm-badge--green  { background: linear-gradient(135deg, #96ceb4, #72b89a); }
.comm-badge--purple { background: linear-gradient(135deg, #c9b0d6, #b095c4); }
.comm-badge--pink   { background: linear-gradient(135deg, #e8b4c4, #d490a8); }

.comm-item__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comm-item__name {
  font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--color-navy); line-height: 1.3;
  overflow: visible;
}
.comm-item__count { font-size: clamp(0.76rem, 1.3vw, 0.88rem); font-weight: var(--fw-medium); color: rgba(26,46,90,0.65); }


/* ================================================================
   11. Stories Carousel
================================================================ */
.stories-section {
  background-color: var(--color-cream);
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.stories-section .container {
  margin-bottom: var(--space-md);
}

.stories-section__desc {
  text-align: center;
  font-size: var(--fs-lg);
  color: var(--color-navy);
  opacity: 0.65;
  margin-top: 0.5rem;
}

/* Wrapper holds carousel + nav arrows */
.stories-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--container-pad);
}

/* Horizontal scroll track */
.stories-carousel {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #e8b4c4 rgba(26,46,90,0.08);
  padding: var(--space-sm) 0 var(--space-md);
  flex: 1;
}
.stories-carousel::-webkit-scrollbar        { height: 4px; }
.stories-carousel::-webkit-scrollbar-track  { background: rgba(26,46,90,0.08); border-radius: 9999px; }
.stories-carousel::-webkit-scrollbar-thumb  {
  background: linear-gradient(to left, #e8b4c4, #a8d5a2, #8aaede);
  border-radius: 9999px;
}

/* Story card */
.story-card {
  scroll-snap-align: start;
  flex: 0 0 280px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.story-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

/* Photo cover (top of card) */
.story-card__cover {
  position: relative;
  height: clamp(180px, 22vw, 240px);
  overflow: hidden;
  flex-shrink: 0;
}
.story-card__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.45s ease;
}
.story-card:hover .story-card__photo { transform: scale(1.06); }

/* Gradient overlay at bottom of photo */
.story-card__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(0.65rem, 1.5vw, 0.9rem) clamp(0.5rem, 1.2vw, 0.75rem);
  background: linear-gradient(to top, rgba(10,22,50,0.88) 0%, rgba(10,22,50,0.4) 55%, transparent 100%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.story-card__name {
  color: #fff;
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.story-card__condition {
  display: inline-block;
  font-size: clamp(0.68rem, 1.1vw, 0.76rem);
  font-weight: var(--fw-medium);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255,255,255,0.35);
  white-space: nowrap;
  flex-shrink: 0;
}
/* Accent color per card variant */
.story-card__cover--teal   .story-card__condition { background: rgba(232,180,196,0.55); } /* COPD → ורוד */
.story-card__cover--pink   .story-card__condition { background: rgba(232,180,196,0.55); } /* COPD → ורוד */
.story-card__cover--blue   .story-card__condition { background: rgba(232,180,196,0.55); } /* COPD → ורוד */
.story-card__cover--green  .story-card__condition { background: rgba(150,206,180,0.45); }
.story-card__cover--purple .story-card__condition { background: rgba(155,89,182,0.72); } /* יתר לחץ דם ריאתי → סגול */
.story-card__cover--navy   .story-card__condition { background: rgba(168,213,162,0.60); } /* ארי → ירוק לוגו */
.story-card__cover--amber  .story-card__condition { background: rgba(41,128,185,0.75); }  /* פיברוזיס ריאתי → תכלת */
.story-card__cover--coral  .story-card__condition { background: rgba(41,128,185,0.75); }  /* פיברוזיס ריאתי → תכלת */
.story-card__cover--rose   .story-card__condition { background: rgba(168,213,162,0.60); }  /* השתלת ריאות → ירוק */
.story-card__cover--gold   .story-card__condition { background: rgba(243,156,18,0.78); }   /* אסתמה → זהוב */
.story-card__cover--sky    .story-card__condition { background: rgba(22,160,133,0.78); }   /* ברונכיאקטזיס → טורקיז */
.story-card__cover--fuchsia .story-card__condition { background: rgba(183,28,143,0.78); }  /* PCD → פוקסיה */
.story-card__cover--rose   .story-card__conditions .story-card__condition:first-child { background: rgba(211,84,0,0.72); } /* סקלרודרמה → כתום-חרוך */
.story-card__cover--navy   .story-card__conditions .story-card__condition:last-child  { background: rgba(41,128,185,0.75); }  /* פיברוזיס ריאתי → תכלת */

/* Multiple condition tags wrapper */
.story-card__conditions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Card body (quote + button) */
.story-card__body {
  padding: clamp(0.85rem, 2vw, 1.1rem) clamp(1rem, 2.2vw, 1.25rem) clamp(1rem, 2.2vw, 1.25rem);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-sm);
}
.story-card__quote {
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  color: var(--color-navy);
  line-height: 1.75;
  flex: 1;
  font-style: italic;
}
.story-card__btn { align-self: flex-start; margin-top: auto; font-size: var(--fs-sm); padding: 0.55rem 1.2rem; }
.story-card__tag {
  display: inline-flex; align-items: center;
  background: rgba(26,46,90,0.08);
  color: #1a2e5a;
  border-radius: 9999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Navigation arrows */
.carousel-btn {
  flex-shrink: 0;
  width: clamp(48px, 5vw, 56px); height: clamp(48px, 5vw, 56px); border-radius: 50%;
  background: var(--color-white);
  border: 1.5px solid rgba(26,46,90,0.15);
  color: var(--color-navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  transition: background var(--transition-base), transform var(--transition-base);
  z-index: 2;
}
.carousel-btn:hover { background: var(--color-navy); color: white; transform: scale(1.05); }
.carousel-btn:focus-visible { outline: 3px solid var(--color-light-blue); outline-offset: 2px; }

/* Dots */
.carousel-dots {
  display: flex; justify-content: center; gap: 0.5rem;
  margin-top: 0; padding-bottom: var(--space-md);
}
.carousel-dot {
  width: clamp(8px, 1.2vw, 11px); height: clamp(8px, 1.2vw, 11px); border-radius: 50%;
  background: rgba(26,46,90,0.2);
  transition: background var(--transition-base), transform var(--transition-base);
}
.carousel-dot--active {
  background: var(--color-navy);
  transform: scale(1.3);
}


/* ================================================================
   12. Contact + Donate
================================================================ */
.bottom-section {
  background: linear-gradient(160deg, #f0f8ff 0%, var(--color-cream) 60%);
  padding: var(--space-xl) var(--container-pad);
}

.bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.bottom-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: var(--space-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.bottom-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.bottom-card__icon {
  width: clamp(52px, 6vw, 72px); height: clamp(52px, 6vw, 72px); border-radius: 50%;
  background: var(--gradient-sky-end);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-navy);
  flex-shrink: 0;
}
.bottom-card__icon--pink { background: #fceef3; color: #c2547e; }

.bottom-card__title { font-size: var(--fs-xl); font-weight: var(--fw-black); color: var(--color-navy); }
.bottom-card__desc { font-size: var(--fs-base); color: var(--color-navy); opacity: 0.7; line-height: 1.7; flex: 1; }


/* ================================================================
   13. Footer
================================================================ */
.footer { background-color: var(--color-navy); color: var(--color-white); padding: var(--space-lg) var(--container-pad); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); text-align: center; }

.footer__social { display: flex; gap: var(--space-md); align-items: center; flex-wrap: wrap; justify-content: center; }

.social-link {
  width: clamp(48px, 5vw, 54px); height: clamp(48px, 5vw, 54px); border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition-base), transform var(--transition-base);
  color: var(--color-white);
}
.social-link:hover { background: rgba(255,255,255,0.28); transform: translateY(-3px); }
.social-link:focus-visible { outline: 3px solid var(--color-light-blue); outline-offset: 3px; }

.footer__copyright { font-size: var(--fs-sm); opacity: 0.55; color: var(--color-white); }


/* ================================================================
   14. Accessibility
================================================================ */
.skip-link {
  position: absolute; top: -100%;
  inset-inline-start: var(--space-sm);
  background: var(--color-navy); color: var(--color-white);
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  font-weight: var(--fw-bold); font-family: var(--font-family);
  z-index: 9999; transition: top var(--transition-base); text-decoration: none;
}
.skip-link:focus { top: var(--space-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}


/* ================================================================
   15. Responsive
================================================================ */
@media (max-width: 960px) {
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .videos-grid .video-card:last-child { grid-column: 1 / -1; max-width: 500px; justify-self: center; }
}

/* ---- Tablet 768px ---- */
@media (max-width: 768px) {
  /* Communities header */
  .communities__title { font-size: clamp(2.8rem, 8vw, 4rem); }
  .communities__stat-line { font-size: var(--fs-lg); }

  /* Story cards slightly smaller */
  .story-card { flex: 0 0 260px; }
  .story-card__cover { height: clamp(180px, 20vw, 210px); }

  /* Bottom grid stays 2-col until 700px */
  .bottom-grid { gap: var(--space-sm); }

  /* Tabs font */
  .comm-tab { font-size: var(--fs-sm); padding: 0.7rem 1.2rem; }
}

@media (max-width: 700px) {
  /* Videos: horizontal swipe carousel on mobile */
  .videos-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: #a8d5a2 rgba(255,255,255,0.15);
    gap: var(--space-sm);
    padding-bottom: 14px;
  }
  .videos-grid::-webkit-scrollbar        { height: 8px; }
  .videos-grid::-webkit-scrollbar-track  { background: rgba(255,255,255,0.15); border-radius: 9999px; }
  .videos-grid::-webkit-scrollbar-thumb  { background: linear-gradient(to left, #a8d5a2, #8aaede); border-radius: 9999px; min-width: 40px; }
  .videos-grid .video-card {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
  .videos-grid .video-card .video-wrapper {
    padding-bottom: 56.25%; /* 16:9 — relative to .video-card width */
  }
  /* On mobile (no hover) — always show subtitle, clamped to 2 lines */
  .video-card .video-card__subtitle {
    max-height: 200px;
    opacity: 1;
    margin: 0 0 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .comm-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
  .communities__header { flex-direction: column; gap: var(--space-sm); }
  .communities__title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .comm-tab { flex: 1; justify-content: center; padding: 0.65rem 0.75rem; font-size: var(--fs-sm); }
  .stories-carousel-wrap { padding: 0 var(--space-sm); }
  .carousel-btn { display: none; }
  .story-card { flex: 0 0 250px; }
  .story-card__cover { height: 200px; }
}

@media (max-width: 480px) {
  /* Shrink spacing tokens so sections don't have excessive padding */
  :root {
    --space-xl: 3rem;
    --space-lg: 2rem;
    --space-md: 1.5rem;
  }

  /* Hero: mobile height + logo + button size */
  .hero { min-height: 80svh; min-height: 80vh; }
  .hero__content { padding-top: var(--space-lg); padding-bottom: calc(var(--space-xl) + 2rem); }
  .hero .logo__img { height: 57px; }
  .hero__nav-cta {
    font-size: 1rem !important;
    padding: 0.68rem 1.53rem !important;
    background: rgba(168, 220, 155, 0.62) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
    border: 1.5px solid rgba(200, 240, 195, 0.65) !important;
    box-shadow: 0 2px 12px rgba(26,46,90,0.10), inset 0 1px 0 rgba(255,255,255,0.7) !important;
  }

  /* Stats: stack vertically */
  .stats { flex-direction: column; align-items: center; }
  .stats__item { width: 100%; text-align: center; padding: 1rem 0; }
  .stats__item + .stats__item { border-inline-end: none; border-top: 2px solid var(--color-pink); }

  /* Hero CTA button */
  .btn--mint { padding: 0.9rem 1.8rem; font-size: var(--fs-base); }

  /* Platform buttons: stack + full width */
  .videos-section__actions { flex-direction: column; align-items: center; }
  .videos-section__actions .btn { width: 100%; max-width: 280px; justify-content: center; }

  /* Story cards: slightly narrower */
  .story-card { flex: 0 0 230px; }
  .story-card__cover { height: 185px; }

  /* Contact/Donate cards: reduce inner padding */
  .bottom-card { padding: 2rem 1.5rem; }

  /* Footer */
  .footer__social { gap: var(--space-sm); }
}

@media (min-width: 1200px) {
  :root { --container-pad: 3rem; }
}
