/* Xəbərlər — LADA-style kart karuseli */

.news-section {
  --news-accent: var(--lada-accent, #e37639);
  --news-font: var(--lada-font, "Montserrat", "Segoe UI", sans-serif);
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: var(--lada-section-py, clamp(56px, 6vw, 96px)) clamp(32px, 5vw, 80px);
  background: #fff;
  font-family: var(--news-font);
  overflow: hidden;
}

.news-section__inner {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.news-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.news-section__title {
  margin: 0;
  color: #9aa3ab;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: var(--lada-track-wide, 0.04em);
  text-transform: uppercase;
}

.news-section__actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
  flex-shrink: 0;
}

.news-section__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 clamp(18px, 2vw, 28px);
  border-radius: 999px;
  background: var(--news-accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: var(--lada-track-label, 0.06em);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease;
}

.news-section__all:hover {
  background: #cf692f;
  color: #fff;
  transform: translateY(-1px);
}

.news-section__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-section__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #1d252d;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.news-section__arrow:hover {
  opacity: 0.5;
  transform: scale(1.06);
}

.news-section__arrow:active {
  transform: scale(0.94);
}

.news-section__viewport {
  overflow: hidden;
  cursor: grab;
  margin: 0 calc(-1 * clamp(32px, 5vw, 80px));
  padding: 0 clamp(32px, 5vw, 80px);
}

.news-section__viewport.is-dragging {
  cursor: grabbing;
}

.news-section__track {
  display: flex;
  gap: 12px;
  will-change: transform;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-section__viewport.is-dragging .news-section__track {
  transition: none;
}

.news-card {
  flex: 0 0 auto;
  width: clamp(260px, 22vw, 320px);
  min-height: clamp(260px, 22vw, 320px);
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-section.is-inview .news-card {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: calc(var(--news-i, 0) * 0.06s + 0.08s);
}

.news-section.is-inview .news-card:hover {
  transform: translate3d(0, -10px, 0);
}

.news-card__link {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: inherit;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid #e0e4e8;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease;
}

.news-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 28%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 72%
  );
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.news-card__link:hover::after {
  transform: translateX(120%);
}

.news-card__link:hover {
  border-color: #c8d0d8;
  box-shadow: 0 16px 40px rgba(29, 37, 45, 0.12);
}

.news-card:not(.news-card--featured):hover .news-card__title {
  color: var(--news-accent);
}

.news-card:not(.news-card--featured):hover .news-card__date {
  color: #cf692f;
}

.news-card--featured .news-card__link {
  border-color: transparent;
  background: linear-gradient(145deg, #e37639 0%, #f0a060 55%, #f5b878 100%);
  color: #fff;
}

.news-card--featured .news-card__link:hover {
  background: linear-gradient(145deg, #d96a2e 0%, #e89550 55%, #f0a860 100%);
  box-shadow: 0 18px 44px rgba(227, 118, 57, 0.35);
}

.news-card__watermark {
  position: absolute;
  right: -8%;
  bottom: -6%;
  width: clamp(120px, 14vw, 180px);
  height: auto;
  opacity: 0.14;
  pointer-events: none;
  filter: brightness(0) invert(1);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.news-card--featured:hover .news-card__watermark {
  transform: scale(1.1);
  opacity: 0.22;
}

.news-card__date {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(14px, 1.8vw, 20px);
  color: var(--news-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--lada-track-normal, 0);
  transition: color 0.3s ease;
}

.news-card--featured .news-card__date {
  color: #fff;
}

.news-card__title {
  position: relative;
  z-index: 1;
  margin: 0 0 auto;
  font-size: clamp(0.8125rem, 1.05vw, 0.9375rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: var(--lada-track-wide, 0.04em);
  text-transform: uppercase;
  color: #1d252d;
  transition: color 0.3s ease;
}

.news-card--featured .news-card__title {
  color: #fff;
}

.news-card__text {
  position: relative;
  z-index: 1;
  margin: clamp(12px, 1.5vw, 18px) 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.55;
  color: #59636d;
}

.news-card--featured .news-card__text {
  color: rgba(255, 255, 255, 0.88);
}

@media (max-width: 768px) {
  .news-section {
    padding: 48px 16px;
  }

  .news-section__header {
    flex-wrap: wrap;
    gap: 16px;
  }

  .news-section__actions {
    width: 100%;
    justify-content: space-between;
  }

  .news-section__viewport {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .news-card {
    width: min(76vw, 300px);
    min-height: 280px;
  }
}

@media (max-width: 480px) {
  .news-section__all {
    min-height: 36px;
    padding: 0 16px;
    font-size: 0.625rem;
  }

  .news-section__arrow {
    width: 32px;
    height: 32px;
  }

  .news-card {
    width: calc(100vw - 56px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-section__track {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
