/* ===== NEWS SECTION MODERN DESIGN FOR INDEX.PHP ===== */

/* News Cards Modern Design */
.news-card-modern {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #f0f0f0;
}

.news-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00a8cc, #00d4ff);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.news-card-modern:hover::before {
  transform: scaleX(1);
}

.news-card-modern:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 168, 204, 0.15);
  border-color: #e0f7fa;
}

.news-card-modern .card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

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

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

.news-card-modern .card-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-card-modern:hover .card-img-overlay {
  opacity: 1;
}

.news-card-modern .card-body {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-modern .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.news-card-modern .badge-category {
  background: linear-gradient(135deg, #00a8cc 0%, #0090b0 100%);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.news-card-modern .badge-category:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 168, 204, 0.3);
}

/* Category Colors */
.badge-category.cat-education { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; 
}
.badge-category.cat-event { 
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important; 
}
.badge-category.cat-announcement { 
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important; 
}
.badge-category.cat-research { 
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important; 
}

.news-card-modern .card-date {
  color: #8b95a7;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-card-modern .card-date i {
  color: #00a8cc;
}

.news-card-modern .card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.4;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-modern:hover .card-title {
  color: #00a8cc;
}

.news-card-modern .card-text {
  color: #6c757d;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-modern .card-footer {
  padding: 20px 25px;
  background: transparent;
  border-top: 1px solid #f0f0f0;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-read-more {
  background: transparent;
  color: #00a8cc;
  border: 2px solid #00a8cc;
  border-radius: 25px;
  padding: 8px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-read-more::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #00a8cc;
  transition: left 0.3s ease;
  z-index: -1;
}

.btn-read-more:hover::before {
  left: 0;
}

.btn-read-more:hover {
  color: #fff;
  transform: translateX(5px);
}

.btn-read-more i {
  transition: transform 0.3s ease;
}

.btn-read-more:hover i {
  transform: translateX(5px);
}

/* Share Buttons Mini */
.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #6c757d;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.share-btn-mini:hover {
  transform: translateY(-3px);
  color: #fff;
}

.share-btn-mini[href*="facebook"]:hover {
  background: #1877f2;
}

.share-btn-mini[href*="twitter"]:hover {
  background: #1da1f2;
}

.share-btn-mini[href*="whatsapp"]:hover {
  background: #25d366;
}

/* Loading Animation */
@keyframes newsCardLoad {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card-modern {
  animation: newsCardLoad 0.6s ease forwards;
  opacity: 0;
}

.news-card-modern:nth-child(1) { animation-delay: 0.1s; }
.news-card-modern:nth-child(2) { animation-delay: 0.2s; }
.news-card-modern:nth-child(3) { animation-delay: 0.3s; }

/* Responsive Design for News Cards */
@media (max-width: 768px) {
  .news-card-modern .card-img-wrapper {
    height: 180px;
  }
  
  .news-card-modern .card-footer {
    flex-direction: column;
    gap: 15px;
  }
  
  .share-buttons {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .news-card-modern .card-img-wrapper {
    height: 200px;
  }
}

/* Smooth Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Styles for Accessibility */
.btn-read-more:focus {
  outline: 3px solid rgba(0, 168, 204, 0.3);
  outline-offset: 2px;
}

/* Card Shadow Variations */
.news-card-modern.featured {
  box-shadow: 0 15px 40px rgba(0, 168, 204, 0.12);
}

.news-card-modern.featured::before {
  height: 6px;
  background: linear-gradient(90deg, #f39c12, #e74c3c);
}