/* Google Fonts: Outfit & Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

/* CSS Variables for Premium Palette */
:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #111420;
  --bg-card: #151926;
  --border-color: #22293f;
  --border-hover: #3b476b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-highlight: #ffdd67; /* Yellowish accent */
  
  /* Badges color system */
  --color-leads: #0ea5e9;
  --color-leads-bg: rgba(14, 165, 233, 0.12);
  
  --color-bookings: #a855f7;
  --color-bookings-bg: rgba(168, 85, 247, 0.12);
  
  --color-quotes: #eab308;
  --color-quotes-bg: rgba(234, 179, 8, 0.12);
  
  --color-jobs: #10b981;
  --color-jobs-bg: rgba(16, 185, 129, 0.12);
  
  --color-beginner: #10b981;
  --color-intermediate: #f97316;
  --color-advanced: #ef4444;

  --transition-speed: 0.3s;
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Global resets & typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Header & Banner Styles */
.header-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-container {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Custom logo styling without box containers */
.zg-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.zg-logo-img {
  max-height: 100px;
  object-fit: contain;
}


.intro-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  margin-bottom: 40px;
  gap: 40px;
}

.intro-content {
  flex: 1;
}

.sop-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 221, 103, 0.08);
  border: 1px solid rgba(255, 221, 103, 0.2);
  color: var(--text-highlight);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.sop-badge svg {
  width: 12px;
  height: 12px;
}

.main-title {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 60%, var(--text-highlight) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.intro-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
}

/* Stats Box Widget */
.stats-container {
  display: flex;
  background: rgba(21, 25, 38, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 24px;
  backdrop-filter: blur(10px);
  gap: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border-color);
  padding-right: 24px;
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.stat-icon-wrapper svg {
  width: 20px;
  height: 20px;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 2px;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Filters & Search Toolbar */
.toolbar-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 24px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.filters-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--text-highlight);
  color: var(--bg-primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 221, 103, 0.25);
}

.search-container {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 16px 10px 42px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-speed) ease;
}

.search-input:focus {
  border-color: var(--text-highlight);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 15px rgba(255, 221, 103, 0.1);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Cards Grid Layout */
.main-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 60px 24px;
  flex: 1;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* Video Card Design */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Dynamic glow borders based on category or custom selectors */
.video-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
}

.video-card[data-category="leads"]::before { background: var(--color-leads); }
.video-card[data-category="bookings"]::before { background: var(--color-bookings); }
.video-card[data-category="quotes"]::before { background: var(--color-quotes); }
.video-card[data-category="jobs"]::before { background: var(--color-jobs); }

/* Card Header elements */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.badge-group {
  display: flex;
  gap: 8px;
}

.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

.badge-category.badge-leads {
  color: var(--color-leads);
  background: var(--color-leads-bg);
}

.badge-category.badge-bookings {
  color: var(--color-bookings);
  background: var(--color-bookings-bg);
}

.badge-category.badge-quotes {
  color: var(--color-quotes);
  background: var(--color-quotes-bg);
}

.badge-category.badge-jobs {
  color: var(--color-jobs);
  background: var(--color-jobs-bg);
}

.badge-level {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
  gap: 6px;
}

.level-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.level-indicator.level-beginner { background: var(--color-beginner); }
.level-indicator.level-intermediate { background: var(--color-intermediate); }
.level-indicator.level-advanced { background: var(--color-advanced); }

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all var(--transition-speed) ease;
}

.video-card:hover .card-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.card-icon svg {
  width: 16px;
  height: 16px;
}

/* Card Title */
.card-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.3;
}

/* Video Preview Block mimicking screenshot */
.video-preview-container {
  background: #0d0f17;
  border-radius: 12px;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.02);
  margin-bottom: 16px;
  transition: all var(--transition-speed) ease;
}

.video-card:hover .video-preview-container {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0f121d;
}

.play-btn-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--text-highlight);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 221, 103, 0.3);
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  margin-bottom: 12px;
}

.play-icon {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.video-preview-container:hover .play-btn-circle {
  transform: scale(1.15);
  box-shadow: 0 4px 30px rgba(255, 221, 103, 0.5);
}

/* Dynamic Waveform animations */
.waveform-animation {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 4px;
  align-items: center;
  height: 36px;
  opacity: 0.15;
  transition: opacity var(--transition-speed) ease;
}

.video-preview-container:hover .waveform-animation {
  opacity: 0.35;
}

.bar {
  width: 3px;
  background: var(--text-highlight);
  border-radius: 2px;
}

.bar-1 { height: 12px; animation: bounce 0.8s ease-in-out infinite alternate; }
.bar-2 { height: 28px; animation: bounce 1.1s ease-in-out infinite alternate; }
.bar-3 { height: 18px; animation: bounce 0.9s ease-in-out infinite alternate; }
.bar-4 { height: 32px; animation: bounce 1.3s ease-in-out infinite alternate; }
.bar-5 { height: 14px; animation: bounce 0.7s ease-in-out infinite alternate; }

@keyframes bounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.plays-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  z-index: 2;
}

/* Card Footer elements */
.card-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
  display: flex;
}

.duration-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.duration-icon {
  width: 14px;
  height: 14px;
}

/* No Results fallback card */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
}

.no-results-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Footer Section */
.footer-wrapper {
  border-top: 1px solid var(--border-color);
  background: #08090d;
  width: 100%;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-contact h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.footer-contact p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-contact a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.footer-contact a:hover {
  color: var(--text-highlight);
}

.footer-copyright {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-self: flex-end;
}

.footer-copyright svg {
  width: 14px;
  height: 14px;
  color: var(--text-highlight);
}

/* Video Lightbox Modal CSS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 8, 12, 0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 100%;
  max-width: 900px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  position: relative;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16 / 9;
}

.modal-video {
  width: 100%;
  height: 100%;
  display: block;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .intro-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  
  .stats-container {
    width: 100%;
  }
  
  .toolbar-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-container {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .header-wrapper {
    padding-top: 24px;
  }
  
  .logo-container {
    margin-bottom: 24px;
  }
  
  .main-title {
    font-size: 2.2rem;
  }
  
  .stats-container {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  
  .stat-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 16px;
  }
  
  .filters-tabs {
    flex-wrap: wrap;
  }
  
  .filter-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 12px;
  }
  
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-copyright {
    align-self: flex-start;
  }
}
