/* ==========================================================================
   MODULI I LAJMEVE (NEWS MODULE STYLES)
   ========================================================================== */

.news-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 0 5rem 0;
}

/* Shiriti lart per butonin Kthehu me hapesire minimale vertikale */
.news-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 0.4rem 0;
}

/* Butoni Kthehu ne modulin e lajmeve: dizajn koherent, me kontrast te qarte nga sfondi */
.news-container .back-btn {
  background: #ffffff;
  border: 1px solid rgba(45, 91, 255, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  color: var(--primary-blue);
  padding: 0.42rem 0.95rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.news-container .back-btn:hover {
  background: #F8FAFC;
  border-color: var(--primary-blue);
  transform: translateX(-2px);
}

.news-header {
  text-align: center;
  margin-bottom: 0.6rem;
}

.news-header h2 {
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  font-weight: 800;
  color: var(--primary-blue);
  margin: 0 0 0.15rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.news-header p {
  color: #64748B;
  font-size: 0.82rem;
  margin: 0;
}

/* Grida e Artikujve */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin-top: 0.6rem;
}

/* Karta e Lajmit */
.news-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(45, 91, 255, 0.4);
}

.news-card-img-wrapper {
  width: 100%;
  height: 180px;
  background: #E2E8F0;
  overflow: hidden;
  position: relative;
}

.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.04);
}

.news-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748B;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.news-date-badge {
  background: rgba(45, 91, 255, 0.08);
  color: var(--primary-blue);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin: 0 0 0.5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 0.85rem;
  color: #64748B;
  line-height: 1.45;
  margin: 0 0 0.8rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid #F1F5F9;
}

.news-read-btn {
  color: var(--primary-blue);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.news-read-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.news-card:hover .news-read-btn svg {
  transform: translateX(4px);
}

/* Pamja e Artikullit te Plote */
.news-article-view {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: var(--card-shadow);
  margin-top: 0.2rem;
}

.news-article-hero {
  width: 100%;
  max-height: 380px;
  border-radius: 14px;
  object-fit: cover;
  margin: 0.8rem 0 1.2rem 0;
}

.news-article-title {
  font-size: clamp(1.25rem, 4vw, 1.9rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0.4rem 0 0.7rem 0;
}

.news-article-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #64748B;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
}

.news-article-content {
  font-size: 0.98rem;
  line-height: 1.75;
  color: #334155;
}

.news-article-content p {
  margin-bottom: 1.1rem;
}

.news-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1rem 0;
}

.news-article-content figure {
  margin: 1.3rem 0;
}

.news-article-content figcaption {
  font-size: 0.8rem;
  color: #94A3B8;
  text-align: center;
  margin-top: 0.4rem;
}

.news-article-content h2,
.news-article-content h3,
.news-article-content h4 {
  color: var(--text-dark);
  font-weight: 700;
  margin: 1.6rem 0 0.7rem 0;
  line-height: 1.3;
}

.news-article-content blockquote {
  border-left: 4px solid var(--primary-blue);
  padding-left: 1rem;
  margin: 1.2rem 0;
  color: #475569;
  font-style: italic;
}

/* Skeleton Loading */
.news-skeleton-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 1rem;
  height: 320px;
  animation: pulse 1.5s infinite;
}

.news-skeleton-img {
  width: 100%;
  height: 160px;
  background: #E2E8F0;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.news-skeleton-line {
  height: 14px;
  background: #E2E8F0;
  border-radius: 6px;
  margin-bottom: 0.6rem;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ==========================================================================
   INFINITE SCROLL
   ========================================================================== */
.news-scroll-status {
  width: 100%;
  margin: 2rem auto 1rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
}

.news-infinite-loader {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

.news-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(45, 91, 255, 0.18);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: newsSpin 0.7s linear infinite;
}

@keyframes newsSpin {
  to { transform: rotate(360deg); }
}

.news-infinite-end {
  text-align: center;
  padding: 1.2rem 1.5rem;
  color: #94A3B8;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 450px;
  animation: fadeIn 0.4s ease;
}

.news-infinite-end::before,
.news-infinite-end::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.news-infinite-error {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 0.55rem 1.1rem;
  border-radius: 12px;
  color: #DC2626;
  font-size: 0.85rem;
  font-weight: 600;
}

.news-retry-btn {
  background: #DC2626;
  color: #ffffff;
  border: none;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.news-retry-btn:hover {
  opacity: 0.9;
}

.news-card-animated {
  animation: newsCardFadeIn 0.4s ease forwards;
}

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

