/* ====================================
   Tutoriales Page Styles
   ==================================== */

/* Tutorials Hero Section */
.tutorials-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8B1538 0%, #4A0E1F 100%);
  padding-top: 120px;
  padding-bottom: var(--space-12);
  overflow: hidden;
}

.tutorials-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0L60 30L30 60L0 30Z" fill="rgba(255,255,255,0.02)"/></svg>');
  opacity: 0.3;
}

.tutorials-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  max-width: 800px;
  margin: 0 auto;
}

.tutorials-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  letter-spacing: -0.03em;
}

.tutorials-hero-title-line {
  display: block;
}

.tutorials-hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin: 0 auto;
}

/* Tutorials Section */
.tutorials-section {
  padding: var(--space-16) 0;
  background: var(--color-neutral-50);
}

/* Tutorials Grid */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

@media (max-width: 1100px) {
  .tutorials-grid {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Tutorial Card */
.tutorial-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-slow);
  border: 1px solid var(--color-neutral-200);
  display: flex;
  flex-direction: column;
}

.tutorial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
}

/* Video Wrapper */
.tutorial-video-wrapper {
  position: relative;
  background: var(--color-neutral-900);
  aspect-ratio: 16/9;
  overflow: hidden;
}

.tutorial-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tutorial-duration {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.tutorial-duration svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Tutorial Content */
.tutorial-content {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tutorial-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tutorial-category svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.tutorial-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-neutral-900);
  line-height: 1.3;
  margin: 0;
}

.tutorial-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-neutral-600);
  flex: 1;
}

.tutorial-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-2);
}

.topic-tag {
  display: inline-block;
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--color-neutral-200);
  transition: all var(--transition-base);
}

.topic-tag:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* CTA Section */
.tutorials-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  text-align: center;
  color: white;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.tutorials-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="25" fill="rgba(255,255,255,0.03)"/></svg>');
  opacity: 0.5;
}

.tutorials-cta-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
  margin: 0 auto;
}

.tutorials-cta-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: white;
}

.tutorials-cta-description {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: var(--space-6);
  color: rgba(255, 255, 255, 0.95);
}

.tutorials-cta-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.tutorials-cta-actions .btn-primary {
  background: white;
  color: var(--color-primary);
  border-color: white;
}

.tutorials-cta-actions .btn-primary:hover {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-100);
  transform: translateY(-2px);
}

.tutorials-cta-actions .btn-secondary {
  background: transparent;
  color: white;
  border-color: white;
}

.tutorials-cta-actions .btn-secondary:hover {
  background: white;
  color: var(--color-primary);
  border-color: white;
}

/* Active nav link styling */
.nav-link.active {
  color: var(--color-primary);
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tutorials-hero {
    min-height: 40vh;
    padding-top: 100px;
    padding-bottom: var(--space-8);
  }
  
  .tutorials-section {
    padding: var(--space-12) 0;
  }
  
  .tutorials-grid {
    gap: var(--space-6);
    margin-bottom: var(--space-12);
  }
  
  .tutorial-content {
    padding: var(--space-5);
  }
  
  .tutorial-title {
    font-size: 1.5rem;
  }
  
  .tutorials-cta {
    padding: var(--space-8) var(--space-4);
  }
  
  .tutorials-cta-actions {
    flex-direction: column;
  }
  
  .tutorials-cta-actions .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .tutorials-grid {
    grid-template-columns: 1fr;
  }
  
  .tutorial-video-wrapper {
    aspect-ratio: 16/10;
  }
  
  .tutorial-topics {
    gap: 0.375rem;
  }
  
  .topic-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }
}

/* Video controls enhancement */
.tutorial-video::-webkit-media-controls-panel {
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.tutorial-video::-webkit-media-controls-play-button,
.tutorial-video::-webkit-media-controls-mute-button {
  background-color: var(--color-primary);
  border-radius: 50%;
}

/* Loading state for videos */
.tutorial-video:not([poster]) {
  background: linear-gradient(
    135deg,
    var(--color-neutral-800) 0%,
    var(--color-neutral-900) 100%
  );
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .tutorial-card {
    transition: none;
  }
  
  .tutorial-card:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  .tutorials-hero,
  .tutorials-cta,
  .whatsapp-float {
    display: none;
  }
  
  .tutorial-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--color-neutral-300);
  }
  
  .tutorial-video-wrapper {
    display: none;
  }
}