/* Music & News Page Styles */

/* News Ticker */
.news-ticker-container {
  margin-top: 75px; /* Offset for fixed header */
  background: var(--dark);
  color: var(--light);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  position: relative;
  z-index: 10;
  border-bottom: 3px solid var(--accent-3);
}

.ticker-label {
  background: var(--accent-3);
  color: var(--dark);
  font-weight: 800;
  padding: 12px 25px;
  position: relative;
  z-index: 2;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.ticker-wrapper {
  display: flex;
  width: 200%;
  animation: ticker 30s linear infinite;
}

.ticker-content-inner {
  display: flex;
  width: 50%;
  justify-content: space-around;
}

.ticker-item {
  padding: 0 30px;
  white-space: nowrap;
  position: relative;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.ticker-item::after {
  content: '⚡';
  position: absolute;
  right: -5px;
  color: var(--accent-3);
}

.ticker-content-inner .ticker-item:last-child::after {
  content: '⚡'; /* Keep it consistent for seamless loop */
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-wrapper:hover {
  animation-play-state: paused;
}

/* Page Layout */
.music-news-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  margin-bottom: 80px;
}

@media (max-width: 992px) {
  .music-news-layout {
    grid-template-columns: 1fr;
  }
}

/* News Section */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.news-card {
  background: var(--light);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.news-img {
  height: 200px;
  position: relative;
  overflow: hidden;
}

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

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

.news-category {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  color: white;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  background: var(--primary); 
}

.cat-ebs-reportase { background: #e74c3c; }
.cat-student-center { background: #3498db; }
.cat-ebs-news { background: #2ecc71; }
.cat-music-box { background: var(--secondary); }
.cat-music-chart { background: var(--accent-3); color: var(--dark); }

@media (max-width: 768px) {
  .news-filter-form {
    flex-direction: column;
  }
  .news-filter-form > * {
    width: 100%;
  }
}

.news-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.news-title {
  font-size: 18px;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.4;
  transition: var(--transition);
}

.news-card:hover .news-title {
  color: var(--primary);
}

.news-excerpt {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
  flex: 1;
}

.read-more {
  display: inline-block;
  font-weight: 800;
  color: var(--secondary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--primary);
  transform: translateX(5px);
}

/* Sidebar Elements */
.sidebar-section {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

.sidebar-title {
  background: var(--gradient-fun);
  color: var(--dark);
  padding: 20px 25px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.sidebar-content {
  padding: 0;
}

.compact-chart-list {
  max-height: 400px;
  overflow-y: auto;
}

.compact-chart-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.2s;
}

.compact-chart-item:hover {
  background: rgba(119, 88, 163, 0.05);
}

.compact-chart-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  margin-right: 15px;
  flex-shrink: 0;
}

.compact-chart-info {
  flex: 1;
  min-width: 0;
}

.compact-chart-info strong {
  display: block;
  font-size: 14px;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-chart-info span {
  display: block;
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Spotify Playlist Promo */
.playlist-promo {
  background: #191414;
  color: white;
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.playlist-promo::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: #1DB954;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(25px);
}

.playlist-icon {
  width: 70px;
  height: 70px;
  background: #1DB954;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
  box-shadow: 0 5px 15px rgba(29, 185, 84, 0.4);
}

.playlist-promo p {
  position: relative;
  z-index: 2;
  font-size: 14px;
  color: #ccc;
  margin-bottom: 25px;
}

.btn-spotify {
  display: inline-block;
  background: #1DB954;
  color: white;
  font-weight: bold;
  padding: 10px 25px;
  border-radius: 25px;
  position: relative;
  z-index: 2;
  transition: transform 0.2s, background 0.2s;
}

.btn-spotify:hover {
  background: #1ed760;
  transform: scale(1.05);
}

/* =========================================
   NEWS LIST VIEW (Page 2+ / Spotcast Style)
========================================= */
.news-list-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-list-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: var(--transition);
}

.news-list-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--box-shadow-hover);
}

.news-list-cover {
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.news-list-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-list-details {
  flex: 1;
  min-width: 0;
}

.news-list-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
  font-weight: 600;
}

.news-list-cat {
  background: var(--primary);
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.news-list-title {
  font-size: 17px;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list-action {
  flex-shrink: 0;
}

.btn-read-news {
  display: inline-block;
  background: var(--gradient-main);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.btn-read-news:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(119, 88, 163, 0.4);
}

/* =========================================
   PAGINATION
========================================= */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  color: var(--light);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.2);
}

.page-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.page-btn-active {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(119, 88, 163, 0.4);
}

/* Mobile adjustments for compact news cards */
@media (max-width: 768px) {
  .news-grid {
    gap: 15px;
  }
  .news-card:not(:first-child) {
    flex-direction: row;
    align-items: center;
    padding: 15px;
  }
  .news-card:not(:first-child) .news-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 10px;
  }
  .news-card:not(:first-child) .news-category {
    font-size: 10px;
    padding: 3px 8px;
    top: 5px;
    left: 5px;
  }
  .news-card:not(:first-child) .news-content {
    padding: 0 0 0 15px;
  }
  .news-card:not(:first-child) .news-title {
    font-size: 15px;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news-card:not(:first-child) .news-date {
    font-size: 11px;
    margin-bottom: 5px;
  }
  .news-card:not(:first-child) .news-excerpt {
    display: none;
  }
  .news-card:not(:first-child) .read-more {
    font-size: 12px;
  }

  /* List view mobile */
  .news-list-item {
    flex-direction: row;
    padding: 15px;
    gap: 12px;
  }
  .news-list-cover {
    width: 80px;
    height: 65px;
  }
  .news-list-title {
    font-size: 14px;
  }
  .news-list-excerpt {
    display: none;
  }
  .news-list-action {
    display: none;
  }
}

