:root {
  --news-primary: #2cf3c8;
  --news-secondary: #24d6f3;
  --news-surface: rgba(11, 30, 48, 0.86);
  --news-surface-strong: rgba(9, 23, 37, 0.94);
  --news-border: rgba(125, 213, 255, 0.22);
  --news-muted: #9fb3c8;
  --news-text: #ecf5ff;
  --news-shadow: 0 22px 46px rgba(0, 0, 0, 0.48);
  --news-transition: 0.28s ease;
}

body.news-page {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--news-text);
  background:
    radial-gradient(circle at 9% 8%, rgba(44, 243, 200, 0.13), transparent 36%),
    radial-gradient(circle at 92% 88%, rgba(36, 214, 243, 0.1), transparent 40%),
    var(--bg-dark);
  line-height: 1.62;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.gap-2 {
  gap: 0.5rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(110px, 13vw, 150px) 0 clamp(72px, 8vw, 96px);
  border-bottom: 1px solid rgba(44, 243, 200, 0.35);
  background-image:
    linear-gradient(160deg, rgba(6, 16, 27, 0.86), rgba(8, 21, 35, 0.92)),
    url('/assets/news/background.avif');
  background-size: cover;
  background-position: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0;
  background: linear-gradient(to bottom, rgba(4, 13, 22, 0.35), rgba(4, 13, 22, 0.72));
}

.hero::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(44, 243, 200, 0.85), transparent);
  box-shadow: 0 0 18px rgba(44, 243, 200, 0.6);
}

.hero-bg-effect {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.25;
}

.effect-1 {
  width: 360px;
  height: 360px;
  top: -70px;
  left: -90px;
  background: rgba(44, 243, 200, 0.7);
}

.effect-2 {
  width: 460px;
  height: 460px;
  right: -110px;
  top: -120px;
  background: rgba(36, 214, 243, 0.42);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  border: 1px solid rgba(114, 212, 255, 0.3);
  padding: 7px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d4f3ff;
  background: rgba(5, 19, 30, 0.62);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--news-primary);
  animation: pulse 1.8s ease-in-out infinite;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #f4fbff;
}

.hero h1 span {
  color: var(--news-primary);
}

.hero-desc {
  margin: 0;
  max-width: 680px;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(233, 245, 255, 0.9);
}

.social-links {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9fc6de;
  border: 1px solid rgba(114, 212, 255, 0.26);
  background: rgba(8, 23, 36, 0.62);
  transition: transform var(--news-transition), border-color var(--news-transition), color var(--news-transition), background var(--news-transition);
}

.social-btn:hover {
  transform: translateY(-3px);
  color: var(--news-primary);
  border-color: rgba(44, 243, 200, 0.65);
  background: rgba(11, 35, 52, 0.9);
}

.hero-highlights {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.hero-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(235, 247, 255, 0.9);
  border: 1px solid rgba(114, 212, 255, 0.22);
  background: linear-gradient(135deg, rgba(8, 22, 36, 0.84), rgba(11, 31, 48, 0.72));
}

main {
  position: relative;
  flex: 1;
  padding: clamp(48px, 6vw, 74px) 0 clamp(80px, 9vw, 120px);
}

.bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(44, 243, 200, 0.06), transparent 26%),
    radial-gradient(circle at 80% 70%, rgba(36, 214, 243, 0.05), transparent 32%),
    linear-gradient(transparent 96%, rgba(255, 255, 255, 0.03) 96%);
  background-size: auto, auto, 100% 34px;
}

main .container {
  position: relative;
  z-index: 1;
}

.section-title {
  margin: 0 auto 34px;
  max-width: 920px;
  text-align: center;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  color: #f2f9ff;
  letter-spacing: -0.01em;
}

.section-title h2::after {
  content: "";
  display: block;
  width: 84px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--news-primary), #5fd5ff 58%, var(--news-secondary));
}

.section-lead {
  margin: 12px auto 0;
  max-width: 760px;
  color: var(--news-muted);
  font-size: 0.97rem;
}

.posts-wrapper {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--news-border);
  background:
    linear-gradient(170deg, rgba(11, 31, 48, 0.92), rgba(8, 20, 33, 0.98)),
    radial-gradient(circle at 88% 10%, rgba(114, 212, 255, 0.12), transparent 36%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  transition: transform var(--news-transition), box-shadow var(--news-transition), border-color var(--news-transition);
}

.blog-card:hover {
  transform: translateY(-7px);
  border-color: rgba(114, 212, 255, 0.54);
  box-shadow: var(--news-shadow);
}

.card-top-line {
  height: 3px;
  background: linear-gradient(90deg, var(--news-primary), #5fd5ff 48%, var(--news-secondary));
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #081523;
}

.card-image img,
.card-image picture {
  width: 100%;
  height: 100%;
}

.card-image img {
  object-fit: cover;
  transition: transform 0.7s ease;
}

.blog-card:hover .card-image img {
  transform: scale(1.05);
}

.category-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(114, 212, 255, 0.32);
  background: rgba(6, 20, 33, 0.8);
  color: #95dbff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-content {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 18px;
}

.card-blur {
  position: absolute;
  right: -38px;
  top: -35px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(44, 243, 200, 0.2);
  filter: blur(68px);
  pointer-events: none;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #9cb6ca;
  font-size: 0.82rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 14px;
  height: 14px;
  color: #7de5ff;
}

.separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(173, 201, 223, 0.4);
}

.card-title {
  margin: 0;
  font-size: clamp(1.24rem, 2vw, 1.6rem);
  line-height: 1.28;
  color: #f2f9ff;
}

.author-info {
  margin: 16px 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(122, 167, 204, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #041826;
  background: linear-gradient(135deg, var(--news-primary), #74e6ff);
}

.author-details h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e7f4ff;
}

.author-details p {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: #9ab1c5;
}

.card-text {
  color: var(--news-muted);
  font-size: 0.96rem;
  line-height: 1.68;
}

.card-text p {
  margin: 0;
}

.card-text p:first-child {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-text p:not(:first-child) {
  display: none;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(114, 212, 255, 0.26);
  background: rgba(9, 30, 47, 0.68);
  color: #9ce7ff;
  font-size: 0.68rem;
  font-weight: 600;
  transition: background var(--news-transition), color var(--news-transition), border-color var(--news-transition);
}

.tag-chip:hover {
  color: #042030;
  background: var(--news-primary);
  border-color: rgba(44, 243, 200, 0.88);
}

.card-footer {
  margin-top: auto;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(122, 167, 204, 0.2);
  background: linear-gradient(180deg, rgba(6, 18, 30, 0.22), rgba(6, 18, 30, 0.55));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-btn {
  border: 1px solid rgba(114, 212, 255, 0.35);
  border-radius: 10px;
  background: rgba(9, 30, 47, 0.72);
  color: #cff3ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--news-transition), color var(--news-transition), border-color var(--news-transition), background var(--news-transition);
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.action-btn:hover {
  transform: translateY(-2px);
  color: #032030;
  background: linear-gradient(115deg, var(--news-primary), #74e6ff);
  border-color: rgba(44, 243, 200, 0.88);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(114, 212, 255, 0.28);
  background: rgba(9, 30, 47, 0.55);
  color: #9fc6de;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--news-transition), color var(--news-transition), border-color var(--news-transition), background var(--news-transition);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  transform: translateY(-2px);
  color: var(--news-primary);
  border-color: rgba(44, 243, 200, 0.66);
  background: rgba(11, 35, 52, 0.9);
}

.hero-content > * {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.55s ease forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.12s; }
.hero-content > *:nth-child(3) { animation-delay: 0.18s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
.hero-content > *:nth-child(5) { animation-delay: 0.3s; }

.blog-card {
  opacity: 0;
  transform: translateY(14px);
  animation: cardIn 0.5s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.18s; }
.blog-card:nth-child(3) { animation-delay: 0.26s; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(44, 243, 200, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(44, 243, 200, 0); }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .posts-wrapper {
    grid-template-columns: 1fr;
    max-width: 820px;
  }

  .card-text p:first-child {
    -webkit-line-clamp: 5;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 100px 0 62px;
    background-attachment: scroll;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-desc {
    font-size: 0.98rem;
  }

  .hero-highlights span {
    font-size: 0.72rem;
  }

  .section-title {
    margin-bottom: 24px;
  }

  .section-title h2 {
    font-size: 1.72rem;
  }

  .section-lead {
    font-size: 0.9rem;
  }

  .card-content {
    padding: 18px 16px 14px;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .card-footer {
    padding: 12px 16px 14px;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 84px 0 52px;
  }

  .badge {
    font-size: 0.63rem;
    letter-spacing: 0.12em;
    padding: 6px 11px;
    margin-bottom: 12px;
  }

  .hero h1 {
    font-size: 1.92rem;
  }

  .social-btn {
    width: 38px;
    height: 38px;
  }

  .card-image {
    aspect-ratio: 16 / 11;
  }

  .meta-info {
    gap: 8px;
    font-size: 0.76rem;
  }

  .author-info {
    margin: 12px 0;
    padding-bottom: 12px;
  }

  .card-text {
    font-size: 0.9rem;
  }

  .card-text p:first-child {
    -webkit-line-clamp: 4;
  }

  .action-btn {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content > *,
  .blog-card,
  .badge-dot {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
