/* videos.css - Modern Layout Enhancement */
:root {
  --primary-blue: #0d47a1;
  --accent-blue: #4f8ef7;
  --soft-blue: #8ec5ff;
  --navy: #0b2447;
  --yellow: #f6a700;
  --yellow-hover: #d49500;
  --success: #00b6b3;
  --white: #ffffff;
  --light-gray: #f9f9f9;
  --light-bg: #f0f5ff;
  --text-dark: #1a1a1a;
  --text-muted: #555555;
  --border: rgba(13, 71, 161, 0.1);
  
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 35px rgba(0, 0, 0, 0.12);
  --shadow-deep: 0 20px 50px rgba(0, 0, 0, 0.15);
  --transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f8faff 0%, #f0f5ff 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(79, 142, 247, 0.2);
  color: var(--primary-blue);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, 
    var(--navy) 0%, 
    var(--primary-blue) 45%, 
    var(--accent-blue) 100%);
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
  margin-bottom: 60px;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(246, 167, 0, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: white;
  margin-bottom: 16px;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* Filter Bar */
.filter-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 20px 30px;
  margin: 0 auto;
  max-width: 1000px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50px;
  color: var(--text-dark);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow);
}

.filter-btn.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--yellow);
  color: #000;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: all var(--transition);
  box-shadow: 0 6px 20px rgba(246, 167, 0, 0.3);
}

.back-home:hover {
  transform: translateY(-3px) scale(1.05);
  background: var(--yellow-hover);
  box-shadow: 0 10px 25px rgba(246, 167, 0, 0.4);
}

/* Content Layout */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.videos-container {
  display: flex;
  gap: 40px;
}

/* Sidebar */
.sidebar {
  flex: 0 0 280px;
}

.filter-panel,
.stats-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.filter-panel {
  position: sticky;
  top: 100px;
}

.filter-panel h3,
.stats-panel h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--accent-blue);
}

.stat-item {
  text-align: center;
  padding: 16px 0;
}

.stat-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-blue);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1rem;
}

/* Main Content */
.videos-main {
  flex: 1;
  min-width: 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--navy);
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.all-videos-section {
  margin-bottom: 60px;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* Video Card */
.video-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  border: 1px solid var(--border);
}

.video-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--success));
  z-index: 1;
}

.video-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-blue);
}

.video-card:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Card Header */
.card-header {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.video-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--light-gray);
}

.video-img-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(0, 0, 0, 0.1) 50%, 
    rgba(0, 0, 0, 0.3) 100%);
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.video-card:hover .video-thumbnail {
  transform: scale(1.08);
}

/* Play Overlay */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.play-overlay i {
  color: var(--white);
  font-size: 24px;
  margin-left: 4px;
}

/* Badge */
.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.badge.video-badge {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
}

/* Card Body */
.card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.video-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-blue);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.video-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.video-title a:hover {
  color: var(--primary-blue);
}

.video-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.video-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.video-platform i {
  color: #ff0000;
}

/* Card Footer */
.card-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--accent-blue), var(--soft-blue));
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.watch-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 142, 247, 0.4);
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
}

.watch-btn::after {
  content: "→";
  font-weight: bold;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.watch-btn:hover::after {
  transform: translateX(4px);
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--navy), var(--primary-blue));
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  margin: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: radial-gradient(circle at center, 
    rgba(255, 255, 255, 0.1) 0%, 
    transparent 50%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: 2rem;
  color: white;
  margin-bottom: 16px;
  font-weight: 800;
}

.cta-text {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent-blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 100;
  box-shadow: var(--shadow-deep);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-blue);
  transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-card {
  animation: fadeInUp 0.6s ease forwards;
}

.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.2s; }
.video-card:nth-child(3) { animation-delay: 0.3s; }
.video-card:nth-child(4) { animation-delay: 0.4s; }
.video-card:nth-child(5) { animation-delay: 0.5s; }
.video-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 1024px) {
  .videos-container {
    flex-direction: column;
  }
  
  .sidebar {
    flex: none;
    width: 100%;
    margin-bottom: 40px;
  }
  
  .filter-panel {
    position: static;
  }
  
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 20px 40px;
    margin-bottom: 40px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .filter-bar {
    padding: 16px 20px;
  }
  
  .nav-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .back-home {
    align-self: center;
  }
  
  .content-section {
    padding: 0 16px 60px;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .card-header {
    height: 180px;
  }
  
  .card-body {
    padding: 20px;
  }
  
  .video-title {
    font-size: 18px;
  }
  
  .cta-banner {
    padding: 40px 24px;
    margin: 40px 0;
  }
  
  .cta-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.75rem;
  }
  
  .badge {
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .filter-group {
    justify-content: center;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .watch-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}