﻿#tutoriales-popular {
  padding: 0 20px; /* Margen lateral en móviles */
  max-width: 1200px;
  margin: 0 auto;
}

.tutoriales-popular h3 {
  color: #000000da;
  text-transform: none;
  padding-bottom: 32px;
  font-size: 1.5em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px;
  width: 100%;
}

.cards .wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* --- Card (Contenedor de Imagen/Video) --- */
.app-tutorial-card {
  position: relative;
  width: 100%; /* Ocupa el ancho del grid */
  aspect-ratio: 16 / 9; /* Mantiene proporción de video */
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;  
  background-size: cover;
  background-position: center;
}
.app-tutorial-card::before,
.play-icon-central {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px); 
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s;
}
.app-tutorial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-color: rgba(49, 49, 49, 0.7); */
  background-color: #04287ac7;
  z-index: 1;
}
.play-icon-central {
  position: relative;
  z-index: 2;
}
.wrapper:hover .app-tutorial-card::before,
.wrapper:hover .play-icon-central {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.app-tutorial-card > .info-categoria-video > p {
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  background-color: #ec9a2f;
  color: aliceblue;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 0;
}

.play-icon-central {
  color: #FFF;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  opacity: 0.9;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* --- Hovers --- */
.app-tutorial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.wrapper:hover .play-icon-central {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1); /* Efecto sutil de escala */
}

/* --- Textos Debajo de la Card --- */
.tutorial-title {
  padding: 12px 0 4px 0;
  color: #012169;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  width: 100%;
  word-wrap: break-word; /* Hace el texto wrappeable */
  overflow-wrap: break-word;
}

.cards .wrapper a {
  padding-top: 4px;
  color: #ed8b00;
  font-size: 1.3em;
  font-weight: bold;
  text-decoration: none;
  transition: 0.1s ease-in-out;
}

.cards .wrapper a:hover {
  color: #e29838;
  transform: translateY(-2px);
}

/* --- Responsive Design --- */

/* Tablets */
@media (max-width: 992px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}
/* Móviles */
@media (max-width: 767px) {
  #tutoriales-popular {
    padding: 0 16px;
  }
  .cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .cards .wrapper {
    width: 100%;
    max-width: 400px;
    align-items: center;
    text-align: center;
  }
  .app-tutorial-card {
    width: 100%;
  }
  .play-icon-central {
    font-size: 3.5rem;
  }
}