:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1c2434;
  --muted: #647089;
  --line: #e2e7f0;
  --brand: #1f6fff;
  --brand-strong: #1557ce;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 40%, #f7f9fd 100%);
  line-height: 1.5;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.hero-header {
  background: radial-gradient(circle at top right, #7ea9ff, #4f7de8 45%, #365ec4 100%);
  color: #fff;
  padding-bottom: 44px;
}

.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 74px;
}

.logo {
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  justify-self: start;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.nav-menu a {
  color: #ebf2ff;
  text-decoration: none;
  font-weight: 500;
}

.nav-actions {
  justify-self: end;
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-link {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: #fff;
  color: var(--brand-strong);
}

.btn-primary:hover {
  background: #edf3ff;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: transparent;
  border-radius: 8px;
  width: 42px;
  height: 38px;
  font-size: 1.2rem;
  cursor: pointer;
}

.hero {
  padding-top: 26px;
}

.hero-label {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #d8e6ff;
}

.hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.12;
  max-width: 700px;
}

.hero p {
  margin: 0;
  max-width: 640px;
  color: #e7efff;
}

.btn-cta {
  margin-top: 24px;
  background: #0f1f4b;
  color: #fff;
}

.btn-cta:hover {
  background: #0b1738;
}

.main-content {
  padding: 34px 0 40px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  height: fit-content;
}

.sidebar h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

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

.sidebar li + li {
  margin-top: 7px;
}

.sidebar a {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: #f5f8ff;
  border: 1px solid #e5edff;
  border-radius: 9px;
  padding: 8px 10px;
}

.sidebar a:hover {
  background: #ebf2ff;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbe7ff, #c5d8ff);
}

.content-card h3 {
  margin: 0;
  padding: 12px;
  font-size: 0.95rem;
}

.footer {
  border-top: 1px solid var(--line);
  background: #f8faff;
  padding: 20px 0;
  text-align: center;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

@media (max-width: 1040px) {
  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .navbar {
    grid-template-columns: 1fr auto auto;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
  }

  .nav-menu {
    position: absolute;
    top: 78px;
    left: 4%;
    right: 4%;
    background: #315bc2;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    flex-direction: column;
    gap: 12px;
    display: none;
  }

  .nav-menu.show {
    display: flex;
  }

  .main-content {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 1;
  }

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

@media (max-width: 620px) {
  .nav-actions {
    gap: 8px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 8.5vw, 2.3rem);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}
