:root {
  --ink: #17211b;
  --muted: #657267;
  --paper: #fff8ed;
  --paper-strong: #fffdf7;
  --ridge: #274536;
  --moss: #6a8b4e;
  --sun: #f6b84b;
  --coral: #df6b4f;
  --sky: #cdebf1;
  --line: rgba(23, 33, 27, 0.14);
  --shadow: 0 24px 70px rgba(39, 69, 54, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(246, 184, 75, 0.45), transparent 22rem),
    radial-gradient(circle at 84% 8%, rgba(205, 235, 241, 0.95), transparent 28rem),
    linear-gradient(160deg, #fff7e8 0%, #e8f5ed 47%, #d6edf2 100%);
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: "Noto Sans Hebrew", "Arial Hebrew", "Avenir Next", sans-serif;
}

a {
  color: inherit;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.thermal {
  position: absolute;
  display: block;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgba(39, 69, 54, 0.12);
  border-radius: 44% 56% 62% 38%;
  animation: drift 18s ease-in-out infinite alternate;
}

.thermal-one {
  top: 9rem;
  left: -10rem;
}

.thermal-two {
  right: -11rem;
  top: 20rem;
  animation-delay: -4s;
}

.thermal-three {
  bottom: -15rem;
  left: 32%;
  animation-delay: -9s;
}

.hero,
main,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand,
.nav-link,
.language-button,
.button,
.text-button {
  text-decoration: none;
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  color: var(--paper);
  background: var(--ridge);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(39, 69, 54, 0.22);
}

.nav-link,
.text-button {
  border: 0;
  color: var(--ridge);
  background: transparent;
  cursor: pointer;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.language-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-button {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.language-button.is-active {
  color: var(--paper);
  background: var(--ridge);
  box-shadow: 0 8px 22px rgba(39, 69, 54, 0.18);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 7vw, 6rem) 0 4rem;
}

.hero-copy {
  animation: rise 700ms ease both;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ridge);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2 {
  letter-spacing: -0.04em;
  line-height: 1.03;
}

h1 {
  max-width: 780px;
  font-size: clamp(3.7rem, 10vw, 8.75rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4.35rem);
}

.lede {
  max-width: 660px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  color: var(--paper);
  background: var(--ridge);
  box-shadow: 0 16px 35px rgba(39, 69, 54, 0.26);
}

.ghost {
  color: var(--ridge);
  background: rgba(255, 253, 247, 0.62);
  border: 1px solid var(--line);
}

.flight-card,
.panel,
.school-card {
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.flight-card {
  position: relative;
  min-height: 430px;
  padding: 2rem;
  overflow: hidden;
  animation: float-in 850ms ease 180ms both;
}

.flight-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -18% -10%;
  height: 45%;
  background:
    linear-gradient(145deg, transparent 48%, rgba(39, 69, 54, 0.18) 49% 52%, transparent 53%),
    linear-gradient(16deg, #547846, #9cb867);
  clip-path: polygon(0 60%, 22% 38%, 45% 54%, 68% 24%, 100% 50%, 100% 100%, 0 100%);
}

html[dir="rtl"] .flight-card::before {
  transform: scaleX(-1);
}

.glider {
  position: absolute;
  top: 26%;
  left: 12%;
  width: 76%;
  height: 110px;
  background: linear-gradient(135deg, #f9f4df 0 49%, var(--coral) 50% 55%, var(--sun) 56%);
  clip-path: polygon(0 26%, 50% 4%, 100% 26%, 55% 46%, 50% 96%, 45% 46%);
  filter: drop-shadow(0 20px 26px rgba(39, 69, 54, 0.24));
  animation: glide 5s ease-in-out infinite alternate;
}

html[dir="rtl"] .glider {
  transform: scaleX(-1);
}

.stats {
  position: absolute;
  inset: auto 1.35rem 1.35rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0;
}

.stats div {
  padding: 1rem;
  background: rgba(255, 248, 237, 0.86);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
}

.stats dt {
  color: var(--ridge);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 900;
  line-height: 1;
}

.stats dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 1.5rem;
  align-items: end;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin: 1.5rem 0;
}

.filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 0.8rem;
}

label span {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 3.2rem;
  padding: 0 1rem;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 1rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 4px rgba(106, 139, 78, 0.16);
}

.directory {
  padding: 0.5rem 0 3rem;
}

.result-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-weight: 800;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.school-card {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  animation: card-in 380ms ease both;
}

.school-card h3 {
  margin: 0;
  color: var(--ridge);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.25rem 0.65rem;
  color: var(--ridge);
  background: rgba(106, 139, 78, 0.13);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.details {
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.details strong {
  color: var(--ink);
}

.school-card a {
  color: var(--coral);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.resources {
  align-items: start;
  margin-bottom: 3rem;
}

.resources p {
  color: var(--muted);
  line-height: 1.55;
}

.resources-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
}

.resource-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  min-width: 0;
}

.resource-card h3 {
  margin: 0 0 0.35rem;
  color: var(--ridge);
}

.resource-card a {
  display: block;
  color: var(--coral);
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.empty {
  grid-column: 1 / -1;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 253, 247, 0.72);
  border: 1px dashed var(--line);
  border-radius: 1.5rem;
}

.footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

@keyframes drift {
  from {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(16deg) translate3d(2rem, -1rem, 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes glide {
  from {
    transform: translate3d(-0.4rem, 0, 0) rotate(-2deg);
  }
  to {
    transform: translate3d(0.6rem, -0.8rem, 0) rotate(2deg);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .panel {
    grid-template-columns: 1fr;
  }

  .flight-card {
    min-height: 330px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resources-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero,
  main,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .nav {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .language-toggle {
    width: 100%;
  }

  .nav-link {
    display: inline-flex;
    justify-content: center;
    padding: 0.85rem 1rem;
    background: rgba(255, 253, 247, 0.62);
    border: 1px solid var(--line);
    border-radius: 999px;
  }

  .hero-grid {
    padding-top: 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .filters,
  .cards,
  .stats {
    grid-template-columns: 1fr;
  }

  .flight-card {
    min-height: 470px;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5.4rem);
  }

  html[dir="rtl"] h1 {
    font-size: clamp(3rem, 15vw, 4.75rem);
  }

  .panel,
  .school-card {
    border-radius: 1.45rem;
  }

  .result-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-card {
    padding: 0.9rem;
  }
}

@media (max-width: 430px) {
  .hero,
  main,
  .footer {
    width: min(100% - 14px, 1180px);
  }

  .flight-card {
    min-height: 430px;
    padding: 1.25rem;
  }

  .stats {
    inset: auto 0.85rem 0.85rem;
  }

  .stats div {
    padding: 0.85rem;
  }
}
