/* landing.css — דף הבית, בהשראת האתר המקורי: פס ירוק למעלה, שורת חיפוש גדולה,
   וכרטיסים צבעוניים (בית ספר ← קבוצה ← סיסמה). מיועד לילדים: גדול, צבעוני, זז. */

/* ── הכותרת הירוקה ── */
.hero-band {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  padding: 30px 16px 64px;
  background: linear-gradient(120deg, #14a3a8, #0b5f8a 45%, #0e8a9a 70%, #14a3a8);
  background-size: 300% 300%; animation: band-shift 14s ease-in-out infinite;
  border-radius: 0 0 36px 36px; box-shadow: 0 8px 0 rgba(11, 95, 138, .18);
}
@keyframes band-shift { 0%, 100% { background-position: 0% 50% } 50% { background-position: 100% 50% } }
.hero-band .brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; text-shadow: 0 3px 0 rgba(0, 0, 0, .14); position: relative; z-index: 1; animation: brand-in 700ms var(--spring) both; }
.hero-band .brand .logo-mark { background: #fff; border-radius: 20px; padding: 4px; box-shadow: 0 5px 0 rgba(0, 0, 0, .14); animation: bob 3s ease-in-out infinite; transition: transform var(--t-med) var(--spring); }
.hero-band .brand:hover .logo-mark { transform: rotate(-12deg) scale(1.1); }
@keyframes brand-in { from { opacity: 0; transform: scale(.6) translateY(10px) } to { opacity: 1; transform: none } }
.tagline { margin: 6px 0 12px; font-size: clamp(1rem, 2.6vw, 1.2rem); font-weight: 500; opacity: .95; position: relative; z-index: 1; animation: rise 500ms var(--ease) 200ms both; }
.hero-band .chip-season { display: inline-flex; gap: 6px; align-items: center; color: #fff; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 5px 14px; font-size: .86rem; font-weight: 700; position: relative; z-index: 1; animation: rise 500ms var(--ease) 320ms both; }

/* ── התוכן ── */
main { max-width: 1000px; margin: -34px auto 0; padding: 0 16px 48px; position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--c-surface); border-radius: 22px; padding: 14px 18px; box-shadow: 0 6px 0 rgba(22, 48, 58, .06), var(--shadow); animation: rise 420ms var(--ease) both; }
.count { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 3.4vw, 1.7rem); color: var(--c-primary); overflow-wrap: anywhere; }
.count.bump { animation: bump 420ms var(--spring); }
@keyframes bump { 0% { transform: scale(.85); opacity: .3 } 100% { transform: none; opacity: 1 } }
.btn-create { font-size: 1.05rem; min-height: 52px; padding: 10px 24px; position: relative; overflow: hidden; }
.btn-create::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(120%); animation: shine 4.5s ease-in-out 1.5s infinite; }
.btn-create:hover { animation: wiggle .5s ease-in-out; }
@keyframes shine { 0%, 70% { transform: translateX(120%) } 100% { transform: translateX(-120%) } }

.search-bar { position: relative; animation: rise 420ms var(--ease) 80ms both; }
.search-bar input { width: 100%; min-height: 64px; padding: 14px 58px 14px 18px; border-radius: 20px; border: 3px solid var(--c-border); background: var(--c-surface); font-size: 1.2rem; font-weight: 500; color: var(--c-text); box-shadow: 0 5px 0 rgba(22, 48, 58, .05); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.search-bar input::placeholder { color: #86a3aa; }
.search-bar input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 5px rgba(12, 116, 137, .16), 0 5px 0 rgba(22, 48, 58, .05); }
.search-bar .search-icon { position: absolute; right: 20px; top: 50%; translate: 0 -50%; color: var(--c-muted); pointer-events: none; transition: color var(--t-fast), transform var(--t-med) var(--spring); }
.search-bar .search-icon .i { width: 1.5em; height: 1.5em; }
.search-bar:focus-within .search-icon { color: var(--c-primary); transform: scale(1.2) rotate(-12deg); }

/* ── כרטיסים ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; text-align: center; text-decoration: none; color: var(--c-text);
  background: var(--c-surface); border: 3px solid transparent; border-radius: 24px; overflow: hidden; padding: 0;
  box-shadow: 0 6px 0 rgba(22, 48, 58, .07), var(--shadow);
  animation: pop 460ms var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform var(--t-med) var(--spring), border-color var(--t-fast), box-shadow var(--t-fast);
}
button.tile, a.tile { cursor: pointer; }
button.tile:hover, a.tile:hover, button.tile:focus-visible, a.tile:focus-visible { transform: translateY(-6px) rotate(-1.2deg); border-color: var(--c-sun); box-shadow: 0 10px 0 rgba(22, 48, 58, .08), var(--shadow-lg); }
button.tile:nth-child(even):hover, a.tile:nth-child(even):hover { transform: translateY(-6px) rotate(1.2deg); }
button.tile:active, a.tile:active { transform: translateY(1px) scale(.98); }
.tile-banner { height: 92px; display: grid; place-items: center; position: relative; overflow: hidden; }
.tile-banner .ghost { position: absolute; font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: rgba(255, 255, 255, .22); white-space: nowrap; letter-spacing: .04em; }
.tile-banner .emo { font-size: 2.7rem; position: relative; z-index: 1; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .15)); transition: transform var(--t-med) var(--spring); }
.tile:hover .tile-banner .emo { transform: scale(1.22) rotate(-10deg); }
.tile:hover .tile-banner .emo.bot { animation: bot-dance .6s ease-in-out infinite; }
@keyframes bot-dance { 0%, 100% { transform: scale(1.2) rotate(-10deg) } 50% { transform: scale(1.2) rotate(10deg) translateY(-4px) } }
.tile-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .45) 50%, transparent 62%); transform: translateX(130%); }
.tile:hover .tile-banner::after { transition: transform .7s var(--ease); transform: translateX(-130%); }
.tile-body { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 14px 18px; flex: 1; }
.tile-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.tile-meta { font-size: .9rem; color: var(--c-muted); }
.tile-go { margin-top: auto; padding-top: 10px; font-weight: 800; color: var(--c-primary); font-size: .98rem; transition: transform var(--t-fast) var(--ease); }
.tile:hover .tile-go { transform: translateX(-6px); }

/* כרטיסים מקווקווים: "מסגרת אחרת", "הקבוצה שלנו לא כאן", "קבוצה חדשה" */
.tile-dashed { justify-content: center; align-items: center; gap: 4px; padding: 20px 14px; min-height: 180px; background: color-mix(in srgb, var(--c-surface) 65%, transparent); border: 3px dashed var(--c-border); box-shadow: none; }
.tile-dashed:hover { background: var(--c-surface); }
.tile-note { justify-content: center; align-items: center; gap: 6px; padding: 24px 14px; min-height: 180px; box-shadow: none; background: transparent; }
.tile-note.wide { grid-column: 1 / -1; min-height: 0; }
.big-emo { font-size: 2.6rem; line-height: 1.1; display: inline-block; transition: transform var(--t-med) var(--spring); }
.tile:hover .big-emo { transform: scale(1.2) rotate(-8deg); }
.spin-bot { animation: bot-dance .7s ease-in-out infinite; }

/* "איך נכנסים?" */
.tile-how { padding: 18px 16px 16px; gap: 10px; justify-content: center; background: #fff8de; border-color: #f4dc8f; }
.tile-how .tile-title { color: #5c4500; }
.how { list-style: none; margin: 4px 0; padding: 0; display: flex; justify-content: space-around; gap: 4px; }
.how li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .84rem; font-weight: 700; color: #5c4500; line-height: 1.25; position: relative; flex: 1; }
.how li + li::before { content: '←'; position: absolute; right: -10px; top: 14px; color: #d4a400; font-weight: 900; animation: nudge 1.4s ease-in-out infinite; }
.how-emo { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 4px 0 #f4dc8f; animation: bob 2.4s ease-in-out infinite; }
.how li:nth-child(2) .how-emo { animation-delay: .3s } .how li:nth-child(3) .how-emo { animation-delay: .6s }
.tile-how .tile-meta { color: #6e5a1c; font-size: .85rem; }

/* "לוח לדוגמה" עם תצוגה מקדימה קטנה וזזה */
.tile-demo { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: linear-gradient(135deg, #2f6df6, #7c5cd6); color: #fff; border-color: transparent; }
.tile-demo .tile-body { align-items: flex-start; text-align: right; justify-content: center; padding: 18px 20px; }
.tile-demo .tile-title { font-size: 1.35rem; }
.tile-demo .tile-meta { color: rgba(255, 255, 255, .9); }
.tile-demo .tile-go { color: #fff; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 8px 16px; margin-top: 12px; }
.demo-preview { margin: 16px 16px 16px 0; background: #fff; border-radius: 16px; padding: 12px; color: var(--c-text); display: grid; gap: 10px; align-content: center; box-shadow: 0 5px 0 rgba(0, 0, 0, .15); transform: rotate(2deg); transition: transform var(--t-med) var(--spring); }
.tile-demo:hover .demo-preview { transform: rotate(-1deg) scale(1.04); }
.dp-top { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.dp-top b { flex: 1; text-align: right; }
.dp-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--c-accent); display: grid; place-items: center; }
.dp-score { background: var(--c-sun); color: var(--c-ink); font-weight: 800; border-radius: 999px; padding: 2px 9px; font-size: .8rem; }
.dp-bars { display: grid; gap: 6px; }
.dp-bars i { display: block; height: 10px; border-radius: 999px; background: #e9f2f3; position: relative; overflow: hidden; }
.dp-bars i::after { content: ''; position: absolute; inset: 0 0 0 auto; width: var(--w); background: var(--c); border-radius: 999px; animation: fill-bar 3.2s var(--ease) infinite; }
.dp-bars i:nth-child(2)::after { animation-delay: .25s } .dp-bars i:nth-child(3)::after { animation-delay: .5s }
@keyframes fill-bar { 0% { width: 0 } 45%, 85% { width: var(--w) } 100% { width: var(--w) } }
.dp-dots { display: flex; gap: 5px; justify-content: flex-start; }
.dp-dots b { width: 16px; height: 16px; border-radius: 50%; background: var(--c-leaf); animation: tick 3.2s var(--spring) infinite; }
.dp-dots b.off { background: #dfeaed; animation: none; }
.dp-dots b:nth-child(2) { animation-delay: .1s } .dp-dots b:nth-child(3) { animation-delay: .2s } .dp-dots b:nth-child(4) { animation-delay: .3s } .dp-dots b:nth-child(5) { animation-delay: .4s }

/* "שוב כאן?" — הקבוצות שנכנסו מהמכשיר הזה */
.mine { background: var(--c-surface); border-radius: 22px; padding: 14px 16px 16px; box-shadow: 0 6px 0 rgba(22, 48, 58, .06), var(--shadow); animation: rise 420ms var(--ease) both; }
.mine h2 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.wave { display: inline-block; transform-origin: 70% 80%; animation: wiggle 1.1s ease-in-out 3; }
.cards-sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile-mine { flex-direction: row; align-items: center; border: 3px solid var(--c-border); box-shadow: none; border-radius: 18px; text-align: right; }
.tile-mine:hover { border-color: var(--c-sun); transform: translateY(-3px); }
.mine-go { flex: 1; display: flex; align-items: center; gap: 12px; background: none; border: none; padding: 10px 12px; min-width: 0; text-align: right; }
.mine-go .tile-title { font-size: 1.08rem; display: block; }
.mine-go .tile-meta { display: block; font-size: .8rem; }
.mine-text { flex: 1; min-width: 0; }
.mine-arrow { font-weight: 900; color: var(--c-primary); font-size: 1.2rem; transition: transform var(--t-fast); }
.tile-mine:hover .mine-arrow { transform: translateX(-5px); }
.tile-mine .avatar { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1rem; overflow: hidden; flex-shrink: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.tile-mine .avatar img { width: 100%; height: 100%; object-fit: cover; }
.tile-mine .forget { background: none; border: none; color: var(--c-muted); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; margin-left: 6px; }
.tile-mine .forget:hover { color: var(--c-danger); background: #fde8e8; }

/* חזרה לבתי הספר */
.back-btn { background: var(--c-surface); border: 2px solid var(--c-border); color: var(--c-primary); font-weight: 800; padding: 8px 16px; margin: 0 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; transition: transform var(--t-fast) var(--spring), border-color var(--t-fast); }
.back-btn:hover { border-color: var(--c-primary); transform: translateX(4px); }
.back-btn:hover .i { animation: nudge-back .6s ease-in-out infinite; }
@keyframes nudge-back { 0%, 100% { transform: translateX(0) } 50% { transform: translateX(4px) } }

/* ── חלונות ── */
.links-row { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 8px; font-size: .9rem; }
.links-row button { background: none; border: none; color: var(--c-primary); text-decoration: underline dotted; padding: 8px 0; font-weight: 700; min-height: 38px; }
.modal .links-row { justify-content: center; }
/* השלמה אוטומטית (בחלון "קבוצה חדשה") */
.ac-list { position: absolute; top: calc(100% + 6px); right: 0; left: 0; background: var(--c-surface); border: 2px solid var(--c-primary); border-radius: 14px; z-index: 50; max-height: 290px; overflow-y: auto; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; text-align: right; animation: unfold var(--t-med) var(--ease); }
.ac-item { background: none; border: none; text-align: right; padding: 11px 14px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; border-bottom: 1px solid var(--c-border); font-size: 1rem; min-height: 46px; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item:focus { background: var(--c-accent); outline: none; }
.ac-item .ac-meta { color: var(--c-muted); font-size: .78rem; }
.ac-other { color: var(--c-primary); font-weight: 800; justify-content: flex-start; gap: 6px; }
/* חלון סיסמה */
.pw-team { display: flex; align-items: center; gap: 12px; background: var(--c-accent); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; }
.pw-team .avatar { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.1rem; flex-shrink: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); animation: pop .45s var(--spring); }
.pw-team b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; overflow-wrap: anywhere; }
.pw-team small { color: var(--c-muted); }
#login-pw { min-height: 56px; font-size: 1.2rem; }
/* הקבוצה נוצרה */
.created-hero { text-align: center; padding: 6px 0 14px; }
.created-hero .big { font-size: 3.4rem; line-height: 1; animation: pop .5s var(--ease), bob 2.6s ease-in-out .6s infinite; }
.created-hero h3 { margin: 6px 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.secret-row { background: #fffbea; border: 1px solid #efdf9a; border-radius: 12px; padding: 12px 14px; margin-top: 14px; color: #33290a; }
.secret-row label { font-size: .86rem; font-weight: 700; display: block; margin-bottom: 6px; }
.secret-row .row { margin-top: 8px; }

/* ── טלפון ── */
@media (max-width: 700px) {
  .hero-band { padding: 22px 12px 62px; border-radius: 0 0 26px 26px; }
  main { padding: 0 12px 40px; }
  .topbar-row { padding: 12px 14px; }
  .btn-create { width: 100%; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cards-sm { grid-template-columns: 1fr; }
  .tile-demo, .tile-how { grid-column: 1 / -1; }
  .tile-demo { grid-template-columns: 1fr; }
  .demo-preview { margin: 14px 14px 0; transform: rotate(1deg); }
  .tile-banner { height: 72px; }
  .tile-banner .emo { font-size: 2.1rem; }
  .tile-title { font-size: 1.05rem; }
  .tile-body { padding: 10px 10px 14px; }
  .tile-dashed, .tile-note { min-height: 150px; }
  .search-bar input { min-height: 58px; font-size: 1.08rem; }
}
@media (max-width: 360px) { .cards { grid-template-columns: 1fr; } }

/* ── נושא העונה: הסבר קצר + סרטון + שלוש תמונות ── */
.season { margin-top: 10px; background: linear-gradient(160deg, #0b5f8a, #0c7489 50%, #14a3a8); color: #fff; border-radius: 26px; padding: 24px; box-shadow: 0 8px 0 rgba(11, 95, 138, .18); animation: rise 500ms var(--ease) 150ms both; }
.season-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; align-items: center; }
.season-badge { display: inline-block; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .86rem; }
.season h2 { margin: 12px 0 10px; }
/* הלוגו הרשמי: על כרטיס לבן עם "אזור בטוח" סביבו (ה-style guide), בלי שינוי בלוגו עצמו */
.season-logo { display: inline-block; background: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: 0 5px 0 rgba(0, 0, 0, .14); }
.season-logo img { display: block; width: min(220px, 56vw); height: auto; }
.season-lead { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.65; }
.season-more { display: flex; gap: 8px 16px; flex-wrap: wrap; margin: 0; font-size: .9rem; }
.season-more a { color: #fff; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
/* הסרטון: תמונה + כפתור ניגון; YouTube נטען רק אחרי לחיצה */
.season-video { min-width: 0; }
.video-facade, .video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: 18px; overflow: hidden; background: #062d3f; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.video-facade { position: relative; padding: 0; cursor: pointer; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease), filter var(--t-med); }
.video-facade:hover img { transform: scale(1.03); filter: brightness(.9); }
.video-facade .play { position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; border-radius: 14px; background: #e02b2b; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: transform var(--t-med) var(--spring); }
.video-facade .play::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; transform: translateX(2px); }
.video-facade:hover .play { transform: scale(1.12); }
.video-cap { margin-top: 8px; font-weight: 700; font-size: .92rem; }
.video-cap small { font-weight: 500; opacity: .85; }
/* שלוש תמונות */
.season-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.photo { margin: 0; background: #fff; color: var(--c-text); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.photo img { display: block; width: 100%; height: 130px; object-fit: cover; }
.photo figcaption { padding: 7px 10px 9px; display: grid; gap: 1px; }
.photo figcaption b { font-size: .9rem; }
.photo figcaption small { font-size: .68rem; color: var(--c-muted); }
.photo figcaption a { color: inherit; }
@media (max-width: 760px) {
  .season { padding: 18px 14px; border-radius: 22px; }
  .season-grid { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .season-more { justify-content: center; }
  .season-photos { gap: 8px; }
  .photo img { height: 84px; }
  .photo figcaption { padding: 6px 6px 8px; }
  .photo figcaption b { font-size: .78rem; }
  .photo figcaption small { font-size: .6rem; }
}
