:root {
  --primary: #1f4a8a;
  --primary-dark: #16325f;
  --secondary: #f0a11f;
  --text: #1a2233;
  --muted: #687387;
  --bg: #f7f9fc;
  --white: #ffffff;
  --border: rgba(20, 42, 79, 0.1);
  --shadow: 0 18px 45px rgba(18, 34, 66, 0.10);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Heebo', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--secondary), #ffd27c);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.logo-title {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  line-height: 1.1;
}

.logo-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 500;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--text);
}

.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width .25s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--primary);
  color: var(--white);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.hero {
  position: relative;
}

.slider {
  position: relative;
  overflow: hidden;
}

.slide {
  min-height: 78vh;
  display: none;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.slide.active {
  display: flex;
}

.slide-content {
  color: var(--white);
  padding-block: 100px;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  margin-bottom: 18px;
  font-size: .95rem;
}

.slide-content h2 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.1;
  margin: 0 0 16px;
  max-width: 700px;
}

.slide-content p {
  max-width: 700px;
  font-size: 1.1rem;
  margin: 0 0 26px;
  color: rgba(255,255,255,.92);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), #ffc14e);
  color: #1d2433;
  box-shadow: 0 12px 24px rgba(240, 161, 31, 0.25);
}

.btn-secondary {
  background: rgba(255,255,255,0.14);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.28);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.18);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 3;
}

.slider-btn.prev {
  right: 24px;
}

.slider-btn.next {
  left: 24px;
}

.slider-dots {
  position: absolute;
  bottom: 26px;
  right: 50%;
  transform: translateX(50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.42);
  cursor: pointer;
}

.dot.active {
  background: var(--secondary);
}

.search-strip {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.search-strip-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  box-shadow: var(--shadow);
}

.search-strip h3 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.search-strip p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box input {
  flex: 1;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 20px;
  background: #fbfcfe;
}

.search-box button {
  border: 0;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.section {
  padding: 88px 0;
}

.alt-section {
  background: linear-gradient(180deg, #f1f5fb 0%, #f8fbff 100%);
}

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 42px;
}

.section-heading span,
.mini-title {
  color: var(--secondary);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 10px;
}

.section-heading h2,
.about-section h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.2;
}

.section-heading p,
.about-section p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.books-grid,
.features-grid,
.grades-grid,
.contact-grid {
  display: grid;
  gap: 24px;
}

.books-grid {
  grid-template-columns: repeat(4, 1fr);
}

.book-card,
.feature-card,
.contact-card,
.contact-form,
.stats-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.book-card {
  overflow: hidden;
  border: 1px solid var(--border);
}

.book-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.book-card-body {
  padding: 22px;
}

.book-card-body h3 {
  margin: 12px 0 10px;
  font-size: 1.35rem;
}

.book-card-body p {
  color: var(--muted);
  margin: 0 0 14px;
}

.book-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff6e8;
  color: #b9790a;
  font-size: .9rem;
  font-weight: 700;
}

.inline-link {
  color: var(--primary);
  font-weight: 700;
}

.grades-grid {
  grid-template-columns: repeat(4, 1fr);
}

.grade-box {
  background: linear-gradient(135deg, var(--primary), #2d62af);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.grade-box strong {
  font-size: 1.45rem;
}

.grade-box span {
  color: rgba(255,255,255,.86);
}

.features-grid {
  grid-template-columns: repeat(4, 1fr);
}

.feature-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
}

.feature-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: #f3f8ff;
  margin-bottom: 18px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: center;
}

.stats-card {
  padding: 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-item {
  background: #f6f8fd;
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary);
}

.stat-item span {
  color: var(--muted);
}

.contact-grid {
  grid-template-columns: .9fr 1.1fr;
  align-items: start;
}

.contact-card,
.contact-form {
  padding: 28px;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.field-row.single {
  grid-template-columns: 1fr;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fbfcff;
  border-radius: 16px;
  padding: 15px 18px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.full {
  width: 100%;
}

.site-footer {
  background: #10233f;
  color: var(--white);
  padding: 22px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 18px;
}

@media (max-width: 1100px) {
  .books-grid,
  .features-grid,
  .grades-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid,
  .search-strip-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 82px;
    right: 16px;
    left: 16px;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 20px;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .slide {
    min-height: 70vh;
  }

  .slide-content {
    padding-block: 72px 96px;
  }

  .search-strip {
    margin-top: 0;
    padding-top: 24px;
  }
}

@media (max-width: 640px) {
  .books-grid,
  .features-grid,
  .grades-grid,
  .field-row,
  .stats-card {
    grid-template-columns: 1fr;
  }

  .slider-btn {
    display: none;
  }

  .topbar-inner,
  .footer-inner,
  .search-box,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .logo-wrap {
    width: 100%;
  }

  .search-box button,
  .btn {
    width: 100%;
  }
}
