.hero-section {
  background: var(--bg-color);
  color: var(--text-color);
}

.hero-search-panel {
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(255, 255, 255, 0.85));
  overflow: hidden;
}

[data-theme="dark"] .hero-search-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(13, 17, 23, 0.95));
}

.hero-search-panel-body {
  padding: 2rem;
}

.hero-search-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-search-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
}

.hero-search {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-search-field {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-search-btn {
  border-radius: 1rem;
  width: 100%;
}

.hero-telegram-invite {
  border-radius: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #0088cc, #0d6efd);
  color: #f8fafc;
  display: flex;
  gap: 1rem;
  align-items: center;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-telegram-invite--mobile {
  display: none;
  width: 100%;
}

.hero-telegram-invite--inline {
  display: flex;
}

.mobile-telegram-block {
  display: none;
}

.hero-telegram-invite:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(13, 110, 253, 0.2);
}

.hero-telegram-invite.is-hidden {
  display: none;
}

.hero-telegram-icon {
  width: 54px;
  height: 54px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.hero-telegram-content {
  flex: 1;
}

.hero-telegram-title {
  font-weight: 700;
}

.hero-telegram-copy {
  font-size: 0.95rem;
  color: rgba(248, 250, 252, 0.9);
}

.hero-telegram-handle {
  font-weight: 700;
}

.hero-telegram-cta {
  border-radius: 999px;
  font-weight: 600;
  color: #0d6efd;
}

.hero-telegram-close {
  border: none;
  background: transparent;
  color: rgba(248, 250, 252, 0.85);
  font-size: 1rem;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem;
  display: none;
}

[data-theme="dark"] .hero-telegram-invite {
  background: linear-gradient(135deg, #0d1b2a, #1f4287);
}

[data-theme="dark"] .hero-telegram-cta {
  color: #0f172a;
}

@media (min-width: 992px) {
  .hero-search-panel-body {
    padding: 2.5rem 3rem;
  }

  .hero-search-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    align-items: start;
    gap: 2rem;
  }

  .hero-search-column {
    gap: 1.25rem;
  }

  .hero-search {
    flex-direction: row;
    align-items: stretch;
  }

  .hero-search-field {
    max-width: 600px;
  }

  .hero-search-btn {
    width: auto;
    min-width: 160px;
  }

  .hero-telegram-invite {
    max-width: 320px;
  }
}

.hero-search-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.25;
}

.hero-search-subtitle {
  font-size: 1rem;
  max-width: 720px;
}

.hero-search input {
  border-radius: 1.1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .hero-search input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-color);
}

.hero-search .btn {
  border-radius: 1rem;
  height: 100%;
}

.hero-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-topics .btn {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  font-weight: 600;
  font-size: 0.85rem;
}

[data-theme="dark"] .hero-topics .btn {
  border-color: rgba(255, 255, 255, 0.2);
  color: #f3f4f6;
}

.hero-grid {
  margin-top: 0.5rem;
}

.hero-story {
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--card-bg, #fff);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero-story-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hero-story-media img,
.hero-story-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-story:hover .hero-story-media img {
  transform: scale(1.04);
}

.hero-story-placeholder {
  background: rgba(15, 23, 42, 0.08);
  color: #94a3b8;
}

.hero-story-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.7;
}

.hero-story-label {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  z-index: 1;
  text-transform: uppercase;
}

[data-theme="dark"] .hero-story-label {
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
}

.hero-story-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.hero-story-meta {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-story-meta-views {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.hero-story-title {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.3;
}

.hero-story-summary {
  font-size: 0.98rem;
  color: var(--text-muted);
}

.hero-story-cta {
  border-radius: 999px;
  align-self: flex-start;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
}

.hero-empty {
  border-radius: 1.5rem;
}

.hero-trending {
  border-radius: 1.5rem;
  background: var(--card-bg, #fff);
  height: 100%;
}

.hero-trending-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-trending-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.2rem;
  padding: 0.65rem;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  color: var(--text-color);
}

.hero-trending-item:hover {
  transform: translateX(4px);
  border-color: rgba(13, 110, 253, 0.5);
  background: rgba(13, 110, 253, 0.05);
}

.hero-trending-thumb {
  width: 72px;
  height: 72px;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
  position: relative;
}

.hero-trending-thumb img,
.hero-trending-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-trending-placeholder {
  color: rgba(15, 23, 42, 0.5);
  font-size: 1.25rem;
}

[data-theme="dark"] .hero-trending-placeholder {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.hero-trending-content {
  flex: 1;
}

.hero-trending-index {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-trending-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.hero-trending-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-trending-views {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hero-trending-empty {
  border: 1px dashed rgba(15, 23, 42, 0.15);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
}

.section-padding {
  padding: 3rem 0;
}

.section-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

@media (max-width: 991px) {
  .hero-telegram-invite--inline {
    display: none;
  }

  .mobile-telegram-block {
    display: block;
    margin-top: 2rem;
  }

  .hero-telegram-invite--mobile {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 1.25rem 1.35rem;
    gap: 0.85rem;
    max-height: none;
    min-height: 160px;
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.18);
  }

  .hero-telegram-invite--mobile .hero-telegram-icon {
    margin-bottom: 0;
  }

  .hero-telegram-invite--mobile .hero-telegram-content {
    text-align: left;
  }

  .hero-telegram-invite--mobile .hero-telegram-close {
    display: block;
  }

  .hero-story,
  .hero-trending {
    min-height: auto;
  }

  .hero-story-body {
    padding: 1.5rem;
  }

  .hero-trending-thumb {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 576px) {
  .hero-search-panel-body {
    padding: 1.5rem;
  }

  .hero-search {
    gap: 0.5rem;
  }

  .hero-search-btn {
    width: 100%;
  }

  .hero-search-layout {
    gap: 1rem;
  }

  .hero-search input {
    padding: 0.85rem 1rem;
  }

  .hero-story-media {
    aspect-ratio: 16 / 9;
  }

  .hero-trending-item {
    align-items: flex-start;
  }
}
