/* ===== SECTION ===== */

#articles {
  padding: 100px 10%;
  background: #ffffff;
}

#articles h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 50px;
  color: #0077aa;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ===== WRAPPER ===== */
.articles-wrapper {
  position: relative;
}

/* fade neutrál */
.articles-wrapper::before,
.articles-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.articles-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 20%, transparent);
  width: 0px;
}

.articles-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 20%, transparent);
  width: 200px;
}

/* ===== HORIZONTAL SCROLL ===== */
.articles-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 10px 5px 25px;

  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;

  scrollbar-width: none;
  -ms-overflow-style: none;

  cursor: grab;
}

.articles-grid::-webkit-scrollbar {
  display: none;
}

.articles-grid.dragging {
  cursor: grabbing;
  user-select: none;
}

/* ===== CARD ===== */
.article-card {
  flex: 0 0 auto;
  width: 320px;

  background: #ffffff;
  padding: 22px;
  border-radius: 18px;
  cursor: pointer;

  border: 1px solid #eaeaea;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);

  scroll-snap-align: start;
  transition: all 0.25s ease;
}

.article-card:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

/* TEXT */
.article-card h3 {
  margin-bottom: 10px;
  color: #111;
  font-size: 1.1rem;
}

.article-card p {
  color: #666;
  font-size: 0.92rem;
  line-height: 1.5;
}

.article-date {
  font-size: 0.78rem;
  color: #999;
  display: block;
  margin-bottom: 10px;
}

/* ===== MODAL ===== */
.article-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: flex-end; /* ⬅️ pritlačí dole */
  justify-content: center;
  padding: 0; /* ⬅️ odstráni medzeru dole */
}

.article-modal-content {
  width: 100%;
  max-width: 900px;
  height: 85vh; /* ⬅️ pevná výška aby sadol dole */
  max-height: none;
  border-radius: 18px 18px 0 0; /* ⬅️ dole rovné (napojené na spodok) */
  background: #fff;
  padding: 32px;

  display: flex;
  flex-direction: column;

  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);

  animation: slideUp 0.45s cubic-bezier(.22,.8,.32,1);

  overflow: hidden;
}


/* ===== SCROLL CONTENT ===== */
.article-modal-body {
  overflow-y: auto;
  margin-top: 20px;
  padding-right: 10px;

  line-height: 1.7;
  color: #333;
}

/* ===== CLOSE BUTTON ===== */
.article-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  transition: 0.2s;
}

.article-close:hover {
  color: #000;
  transform: scale(2.15);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(120px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== META TOP ===== */
.article-meta-top {
  display: flex;
  justify-content: space-evenly;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 10px;
}

/* source badge */
#articleSource {
  background: #f4f4f4;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: #666;
}

/* ===== FOOTER ===== */
.article-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

#articleLink {
  font-size: 0.85rem;
  color: #0077aa;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

#articleLink:hover {
  color: #005f88;
  text-decoration: underline;
}

/* ===== DISCLAIMER ===== */
#articleDisclaimer {
  font-size: 0.72rem;
  color: #888;
  margin-top: 18px;
  line-height: 1.4;
  opacity: 0.85;
}