:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-soft: #eef0ff;
  --text: #1b1e2e;
  --muted: #5f6478;
  --primary: #4c46d9;
  --primary-dark: #3d38bd;
  --line: #dfe2f2;
  --success: #0c9f6c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 246, 251, 0.9);
  backdrop-filter: blur(10px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  color: var(--muted);
}

.site-nav a {
  text-decoration: none;
}

.site-nav a.active {
  color: var(--primary);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5f5de8, var(--primary));
  color: #fff;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #2d2864;
  font-size: 1.25rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-menu-panel {
  display: none;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.page-section {
  padding: 26px 0 34px;
}

.hero-title {
  margin: 0;
  color: #2d2864;
  font-size: clamp(1.5rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  max-width: 980px;
}

.hero-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(0.78rem, 1.05vw, 0.95rem);
  max-width: 980px;
  line-height: 1.32;
}

.articles-carousel {
  margin-top: 22px;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: #101328;
}

.carousel-track {
  display: flex;
  transition: transform 0.42s ease;
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide-link {
  display: block;
  position: relative;
  text-decoration: none;
  aspect-ratio: 21 / 9;
  min-height: 0;
  overflow: hidden;
}

.carousel-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: block;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 16, 0.16) 20%, rgba(7, 8, 16, 0.8) 100%);
}

.carousel-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  z-index: 2;
  color: #fff;
}

.carousel-meta {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

.carousel-title {
  margin: 10px 0 10px;
  font-size: clamp(1.2rem, 2.2vw, 2.2rem);
  line-height: 1.12;
  font-weight: 800;
}

.carousel-excerpt {
  margin: 0;
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  max-width: 860px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 16px;
  background: #fff;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.carousel-controls {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(8, 12, 31, 0.45);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(2px);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.carousel-nav-prev {
  left: 14px;
}

.carousel-nav-next {
  right: 14px;
}

.carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: #c6cae5;
  cursor: pointer;
}

.carousel-dot.active {
  width: 22px;
  background: var(--primary);
}

.featured-main-link {
  text-decoration: none;
  display: block;
}

.featured-main {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  background: #121423;
}

.featured-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.featured-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 16, 0.14) 20%, rgba(7, 8, 16, 0.78) 100%);
}

.featured-main-content {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.featured-main-title {
  margin: 14px 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 2.4rem);
  line-height: 1.12;
  font-weight: 800;
}

.featured-main-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.featured-main-cta {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 24px;
  background: #fff;
  color: var(--primary);
  font-size: 1.02rem;
  font-weight: 700;
}

.featured-aside {
  display: grid;
  gap: 18px;
}

.featured-side-link {
  text-decoration: none;
  display: block;
}

.featured-side-card {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  min-height: 250px;
}

.featured-side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-side-body {
  padding: 14px 14px 12px;
}

.featured-side-title {
  margin: 10px 0;
  color: #2d2864;
  font-size: clamp(1.02rem, 1.55vw, 1.5rem);
  line-height: 1.18;
  font-weight: 800;
}

.featured-side-excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.92rem;
}

.featured-side-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.posts-grid {
  margin-top: 18px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(44, 47, 70, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.post-card-link:hover .post-card {
  box-shadow: 0 12px 28px rgba(44, 47, 70, 0.12);
  transform: translateY(-2px);
}

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

.post-card-body {
  padding: 14px 16px 16px;
}

.post-date {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.post-title {
  margin: 8px 0 8px;
  font-size: clamp(0.88rem, 1vw, 1rem);
  line-height: 1.2;
}

.post-card-link:hover .post-title {
  text-decoration: underline;
}

.post-card-link:hover .cta-link {
  background: var(--primary-dark);
}

.post-excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.post-actions {
  margin-top: 14px;
}

.cta-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.cta-link:hover {
  background: var(--primary-dark);
}

.state-box {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  color: var(--muted);
}

.section-title {
  margin: 28px 0 0;
  font-size: clamp(1.02rem, 1.4vw, 1.35rem);
  color: #2d2864;
}

.article-wrapper {
  max-width: 860px;
}

.article-wrapper .hero-title {
  margin-top: 10px;
  font-size: clamp(1.7rem, 3vw, 2.9rem);
  line-height: 1.12;
  max-width: 100%;
}

.back-link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.article-cover {
  margin-top: 14px;
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--line);
  max-height: 500px;
  object-fit: cover;
}

.article-content {
  margin-top: 28px;
  color: #3e445d;
  font-size: 1.2rem;
  line-height: 1.75;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content h2,
.article-content h3 {
  margin: 0 0 18px;
}

.article-content ul,
.article-content ol {
  padding-left: 22px;
}

.article-content blockquote {
  border-left: 4px solid #b3b8ff;
  padding-left: 14px;
  color: #535a78;
}

.share-box {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.share-box h3 {
  margin: 0;
  color: #2d2864;
  font-size: 1rem;
}

.share-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  color: #27304d;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.9rem;
}

.share-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.share-link.whatsapp {
  color: #128c7e;
}

.share-link.facebook {
  color: #1877f2;
}

.share-link.x {
  color: #111;
}

.share-link.telegram {
  color: #229ed9;
}

.mid-cta {
  margin: 24px 0;
  border: 1px solid #cad0f8;
  background: linear-gradient(135deg, #edf0ff, #e8ebf8);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mid-cta h3 {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
}

.mid-cta p {
  margin: 6px 0 0;
  color: var(--muted);
}

.help-box {
  margin-top: 42px;
  border: 1px solid #d2d5ef;
  border-radius: 26px;
  background: linear-gradient(180deg, #ebeafd, #e7e7fb);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.help-box h3 {
  margin: 0;
  font-size: clamp(1.2rem, 1.9vw, 1.6rem);
}

.help-box p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.footer-links {
  margin-top: 30px;
  text-align: center;
  color: #5f6478;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.site-footer {
  margin-top: 40px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

@media (max-width: 1024px) {
  .site-nav {
    gap: 16px;
    font-size: 0.92rem;
  }

  .carousel-slide-link {
    aspect-ratio: 16 / 8;
  }

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

@media (max-width: 760px) {
  .site-header-inner {
    min-height: 68px;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .nav-links .btn-primary {
    display: none;
  }

  .nav-links .btn-ghost,
  .nav-links .btn-outline {
    padding: 9px 12px;
    font-size: 0.92rem;
  }

  .site-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-menu-panel[hidden] {
    display: none !important;
  }

  .mobile-menu-panel:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 12px;
  }

  .mobile-menu-panel a {
    text-decoration: none;
    border: 1px solid var(--line);
    background: #fff;
    color: #2d2864;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.92rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .carousel-slide-link {
    aspect-ratio: 16 / 10;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .carousel-nav-prev {
    left: 10px;
  }

  .carousel-nav-next {
    right: 10px;
  }

  .carousel-content {
    left: 16px;
    right: 16px;
    bottom: 14px;
  }

  .carousel-title {
    font-size: clamp(1.02rem, 5.2vw, 1.45rem);
  }

  .carousel-excerpt {
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
  }

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

  .post-card img {
    height: 190px;
  }

  .article-wrapper .hero-title {
    font-size: clamp(1.45rem, 7vw, 2.05rem);
    line-height: 1.14;
  }

  .mid-cta,
  .help-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
