﻿/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Layout ── */
#welcome-nw {
  width: 100%;
}

.container-nw {
  width: 100%;
  max-width: 65%;
  margin: 0 auto;
  padding: 0 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.col-md-4 {
  width: 33.333%;
  padding: 0 10px;
}

/* ── Card ── */
.news-card-nw {
  background: #ffffff;
  border: 1px solid #e2e5ea;
  border-radius: 16px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 195px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.news-card-nw:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
  transform: translateY(-3px);
  border-color: #c8cdd6;
}

/* Hide the raw CMS data list */
.news-card-nw .card-items-nw {
  display: none;
}

/* ── Badge / Heading ── */
.card-header-nw {
  display: flex;
  align-items: flex-start;
}

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.badge-admission   { background: #fdeee8; color: #b84a1e; }
.badge-recruitment { background: #e6f1fb; color: #185fa5; }
.badge-event       { background: #e2f5ee; color: #0f6e56; }

/* ── Card body — FIX: was .card-body, HTML uses .card-body-nw ── */
.card-body-nw {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 100px;
  overflow: hidden;
}

/* The anchor wrapping the title — no underline, block display */
.card-link-nw {
  text-decoration: none;
  display: block;
}

.card-link-nw:hover .card-title-nw {
  color: #e0591c;
}

.card-title-nw {
  font-size: 15px;
  font-weight: 600;
  color: #1a1d23;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.28s ease, transform 0.28s ease, color 0.15s ease;
}

.card-title-nw.fade-out { opacity: 0; transform: translateY(7px); }
.card-title-nw.fade-in  { opacity: 1; transform: translateY(0); }

.card-date-nw {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #9199a6;
  transition: opacity 0.28s ease;
}

.icon-cal   { font-size: 12px; line-height: 1; flex-shrink: 0; }
.icon-arrow { font-size: 13px; line-height: 1; }
.card-date-nw.fade-out { opacity: 0; }
.card-date-nw.fade-in  { opacity: 1; }

/* ── Hover nav arrows ── */
.card-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.news-card-nw:hover .card-nav {
  opacity: 1;
  pointer-events: all;
}

.nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #dce0e6;
  background: #ffffff;
  color: #3a3f4a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
  padding-bottom: 1px;
}

.nav-btn:hover {
  background: #f5f7fa;
  transform: scale(1.1);
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .col-md-4 {
    width: 50%;
    margin-bottom: 20px;
  }
}

@media (max-width: 600px) {
  .col-md-4 {
    width: 100%;
    margin-bottom: 16px;
  }

  .card-body-nw { min-height: 80px; }
}
