/* ================================
   Design System – HIT GenAI Course
   ================================ */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  /* Colors */
  --color-bg-light: #f2f2f3;
  --color-bg-alt: #b9c9cc;
  --color-primary-dark: #005157;
  --color-primary: #008c95;
  --color-accent: #ffc82d;
  --color-accent-light:#E6F4F4;

  --color-neutral-1: #97babc;
  --color-neutral-2: #e1e9ea;
  --color-neutral-3: #c1d3d5;

  --color-text: #000000;

  /* Typography */
  --font-heading: "Assistant", Arial, sans-serif;
  --font-body: "Assistant", Arial, sans-serif;

  /* Spacing scale (based on 4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;

  /* animation varibels */
    --sky-bg: #005157;
  --max-comet-size: 1.2vmin;
  --min-comet-size: 0.35vmin;
  --min-speed: 8s;
  --max-speed: 20s;
   --comet-colors: var(--color-primary), var(--color-primary-dark), var(--color-accent);
}

/* ---------- Global Resets ---------- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--color-bg-light);
  color: var(--color-text);
  line-height: 1.6;
}

/* ---------- Headings ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-primary-dark);
}

/* ---------- Buttons ---------- */
.btn-primary {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  border-radius: 0.5rem;
  padding: var(--space-2) var(--space-3);
}
.btn-primary:hover,
.btn-primary:focus {
  /* background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark); */
    background-color: var(--color-primary-dark);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: white;
  outline: 3px solid var(--color-primary-dark);
  outline-offset: 2px;
}

.btn-secondary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #000;
  border-radius: 0.5rem;
  padding: var(--space-2) var(--space-3);
}
.btn-secondary:hover,
.btn-secondary:focus {
  /* background-color: #e0b727;
  border-color: #e0b727;
  color: #000; */
  background-color: var(--color-accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: #000;
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-dark:hover, .btn-dark:focus{
  background-color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: #000;
  outline: 3px solid white;
  outline-offset: 2px;
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--color-neutral-3);
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ---------- Accessibility Enhancements ---------- */
a:focus,
button:focus,
input:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Logo sizing utility */
.logo-img {
  max-height: 60px;  /* גובה מקסימלי */
  max-width: 140px;  /* רוחב מקסימלי */
  height: auto;
  width: auto;
}

/* קסטום לרכיבים */
section header{
  background-color:transparent ;
}

/* תפריט עליון */
#main-nav{
background-color: var(--color-primary-dark) !important;
}

#main-nav .nav-link {
  font-weight: 500;
  color:white;
}

#main-nav .nav-link:hover,
#main-nav .nav-link:focus {
  text-decoration: underline;
}

#main-nav .nav-link:focus{
   box-shadow: 0 0 0 3px var(--color-accent);
}

/* סקשן הירו */
#hero-header {
  position: relative;
  background-color: black;
  height: 50vh;
  min-height: 25rem;
  width: 100%;
  overflow: hidden;
}

header video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 0;
  -ms-transform: translateX(-50%) translateY(-50%);
  -moz-transform: translateX(-50%) translateY(-50%);
  -webkit-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
}

header .container {
  position: relative;
  z-index: 2;
}

header .overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  /* background-color: black; */
  /* opacity: 0.8; */
  z-index: 1;
  background: linear-gradient(
    to left,
     rgba(0, 0, 0, 0.0) 0%,
     rgba(0, 0, 0, 0) 100%
     
  );
}

#hero-header h1 {
  color: white;
}

/* Project logo in hero */
.hero-logo {
  position: absolute;
  top: 50%;
  left: 2%;
  transform: translateY(-50%);
  height: 70%; 
  width: auto; 
  max-height: 70%; 
  max-width: 20%;
  z-index: 3;  
}

.hero-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}


/* Media Query for devices withi coarse pointers and no hover functionality */

/* This will use a fallback image instead of a video for devices that commonly do not support the HTML5 video element */

@media (pointer: coarse) and (hover: none) {
  header {
    background: url("https://source.unsplash.com/XT5OInaElMw/1600x900") black
      no-repeat center center scroll;
  }

  header video {
    display: none;
  }
}

/* סקשן יחידות */
/* תרשים יחידות */
/* The dashed line */
.units-overview .diagram-line {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  border-top: 3px dashed var(--color-primary);
  transform: translateY(-50%);
  z-index: 0; /* שים מאחורי התיבות */
}

/* Arrow head at the end of the line */
.units-overview .diagram-arrow {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%); /* על הקו, בקצה */
  font-size: 2rem;
  color: var(--color-primary);
  z-index: 1; /* מעל הקו */
}

/* Units */
[id="units"] {
  scroll-margin-top: 120px;
}

.units-overview .diagram-list {
  gap: 1rem;
  z-index: 2; /* מעל הקו */
  position: relative;
}

.units-overview .unit-box {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0.75rem;
  text-decoration: none;
  color: #000;
  background-color: #E1E9EA;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 1px solid #C1D3D5;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.units-overview .unit-box:hover,
.units-overview .unit-box:focus {
  background-color: var(--color-accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: #000;
}

/* Responsive */
@media (max-width: 768px) {
  .units-overview .unit-box {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }
  .units-overview .diagram-arrow {
    font-size: 1rem;
    transform: translate(-90%, -50%);
  }
}

/* תפקוד גלילה ליחידה */
[id^="unit-"] {
  scroll-margin-top: 160px; 
}


/* מיכל יחידות */
@media (min-width: 992px) {
  /* lg breakpoint */
  .units-container {
    max-width: 80%;
  }
}

.unit-number {
  font-size: 6rem; /* מספר ענק */
  font-weight: 700;
  color: var(--color-primary-dark); 
  line-height: 1;
}

.card {
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card .btn-link{
  font-size: 0.9rem;
  padding-right: 0;
  padding-top: 1rem;
}

.bg-color{
  background-color: var(--color-accent-light);
}


/* אזור המרצים */
/* תפקוד גלילה ליחידה */
[id="lecturers-corner"] {
  scroll-margin-top: 120px;
}


/* פוטר */
/* Extra padding utilities */
footer .pt-6 {
  padding-top: 5rem !important; /* יותר עובי בחלק העליון */
}
footer .pb-4 {
  padding-bottom: 2rem !important;
}


/* נגישות אנימציות */
@media (prefers-reduced-motion: reduce) {
  /* ביטול כל טרנזישן/אנימציה מקומית */
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}







/* אנימצייה להירו סקשן */
.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  contain: layout style paint;
  z-index: 0;
  background: var(--sky-bg);
  overflow: hidden;
}

/* קומט יחיד */
.comet {
  --size: 1vmin;
  --top: 50vh;
  --delay: 0s;
  --dur: 8s;

  position: absolute;
  top: var(--top);
  left: -15vmin;
  width: var(--size);
  height: var(--size);
  animation: fly var(--dur) linear var(--delay) infinite;
  will-change: transform, opacity;
  opacity: 0;
}

.comet::before {
  /* ראש המטאור – עיגול לבן בוהק */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: white;
  box-shadow:
    0 0 calc(var(--size) * 2.5) rgba(255,255,255,1),
    0 0 calc(var(--size) * 5) rgba(255,255,255,0.8);
}

.comet::after {
  /* השובל */
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--size) * -30);
  width: calc(var(--size) * 30);
  height: calc(var(--size) * 0.45);
  transform: translateY(-50%);
  border-radius: calc(var(--size) * 0.45);

  /* גרדיאנט בצבע המותג */
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--trail-color) 80%, transparent) 0%,
    color-mix(in srgb, var(--trail-color) 90%, white 20%) 40%,
    color-mix(in srgb, var(--trail-color) 100%, white 5%) 100%
  );

  filter: blur(calc(var(--size) * 0.6));
  box-shadow:
    0 0 calc(var(--size) * 4) var(--trail-color),
    0 0 calc(var(--size) * 7) color-mix(in srgb, var(--trail-color) 70%, white 30%);

  /* טקסטורת "גיר" מחוספסת */
  -webkit-mask-image: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,1) 0 2px,
    rgba(0,0,0,0.8) 2px 4px
  );
  -webkit-mask-repeat: repeat;
  mask-image: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,1) 0 2px,
    rgba(0,0,0,0.8) 2px 4px
  );
  mask-repeat: repeat;
}


@keyframes fly {
  0%   { transform: translateX(0) translateY(0); opacity: 0; }
  8%   { opacity: 1; }
  100% { transform: translateX(calc(100vw + 40vmin)) translateY(0); opacity: 0; }
}

.comet.wavy {
  animation-name: fly, bob;
  animation-duration: var(--dur), calc(var(--dur) * 0.8);
  animation-timing-function: linear, ease-in-out;
  animation-delay: var(--delay), var(--delay);
  animation-iteration-count: infinite, infinite;
}

@keyframes bob {
  0%, 100% { transform: translateX(0) translateY(0); }
  50%      { transform: translateX(0) translateY(-0.6vmin); }
}

.pause-animations * {
  animation-play-state: paused !important;
}

#toggle-animation{
    z-index: 10;
}



