/* ===== עמוד הבית - קמפוס תלת-מימדי ===== */

.campus-hero {
  position: relative;
  width: 100%;
  height: 100vh; /* fallback */
  height: 100dvh;
  min-height: 580px;
  overflow: hidden;
  background: var(--gradient-hero);
}

#campus-canvas-wrap {
  position: absolute;
  inset: 0;
}

#campus-canvas {
  width: 100%;
  height: 100%;
  display: block;
  /* pan-y lets a vertical swipe scroll the page (the 3D has no touch-drag
     interaction — only wheel/click), while a tap still zooms into the scene.
     `none` here trapped mobile scrolling when a finger was over the canvas. */
  touch-action: pan-y;
  cursor: grab;
}

#campus-canvas:active {
  cursor: grabbing;
}

/* ===== תוויות מבנים ===== */

.campus-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.building-label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -100%);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(11, 17, 32, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.building-label--active {
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  border-color: transparent;
  animation: pulse-label 2.4s infinite;
}

@keyframes pulse-label {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ===== טולטיפ ריחוף ===== */

.campus-tooltip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  background: rgba(11, 17, 32, 0.9);
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ===== מסך טעינה ===== */

.campus-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #0b1120;
  color: rgba(241, 245, 249, 0.65);
  font-weight: 600;
  z-index: 5;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.campus-loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Hero Overlay ===== */

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(var(--header-height) + 32px) clamp(20px, 5vw, 72px) 32px;
  pointer-events: none;
  background: linear-gradient(
    to left,
    rgba(8, 12, 28, 0.80) 0%,
    rgba(8, 12, 28, 0.25) 55%,
    transparent 100%
  );
}

.hero-content {
  pointer-events: auto;
  width: 100%;
  max-width: min(600px, 100%);
  background: rgba(8, 14, 30, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 3.5vw, 48px);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 80px rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--color-primary-light);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.hero-content h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #fff;
  letter-spacing: -0.03em;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.6);
}

.hero-content h1 span {
  background: linear-gradient(90deg, var(--color-accent-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  color: rgba(241, 245, 249, 0.8);
  margin-bottom: 26px;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-hint {
  pointer-events: auto;
  align-self: center;
  background: rgba(11, 17, 32, 0.65);
  color: rgba(241, 245, 249, 0.75);
  font-size: 0.8rem;
  padding: 9px 20px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Show mouse vs touch hint text by input type. */
.hero-hint .hint-touch { display: none; }
@media (pointer: coarse) {
  .hero-hint .hint-desktop { display: none; }
  .hero-hint .hint-touch { display: inline; }
}

/* ===== רמז גלילה ===== */

.scroll-cue {
  pointer-events: auto;
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 600;
  animation: scroll-bounce 2.4s ease-in-out infinite;
}

.scroll-cue svg {
  width: 22px;
  height: 22px;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50% { transform: translate(-50%, 7px); opacity: 1; }
}

/* ===== Section כותרות ===== */

.section-title {
  text-align: center;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 900;
  margin: 88px 0 40px;
  color: var(--color-text);
  position: relative;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 5px;
  margin: 16px auto 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 50%, #f59e0b 100%);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

/* ===== כרטיסי תכונות ===== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-bottom: 64px;
}

.feature-card {
  background: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: 0 4px 24px rgba(13,21,38,0.09), 0 1px 4px rgba(13,21,38,0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}

/* Blue tint — 1st card */
.feature-card:nth-child(1) {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.06) 0%, #ffffff 55%);
  border-top: 3px solid rgba(37, 99, 235, 0.35);
}

/* Amber tint — 2nd card */
.feature-card:nth-child(2) {
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.08) 0%, #ffffff 55%);
  border-top: 3px solid rgba(245, 158, 11, 0.45);
}

/* Green tint — 3rd card */
.feature-card:nth-child(3) {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.07) 0%, #ffffff 55%);
  border-top: 3px solid rgba(16, 185, 129, 0.4);
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.06) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 48px rgba(13,21,38,0.15), 0 4px 14px rgba(13,21,38,0.08);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.07));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.feature-card:nth-child(2) .feature-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.07));
  border-color: rgba(245, 158, 11, 0.18);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.feature-card:nth-child(3) .feature-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.07));
  border-color: rgba(16, 185, 129, 0.18);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ===== כרטיסי מסלולי לימוד ===== */

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding-bottom: 80px;
}

.track-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: none;
  border-radius: 28px;
  padding: 0;
  box-shadow: 0 6px 32px rgba(13,21,38,0.12), 0 2px 8px rgba(13,21,38,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* True colored gradient header band */
.track-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(135deg,
    var(--track-color, var(--color-primary)) 0%,
    color-mix(in srgb, var(--track-color, var(--color-primary)) 70%, #fff) 100%
  );
  border-radius: 28px 28px 0 0;
  pointer-events: none;
  z-index: 0;
}

/* Subtle inner glow at bottom edge of header */
.track-card::after {
  content: "";
  position: absolute;
  top: 80px; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--track-color, var(--color-primary)) 15%, transparent),
    transparent
  );
  pointer-events: none;
  z-index: 0;
}

.track-card-icon {
  font-size: 2.6rem;
  /* Icon sits at the boundary: header is 100px, icon is 80px.
     margin-top of 60px means icon top at 60px, bottom at 140px.
     The midpoint (100px) is exactly the header/body boundary. */
  margin: 60px auto 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  background: #ffffff;
  overflow: hidden;
  box-shadow:
    0 6px 24px rgba(0,0,0,0.20),
    0 0 0 4px #ffffff,
    0 0 0 7px color-mix(in srgb, var(--track-color, var(--color-primary)) 55%, transparent);
  z-index: 3;
}

.track-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.track-card-icon::before { display: none; }
.track-card-icon::after { display: none; }

.track-card-body {
  padding: 14px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Hover glow using track color */
.track-card:hover {
  transform: translateY(-12px);
  box-shadow:
    0 24px 56px rgba(13,21,38,0.18),
    0 6px 18px rgba(13,21,38,0.08),
    0 0 0 2px color-mix(in srgb, var(--track-color, var(--color-primary)) 30%, transparent);
}

.track-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.track-card p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
  flex: 1;
  line-height: 1.65;
  text-align: center;
}

/* Overlay anchor — covers entire card for click, sits above ::before/::after pseudo-elements */
.track-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 28px;
}

.track-card .btn {
  align-self: stretch;
  text-align: center;
  padding: 13px 22px;
  font-size: 0.9rem;
  background: var(--track-color, var(--color-primary));
  position: relative;
  z-index: 3;
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--track-color, #2563eb) 45%, transparent);
  border-radius: 14px;
  font-weight: 700;
  pointer-events: none;
  display: block;
  transition: filter 0.15s, box-shadow 0.15s;
}

.track-card:hover .btn {
  filter: brightness(1.1);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--track-color, #2563eb) 55%, transparent);
}

/* ===== Stats bar ===== */

.stats-bar {
  background: var(--color-text);
  color: #fff;
  padding: 20px clamp(16px, 4vw, 40px);
  display: flex;
  justify-content: center;
  gap: clamp(32px, 6vw, 80px);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-accent-light);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(241, 245, 249, 0.6);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .hero-content {
    max-width: none;
  }

  /* No 3D on phones, so the "drag to rotate / tap building" hint is misleading */
  .hero-hint {
    display: none;
  }

  .section-title {
    margin-top: 52px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .tracks-grid {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }

  .stats-bar {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 375px) {
  .hero-content h1 {
    font-size: 1.4rem;
  }

  .brand-text {
    font-size: 0.9rem;
  }
}

/* ===== למה לא ChatGPT ===== */

.why-us {
  padding: 80px 0;
}

.why-us-header {
  text-align: center;
  margin-bottom: 48px;
}

.why-badge {
  display: inline-block;
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.why-us-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 14px;
}

.why-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: start;
  background: var(--color-surface);
  border: none;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 6px 32px rgba(13,21,38,0.10), 0 1px 4px rgba(13,21,38,0.06);
}

.compare-col {
  padding: 32px 28px;
}

.compare-them {
  background: rgba(239,68,68,0.04);
}

.compare-us {
  background: rgba(59,130,246,0.06);
}

.compare-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.compare-them .compare-label { color: #f87171; }
.compare-us .compare-label   { color: #60a5fa; }

.compare-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-col li {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.compare-col li::before {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 1rem;
}

.compare-col li.bad::before  { content: "✗"; color: #f87171; }
.compare-col li.good::before { content: "✓"; color: #34d399; }
.compare-col li.good { color: var(--color-text); }

.compare-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: horizontal-tb;
  padding: 0 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-text-muted);
  background: var(--color-border);
  min-height: 100%;
  width: 36px;
}

.source-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.source-badge {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .compare-divider {
    writing-mode: horizontal-tb;
    width: 100%;
    min-height: 36px;
    padding: 4px 0;
  }
  .why-us-header h2 {
    font-size: 1.5rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
