/* =========================================
   CSS CHO TRANG CHỦ (index.php) & SỰ KIỆN
========================================= */

/* Slideshow Container */
.slideshow-container { 
  max-width: 100%; 
  position: relative; 
  margin: 0 0 24px 0; 
  border-radius: var(--radius); 
  overflow: hidden; 
  box-shadow: var(--shadow); 
}
.mySlides { display: none; }
.mySlides a { display: block; text-decoration: none; }
.mySlides img { 
  vertical-align: middle; 
  width: 100%; 
  height: 400px; 
  object-fit: cover; 
}

/* Nút Next/Prev của Slide */
.prev, .next { 
  cursor: pointer; 
  position: absolute; 
  top: 50%; 
  width: auto; 
  padding: 16px; 
  margin-top: -22px; 
  color: white; 
  font-weight: bold; 
  font-size: 18px; 
  transition: 0.3s ease; 
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; 
  user-select: none; 
  background-color: rgba(0,0,0,0.4); 
  text-decoration: none; 
  z-index: 2; 
}
.next { 
  right: 0; 
  border-radius: var(--radius-sm) 0 0 var(--radius-sm); 
}
.prev:hover, .next:hover { 
  background-color: rgba(0,0,0,0.8); 
}

/* Chấm Slide */
.dot-container { 
  text-align: center; 
  padding: 0 10px 20px 10px; 
}
.dot { 
  cursor: pointer; 
  height: 10px; 
  width: 10px; 
  margin: 0 4px; 
  background-color: #cbd5e1; 
  border-radius: 50%; 
  display: inline-block; 
  transition: background-color 0.3s ease; 
}
.active, .dot:hover { 
  background-color: var(--primary); 
}

/* Hiệu ứng Fade */
.fade { 
  animation-name: fade; 
  animation-duration: 1.5s; 
}
@keyframes fade { 
  from {opacity: .4} 
  to {opacity: 1} 
}

/* Responsive cho Slide */
@media (max-width: 768px) { 
  .mySlides img { height: 200px; } 
}

/* =========================================
   SỰ KIỆN CARD (index.php)
========================================= */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.ev-card { 
  background: var(--surface); 
  border-radius: var(--radius); 
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ev-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--secondary);
}

.ev-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ev-card .name { 
  font-weight: 700; 
  font-size: 18px; 
  margin: 0 0 12px; 
  line-height: 1.4;
}
.ev-card .name a { 
  color: var(--primary); 
}
.ev-card .name a:hover { 
  color: var(--secondary);
}

.ev-card .row { 
  font-size: 14px; 
  color: var(--text-main); 
  margin: 6px 0; 
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ev-card .row .icon {
  color: var(--text-muted);
  width: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* =========================================
   TRANG CHI TIẾT SỰ KIỆN (news_event.php)
========================================= */
.news-detail-wrapper img {
  max-width: 100% !important; 
  height: auto !important; 
  object-fit: contain; 
  border-radius: var(--radius); 
  display: block; 
  margin: 0 auto 24px auto; 
  box-shadow: var(--shadow);
}

.news-head { 
  background: #f0f9ff; 
  border: 1px solid #bae6fd; 
  border-radius: var(--radius); 
  padding: 20px; 
  margin-bottom: 12px;
}
.news-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--primary);
  line-height: 1.3;
}
.news-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 16px;
}

.action-grid { 
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; 
  margin: 8px 0; 
}
@media (max-width: 600px) {
  .action-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.action-grid a, .news-detail-wrapper a[target="_blank"] { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  text-align: center;
  gap: 8px; 
  padding: 12px 8px; 
  background-color: var(--surface); 
  color: var(--primary); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-sm); 
  font-size: 13px; 
  font-weight: 600; 
  transition: all 0.2s ease; 
  box-shadow: var(--shadow); 
  height: 100%;
}
.action-grid a:hover, .news-detail-wrapper a[target="_blank"]:hover { 
  background-color: #f0f9ff; 
  transform: translateY(-2px); 
  border-color: #bae6fd; 
  color: var(--secondary);
}

/* Cho các link văn bản thông thường không bị pill */
.news-content p a {
  display: inline;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.news-content p a:hover {
  transform: none;
}
