/* ============================================================
   Портал «Илим-Нур» — премиальный минимализм
   Палитра: orange #F7941D · red #E31E24 · cream #FDF8F2 · ink #2B2118
   ============================================================ */
:root {
  --orange: #F7941D;
  --orange-dark: #d97e0b;
  --red: #E31E24;
  --cream: #FDF8F2;
  --cream-2: #F7EDE0;
  --ink: #2B2118;
  --ink-soft: #6b5d4f;
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(43, 33, 24, .08);
  --shadow-hover: 0 18px 44px rgba(247, 148, 29, .18);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--white); padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border: 0; border-radius: 999px;
  font: 600 15px/1 var(--font); letter-spacing: .01em;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 8px 20px rgba(247, 148, 29, .35); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(247, 148, 29, .45); }
.btn-ghost { background: rgba(255, 255, 255, .14); color: var(--white); border: 1px solid rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .28); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--orange-dark); border: 2px solid var(--orange); }
.btn-outline:hover { background: var(--orange); color: var(--white); transform: translateY(-2px); }
.btn-light { background: var(--white); color: var(--red); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .18); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 248, 242, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(43, 33, 24, .07);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.brand-text small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }

.main-nav { display: none; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.lang-switch { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 3px; }
.lang-link {
  padding: 6px 12px; border-radius: 999px; font: 700 12px/1 var(--font);
  color: var(--ink-soft); transition: background .2s, color .2s;
}
.lang-link.is-active { background: var(--ink); color: var(--cream); }
.lang-link:hover:not(.is-active) { color: var(--orange-dark); }

.header-cta { display: none; }

.menu-toggle {
  width: 44px; height: 44px; border: 0; background: var(--cream-2); border-radius: 12px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.menu-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобильное меню */
.main-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
  background: var(--cream); border-bottom: 1px solid rgba(43, 33, 24, .08);
  display: flex; flex-direction: column; padding: 14px 20px 22px;
  transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .32s var(--ease), opacity .32s var(--ease), visibility .32s;
  box-shadow: 0 30px 40px rgba(43, 33, 24, .1);
}
.main-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
.nav-link {
  padding: 12px 6px; font-weight: 600; font-size: 16px; color: var(--ink);
  border-bottom: 1px solid rgba(43, 33, 24, .06); transition: color .2s, padding-left .25s var(--ease);
}
.nav-link:last-child { border-bottom: 0; }
.nav-link:hover { color: var(--orange-dark); padding-left: 12px; }
.nav-link.is-active { color: var(--red); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: center; color: var(--white); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: var(--ink) center/cover no-repeat; transform: scale(1.04); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(43, 33, 24, .88) 0%, rgba(43, 33, 24, .62) 45%, rgba(227, 30, 36, .28) 100%); }
.hero-inner { position: relative; padding: 90px 20px; max-width: 1180px; }
.hero-eyebrow { max-width: 640px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .85); margin-bottom: 22px; }
.hero-title { font-size: clamp(30px, 6vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; max-width: 780px; }
.hero-sub { margin-top: 20px; font-size: clamp(16px, 2.4vw, 19px); color: rgba(255, 255, 255, .9); max-width: 560px; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section-title { font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 26px; }
.section-title-light { color: var(--cream); }
.lead { font-size: 18px; color: var(--ink-soft); }

/* ---------- Карточки ---------- */
.cards-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.adv-card { padding: 30px 26px; }
.adv-card h3 { font-size: 19px; font-weight: 800; margin: 16px 0 10px; }
.adv-card p { color: var(--ink-soft); font-size: 15px; }
.adv-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--cream-2) center/28px no-repeat; position: relative; }
.adv-icon::after { content: ""; position: absolute; inset: 0; border-radius: 16px; background: currentColor; opacity: .08; }
.adv-icon-english { color: var(--orange); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23F7941D" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M2 12h20M12 2c3 3 3 17 0 20M12 2c-3 3-3 17 0 20"/></svg>'); }
.adv-icon-arabic { color: var(--red); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23E31E24" stroke-width="2"><path d="M4 19V6a2 2 0 0 1 2-2h13v13H6a2 2 0 0 0-2 2zm0 0a2 2 0 0 0 2 2h13"/></svg>'); }
.adv-icon-fullday { color: var(--orange); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23F7941D" stroke-width="2"><circle cx="12" cy="12" r="4"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M19.1 4.9 17 7M7 17l-2.1 2.1"/></svg>'); }
.adv-icon-curriculum { color: var(--red); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23E31E24" stroke-width="2"><path d="M22 10 12 4 2 10l10 6 10-6zM6 12.5V17c0 1.7 2.7 3 6 3s6-1.3 6-3v-4.5"/></svg>'); }

/* ---------- Shaping Bright Futures ---------- */
.future { background: var(--white); }
.future-grid { display: grid; gap: 34px; align-items: center; }
.future-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.future-text .lead { margin-bottom: 26px; }

/* ---------- Статистика ---------- */
.stats { background: var(--ink); color: var(--cream); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 16px; text-align: center; }
.stat-num {
  display: block; font-size: clamp(38px, 8vw, 60px); font-weight: 800;
  color: var(--orange); letter-spacing: -.02em; line-height: 1;
}
.stat-label { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; color: rgba(253, 248, 242, .75); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Отзыв ---------- */
.testimonial { background: var(--cream); }
.quote { max-width: 780px; margin: 0 auto; text-align: center; }
.quote-mark { color: var(--orange); margin-bottom: 18px; opacity: .9; }
.quote p { font-size: clamp(19px, 3.4vw, 26px); font-weight: 600; line-height: 1.5; letter-spacing: -.01em; }
.quote footer { margin-top: 22px; color: var(--red); font-weight: 700; font-size: 15px; }

/* ---------- Instagram ---------- */
.insta { background: var(--white); }
.insta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.insta-inner .section-title { margin-bottom: 8px; }

/* ---------- CTA-полоса ---------- */
.cta-strip { background: linear-gradient(95deg, var(--orange) 0%, var(--red) 100%); color: var(--white); padding: 54px 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.cta-inner h2 { font-size: clamp(22px, 3.6vw, 30px); font-weight: 800; letter-spacing: -.01em; }
.cta-inner p { color: rgba(255, 255, 255, .88); margin-top: 8px; max-width: 560px; }

/* ---------- Внутренние страницы ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--cream-2) 0%, var(--cream) 70%);
  padding: 56px 0 40px; border-bottom: 1px solid rgba(43, 33, 24, .07);
}
.page-hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -.02em; }
.page-content .content { max-width: 820px; }
.page-content .content h2 { font-size: 26px; font-weight: 800; margin: 34px 0 14px; letter-spacing: -.01em; }
.page-content .content h2:first-child { margin-top: 0; }
.page-content .content p { margin: 14px 0; }
.page-content .content .lead { font-size: 19px; color: var(--ink-soft); }
.page-content .content ol li, .page-content .content ul li { margin: .45em 0; }

/* Преподаватели */
.teachers-grid { margin-top: 40px; }
.teacher-card { overflow: hidden; }
.teacher-photo { aspect-ratio: 4/5; background: var(--cream-2); overflow: hidden; }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.teacher-card:hover .teacher-photo img { transform: scale(1.05); }
.teacher-info { padding: 18px 20px 22px; }
.teacher-info h3 { font-size: 16px; font-weight: 800; line-height: 1.3; }
.teacher-info p { color: var(--orange-dark); font-size: 13.5px; font-weight: 600; margin-top: 5px; }

/* Образование — карточки направлений */
.edu-grid { margin-top: 40px; }
.edu-card { overflow: hidden; display: flex; flex-direction: column; }
.edu-media { aspect-ratio: 16/10; background: var(--cream-2); overflow: hidden; }
.edu-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.edu-card:hover .edu-media img { transform: scale(1.06); }
.edu-info { padding: 20px 22px 24px; }
.edu-info h3 { font-size: 18px; font-weight: 800; }
.edu-more { display: inline-block; margin-top: 10px; color: var(--orange-dark); font-weight: 700; font-size: 14px; transition: transform .25s var(--ease); }
.edu-card:hover .edu-more { transform: translateX(6px); color: var(--red); }

/* ---------- Галерея ---------- */
.gallery-grid { columns: 2 160px; column-gap: 14px; margin-top: 34px; }
.gallery-item {
  display: block; margin-bottom: 14px; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow); break-inside: avoid; position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.gallery-item img { width: 100%; background: var(--cream-2); min-height: 120px; }

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(43, 33, 24, .93);
  display: flex; align-items: center; justify-content: center; padding: 30px;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-sm); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox button {
  position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff;
  width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer;
  transition: background .2s;
}
.lightbox button:hover { background: var(--orange); }
.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Поступление ---------- */
.admission-contacts { background: var(--white); }
.contacts-grid { display: grid; gap: 34px; }
.contacts-list { list-style: none; padding: 0; }
.contacts-list li {
  padding: 16px 0; border-bottom: 1px solid rgba(43, 33, 24, .08);
  display: flex; flex-direction: column; gap: 3px;
}
.contacts-list b { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.contacts-list a { color: var(--orange-dark); font-weight: 700; font-size: 18px; }
.contacts-list a:hover { color: var(--red); }
.contacts-list span { font-size: 18px; font-weight: 600; }
.contacts-map iframe { width: 100%; height: 340px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

.admission-forms { background: var(--cream); }
.forms-grid { display: grid; gap: 26px; }
.form-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 26px; }
.form-card-accent { border-top: 5px solid var(--red); }
.form-card .section-title { font-size: 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid rgba(43, 33, 24, .16); background: var(--cream);
  font: 500 15px/1.4 var(--font); color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); background: var(--white);
  box-shadow: 0 0 0 4px rgba(247, 148, 29, .15);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-note { margin-top: 14px; padding: 13px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; }
.form-note.is-ok { background: #e9f7ee; color: #1c7a3d; }
.form-note.is-err { background: #fdeceb; color: var(--red); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 110px 0; }
.notfound-code { font-size: clamp(70px, 18vw, 130px); font-weight: 800; color: var(--orange); line-height: 1; letter-spacing: -.03em; }
.notfound-inner h1 { font-size: 28px; margin: 14px 0 10px; }
.notfound-inner .lead { margin-bottom: 28px; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: rgba(253, 248, 242, .78); padding: 60px 0 0; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: 1fr; padding-bottom: 44px; }
.footer-brand .brand-text b { color: var(--cream); }
.footer-lead { margin: 16px 0; font-size: 14px; max-width: 300px; }
.insta-link { display: inline-flex; align-items: center; gap: 9px; color: var(--orange); font-weight: 700; }
.insta-link:hover { color: var(--cream); }
.footer-col h4 { color: var(--cream); font-size: 15px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a { display: block; padding: 6px 0; font-size: 14.5px; transition: color .2s, padding-left .25s var(--ease); }
.footer-links a:hover { color: var(--orange); padding-left: 8px; }
.footer-contacts { list-style: none; padding: 0; font-size: 14.5px; }
.footer-contacts li { margin: 10px 0; }
.footer-contacts a { color: var(--orange); font-weight: 600; }
.footer-contacts a:hover { color: var(--cream); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  padding-top: 22px; padding-bottom: 22px; border-top: 1px solid rgba(253, 248, 242, .12);
  font-size: 13px;
}
.lang-switch-footer { background: rgba(253, 248, 242, .12); }
.lang-switch-footer .lang-link { color: rgba(253, 248, 242, .7); }
.lang-switch-footer .lang-link.is-active { background: var(--orange); color: var(--white); }

/* ---------- Анимации появления ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (min-width: 600px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { columns: 3 200px; }
  .forms-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
}

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .header-cta { display: inline-flex; }
  .main-nav {
    position: static; display: flex; flex-direction: row; flex-wrap: wrap;
    background: none; border: 0; box-shadow: none; padding: 0;
    transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    gap: 2px;
  }
  .nav-link { border: 0; padding: 9px 10px; font-size: 14px; border-radius: 999px; }
  .nav-link:hover { padding-left: 10px; background: var(--cream-2); }
  .nav-link.is-active { background: var(--cream-2); }
  .header-inner { gap: 14px; }
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .future-grid { grid-template-columns: 1fr 1fr; gap: 60px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .contacts-grid { grid-template-columns: 1fr 1.2fr; align-items: center; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; }
  .gallery-grid { columns: 4 240px; }
  .section { padding: 90px 0; }
}

/* ---------- Reduced motion ---------- */
@media (min-width: 900px) and (max-width: 1199px) {
  .brand-text small { display: none; }
  .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-bg { transform: none; }
}
