:root {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --ink: #15355f;
  --muted: #58708f;
  --blue: #1f63b5;
  --blue-dark: #15477f;
  --blue-soft: #edf5ff;
  --line: #b8cef0;
  --line-strong: #6e9bd3;
  --green: #12845f;
  --shadow: 0 16px 34px rgba(24, 74, 140, .12), 0 3px 8px rgba(24, 74, 140, .08);
  --shadow-hover: 0 23px 44px rgba(24, 74, 140, .17), 0 6px 12px rgba(24, 74, 140, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: "Cairo", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }

.home-nav {
  min-height: 72px;
  max-width: 1180px;
  margin: auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dce8f7;
  background: rgba(255,255,255,.97);
}
.home-brand { display: flex; align-items: center; gap: 11px; color: var(--blue-dark); text-decoration: none; font-weight: 800; }
.home-brand img { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; object-fit: cover; box-shadow: 0 7px 15px rgba(24,74,140,.12); }
.home-brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.25; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-link, .contact-link { border-radius: 11px; padding: 8px 12px; text-decoration: none; font-size: 12px; font-weight: 700; }
.nav-link { color: var(--blue-dark); }
.nav-link:hover { background: var(--blue-soft); }
.contact-link { border: 1px solid var(--line); color: var(--blue); background: #fff; box-shadow: 0 4px 10px rgba(24,74,140,.06); }
.contact-link:hover { border-color: var(--line-strong); background: var(--blue-soft); }

main { max-width: 1180px; margin: auto; padding: 0 24px; }
.home-hero { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 16px; padding: 28px 4px 17px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.hero-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(18,132,95,.1); }
.home-hero h1 { margin: 0; color: var(--blue-dark); font-size: clamp(26px, 3vw, 36px); line-height: 1.25; letter-spacing: -.025em; white-space: nowrap; }
.home-hero > p { max-width: none; margin: 0; color: var(--muted); font-size: 13px; }

.programs-section { padding: 7px 0 65px; }
.programs-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; align-items: stretch; }
.program-card {
  --accent: var(--blue);
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.program-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.program-card.remote { --accent: #315fa8; }
.program-card.project-track { --accent: #15477f; }
.program-card.junior { --accent: #1b72c5; }
.program-visual { position: relative; height: 214px; flex: 0 0 214px; overflow: hidden; background: var(--blue-soft); }
.program-visual::after { content: ""; position: absolute; inset: auto 0 0; height: 92px; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.68) 62%, #fff 100%); pointer-events: none; }
.program-visual > img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 38%; filter: saturate(.93) contrast(1.02); transition: transform .45s ease; }
.program-card:hover .program-visual > img { transform: scale(1.025); }
.program-visual-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); font-size: 62px; background: linear-gradient(145deg,#f5f9ff,#dcecff); }
.program-wave { position: absolute; z-index: 2; right: -5%; bottom: -38px; width: 110%; height: 68px; border-radius: 50% 50% 0 0 / 78% 78% 0 0; background: #fff; pointer-events: none; }
.program-tag { position: absolute; z-index: 3; top: 15px; right: 15px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.84); border-radius: 99px; color: var(--blue-dark); background: rgba(255,255,255,.92); box-shadow: 0 7px 18px rgba(17,59,108,.16); backdrop-filter: blur(8px); font-size: 10px; font-weight: 800; }
.program-content { position: relative; z-index: 4; min-height: 304px; display: flex; flex-direction: column; padding: 0 22px 21px; background: #fff; }
.program-heading { display: flex; align-items: center; gap: 11px; margin-top: -4px; }
.program-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 13px; color: var(--accent); background: var(--blue-soft); font-size: 19px; font-weight: 800; box-shadow: inset 0 -3px 7px rgba(31,99,181,.07); }
.program-card h3 { margin: 0; color: var(--blue-dark); font-size: 19px; line-height: 1.45; }
.program-description { min-height: 42px; display: -webkit-box; overflow: hidden; margin: 8px 0 11px; color: var(--muted); font-size: 12px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.program-price { display: flex; align-items: end; gap: 6px; padding: 11px 0; border-block: 1px solid #dce8f7; }
.price-number { color: var(--blue-dark); font-size: 31px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.price-currency { width: 24px; height: 27px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; margin: 0 2px 0 0; }
.price-currency img { display: block; width: auto; height: 26px; }
.price-note { margin-left: auto; margin-bottom: 3px; color: var(--green); font-size: 10px; }
.program-features { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 13px; margin: 0; padding: 13px 0 2px; list-style: none; }
.program-features li { position: relative; padding-right: 18px; color: #385777; font-size: 11px; line-height: 1.55; }
.program-features li::before { content: "✓"; position: absolute; right: 0; color: var(--accent); font-weight: 800; }
.program-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: auto; padding-top: 13px; }
.register-button, .details-button { min-height: 41px; display: flex; align-items: center; justify-content: center; border-radius: 12px; padding: 9px 13px; text-decoration: none; font-size: 12px; font-weight: 800; transition: .18s ease; }
.register-button { color: #fff; background: var(--accent); box-shadow: 0 8px 16px rgba(31,99,181,.2); }
.register-button:hover { transform: translateY(-1px); filter: brightness(.96); }
.details-button { border: 1px solid var(--line); color: var(--blue-dark); background: #fff; }
.details-button:hover { border-color: var(--line-strong); background: var(--blue-soft); }
.program-closed { opacity: .62; }
.program-closed .register-button { pointer-events: none; background: #71849b; box-shadow: none; }
.program-skeleton { height: 518px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(100deg,#f7faff,#eaf3ff,#f7faff); background-size: 200% 100%; animation: skeleton 1.4s infinite; }
@keyframes skeleton { to { background-position: -200% 0; } }

.contact-strip { margin: 0 0 62px; padding: 21px 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; border: 1.5px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow); }
.contact-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--blue); background: var(--blue-soft); font-size: 21px; }
.contact-strip small { color: var(--muted); }
.contact-strip h2 { margin: 1px 0 0; color: var(--blue-dark); font-size: 17px; }
.contact-strip > a { padding: 10px 15px; border-radius: 11px; color: #fff; background: var(--blue); text-decoration: none; font-size: 12px; font-weight: 800; box-shadow: 0 7px 15px rgba(31,99,181,.2); }
.home-footer { max-width: 1180px; margin: auto; padding: 22px 24px 30px; display: flex; justify-content: space-between; border-top: 1px solid #dce8f7; color: var(--muted); font-size: 11px; }

@media (max-width: 950px) {
  .programs-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .home-nav { min-height: 64px; padding: 8px 12px; }
  .home-brand img { width: 36px; height: 36px; }
  .home-brand span { font-size: 12px; }
  .nav-link { display: none; }
  .contact-link { padding: 6px 9px; font-size: 10px; }
  main { padding: 0 12px; }
  .home-hero { display: block; padding: 18px 2px 12px; }
  .hero-badge { margin-bottom: 7px; padding: 4px 8px; font-size: 9px; }
  .home-hero h1 { white-space: normal; font-size: 24px; }
  .home-hero > p { margin-top: 3px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .programs-section { padding: 3px 0 45px; }
  .programs-grid { grid-template-columns: 1fr; gap: 15px; }
  .program-card { grid-column: auto; min-height: auto; border-radius: 18px; }
  .program-visual { height: 184px; flex-basis: 184px; }
  .program-content { min-height: 300px; padding: 0 16px 17px; }
  .program-card h3 { font-size: 17px; }
  .program-description { min-height: 39px; font-size: 11px; }
  .program-features { gap: 7px 9px; }
  .program-features li { font-size: 10px; }
  .program-actions { padding-top: 12px; }
  .contact-strip { grid-template-columns: auto 1fr; padding: 17px; margin-bottom: 48px; }
  .contact-strip > a { grid-column: 1 / -1; text-align: center; }
  .home-footer { padding: 19px 14px 26px; display: grid; gap: 3px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .program-card, .program-visual > img, .register-button { transition: none; }
  .program-skeleton { animation: none; }
}
