.news {
  padding: 4rem 0;
  background: var(--bg-muted);
  width: 100%;
}

.news .section-header {
  margin-bottom: 2rem;
}

.news-scroll-wrap {
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(0, 0, 0, 0.06);
  -webkit-overflow-scrolling: touch;
}

.news-scroll-wrap::-webkit-scrollbar {
  height: 6px;
}

.news-scroll-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 0;
}

.news-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 0;
}

.news-cards {
  display: flex;
  gap: 1.25rem;
  padding: 0 1rem;
  width: max-content;
  min-height: 320px;
}

.news-card {
  flex: 0 0 auto;
  width: 300px;
  min-width: 280px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}

.news-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--primary);
}

.news-card-image-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-image-inner {
  transform: scale(1.05);
}

.news-card-image-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.9) 100%);
  pointer-events: none;
}

.news-card-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1rem 1.25rem 0;
}

.news-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0.25rem 1.25rem 0.75rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.news-card-excerpt {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 1.25rem 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-button {
  margin: auto 1.25rem 1.25rem auto;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--accent-light);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid rgba(234, 88, 12, 0.5);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  width: fit-content;
}

.news-card-button:hover {
  background: rgba(234, 88, 12, 0.15);
  color: #fff;
  border-color: var(--accent);
}

.news-card-button-icon {
  font-size: 0.75rem;
}

/* Modal */
.news-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: newsModalFadeIn 0.3s ease;
}

@keyframes newsModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.news-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: newsModalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes newsModalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.news-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  color: #64748b;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.news-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #334155;
}

.news-modal-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  padding: 1.5rem 3.5rem 0.25rem 1.5rem;
}

.news-modal-date {
  font-size: 0.8125rem;
  color: var(--accent);
  padding: 0 1.5rem 1rem;
  letter-spacing: 0.05em;
}

.news-modal-image-wrap {
  padding: 0 1.5rem 1rem;
}

.news-modal-image-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.news-modal-description {
  font-size: 1rem;
  color: #475569;
  line-height: 1.7;
  margin: 0 1.5rem 1.5rem;
}

.news-modal-description p {
  margin: 0 0 1.5em;
}

.news-modal-description p:last-child {
  margin-bottom: 0;
}

.news-modal-source {
  margin: 0 1.5rem 1rem;
  font-size: 0.9rem;
}

.news-modal-source a {
  color: var(--accent, #f27d16);
  text-decoration: none;
}

.news-modal-source a:hover {
  text-decoration: none;
}

.news-modal-videos {
  display: flex;
  gap: 0.75rem;
  margin: 0 1.5rem 1.5rem;
  flex-wrap: wrap;
}

.news-modal-video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(242, 125, 22, 0.15);
  border: 1px solid rgba(242, 125, 22, 0.3);
  border-radius: 0;
  color: var(--accent, #f27d16);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.news-modal-video-link:hover {
  background: rgba(242, 125, 22, 0.25);
  border-color: rgba(242, 125, 22, 0.5);
  color: var(--accent-dark, #e56700);
}

.news-modal-video-wrap {
  margin: 0 1.5rem 1.5rem;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0;
  background: #000;
}

.news-modal-video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .news {
    padding: 2.5rem 0;
  }

  .news-cards {
    min-height: 300px;
  }

  .news-card {
    width: 260px;
    min-width: 260px;
  }

  .news-card-title {
    font-size: 1rem;
  }

  .news-modal-title {
    font-size: 1.2rem;
    padding: 1.25rem 3rem 0.25rem 1rem;
  }

  .news-modal-date,
  .news-modal-image-wrap,
  .news-modal-description {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .news-modal-videos {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .news-modal-video-wrap {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}
