/* ===============================================
   📄 static/styles/pages/noutati.css
   =============================================== */

/* ---- Page layout ---- */
body {
  background: var(--color-bg);
}

.noutati-page {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  margin: 0 auto;
  padding: 120px 2rem 3rem;
  min-height: 80vh;
}

.noutati-container {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2.5rem 3rem;
}

/* ---- Header ---- */
.noutati-header {
  text-align: center;
  margin-bottom: 2rem;
}

.noutati-title {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.noutati-line {
  width: 40px;
  height: 3px;
  background: var(--color-text);
  margin: 0 auto 1rem;
  opacity: 0.6;
}

.noutati-subtitle {
  font-size: 0.85rem;
  opacity: 0.4;
  font-weight: 500;
}

/* ---- Filter buttons ---- */
.noutati-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 8px 22px;
  border: none;
  border-radius: 30px;
  background: rgba(128, 128, 128, 0.1);
  color: var(--color-text);
  opacity: 0.5;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  opacity: 0.8;
  background: rgba(128, 128, 128, 0.15);
}

.filter-btn.active {
  background: var(--color-text);
  color: var(--color-bg);
  opacity: 1;
}

.filter-btn[data-cat="proiecte"].active { background: #2a7d4f; color: #fff; }
.filter-btn[data-cat="concursuri"].active { background: #c23616; color: #fff; }
.filter-btn[data-cat="blog"].active { background: #1e6fbf; color: #fff; }

/* ---- Articles container ---- */
.articles-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---- Featured article ---- */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.08);
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.4s ease;
}

.featured-article:hover {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

[data-theme="dark"] .featured-article:hover {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

.featured-img {
  overflow: hidden;
  min-height: 300px;
  position: relative;
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.featured-article:hover .featured-img img {
  filter: grayscale(0%) sepia(10%);
  transform: scale(1.03);
}

.featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.article-badge {
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.article-date {
  font-size: 0.65rem;
  opacity: 0.3;
  font-weight: 600;
}

.featured-title {
  font-size: 1.4rem;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  margin-bottom: 12px;
}

.featured-excerpt {
  font-size: 0.85rem;
  opacity: 0.5;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.featured-link {
  font-weight: 700;
  font-size: 0.78rem;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.featured-article:hover .featured-link {
  opacity: 0.7;
}

/* ---- Grid articles ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.grid-article {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.08);
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.grid-article:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .grid-article:hover {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.grid-img {
  height: 140px;
  overflow: hidden;
}

.grid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(70%);
  transition: filter 0.5s ease;
}

.grid-article:hover .grid-img img {
  filter: grayscale(0%) sepia(8%);
}

.grid-body {
  padding: 1rem 1.2rem 1.2rem;
}

.grid-body .article-meta {
  margin-bottom: 8px;
}

.article-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.article-cat-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.4;
}

.grid-body .article-date {
  margin-left: auto;
  font-size: 0.55rem;
}

.grid-title {
  font-size: 0.88rem;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.3;
}

/* ---- Image placeholder ---- */
.article-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(128, 128, 128, 0.06);
}

.article-img-placeholder i {
  font-size: 2rem;
  opacity: 0.1;
}

.grid-img .article-img-placeholder i {
  font-size: 1.5rem;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  opacity: 0.3;
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-state p {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .featured-article {
    grid-template-columns: 1fr;
  }

  .featured-img {
    min-height: 200px;
  }

  .articles-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .noutati-page {
    padding: 100px 1.2rem 2rem;
  }

  .noutati-title {
    font-size: 1.6rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .featured-body {
    padding: 1.5rem;
  }

  .featured-title {
    font-size: 1.1rem;
  }

  .noutati-filters {
    flex-wrap: wrap;
  }
}

/* ===== ARTICLE READER OVERLAY ===== */
.reader-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 10000;
  overflow: hidden;
}

.reader-scroll-area {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 3.5rem;
}

.reader-panel {
  background: var(--color-bg, #fff);
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: readerSlideUp 0.3s ease;
}

@keyframes readerSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Top bar */
.reader-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.08);
}

.reader-counter {
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.35;
  letter-spacing: 1px;
}

.reader-topbar-actions {
  display: flex;
  gap: 0.3rem;
}

.reader-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--color-text, #333);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: all 0.2s;
}

.reader-action-btn:hover {
  opacity: 1;
  background: rgba(128, 128, 128, 0.1);
}

/* Nav arrows */
.reader-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.reader-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.reader-nav-prev { left: 1.5rem; }
.reader-nav-next { right: 2rem; }

/* Cover */
.reader-cover {
  width: 100%;
  max-height: 380px;
  overflow: hidden;
}

.reader-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body */
.reader-body {
  padding: 1.8rem 2.5rem 2.5rem;
}

.reader-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 12px;
  border-radius: 20px;
  color: #fff;
  text-transform: uppercase;
}

.reader-date {
  font-size: 0.75rem;
  opacity: 0.4;
}

.reader-title {
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.reader-excerpt {
  font-size: 0.9rem;
  opacity: 0.5;
  line-height: 1.7;
  font-style: italic;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.12);
  margin-bottom: 1.5rem;
}

.reader-content {
  font-size: 0.92rem;
  line-height: 1.9;
}

.reader-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}

.reader-content h1,
.reader-content h2,
.reader-content h3 {
  font-family: Georgia, serif;
  margin: 1.5rem 0 0.5rem;
}

.reader-content blockquote {
  border-left: 3px solid var(--color-accent, #c8a951);
  padding-left: 1rem;
  margin: 1rem 0;
  opacity: 0.7;
  font-style: italic;
}

.reader-content ul,
.reader-content ol {
  padding-left: 1.5rem;
  margin: 0.8rem 0;
}

/* Make cards clickable */
.featured-article,
.grid-article {
  cursor: pointer;
}

/* ===== GALLERY ===== */
.reader-gallery {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(128, 128, 128, 0.12);
}

.reader-gallery-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.25;
  margin-bottom: 0.6rem;
}

.reader-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.reader-gallery-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(128, 128, 128, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.reader-gallery-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.reader-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(30%);
  transition: filter 0.3s;
}

.reader-gallery-thumb:hover img {
  filter: grayscale(0%);
}

/* ===== LIGHTBOX ===== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10001;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
}

@media (max-width: 600px) {
  .reader-scroll-area { padding: 0.5rem; }
  .reader-body { padding: 1.2rem 1.5rem 1.5rem; }
  .reader-title { font-size: 1.3rem; }
  .reader-nav-prev { left: 0.3rem; }
  .reader-nav-next { right: 0.3rem; }
  .reader-nav { width: 36px; height: 36px; font-size: 0.85rem; }
  .reader-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .lightbox-nav { width: 36px; height: 36px; font-size: 0.8rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}