
.videos-seccion {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  padding: 62px 0 72px;
  overflow: hidden;
  background: #09120c;
  color: #ffffff;
}

.videos-seccion[hidden] {
  display: none !important;
}

.videos-seccion *,
.videos-seccion *::before,
.videos-seccion *::after {
  box-sizing: border-box;
}

.videos-seccion::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -180px;
  z-index: -1;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 166, 60, 0.15) 0%,
    rgba(0, 166, 60, 0) 70%
  );
  pointer-events: none;
}

.videos-seccion::after {
  content: "";
  position: absolute;
  bottom: -220px;
  left: -180px;
  z-index: -1;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(229, 27, 35, 0.09) 0%,
    rgba(229, 27, 35, 0) 70%
  );
  pointer-events: none;
}

.videos-seccion .contenedor {
  width: min(1200px, calc(100% - 32px));
  min-width: 0;
  margin-inline: auto;
}

.videos-encabezado {
  width: 100%;
  max-width: 740px;
  min-width: 0;
  margin: 0 auto 30px;
  text-align: center;
}

.videos-etiqueta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: 100%;
  color: #53e889;
  font-family: "DM Sans", sans-serif;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 1.4px;
}

.videos-etiqueta::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #00c94c;
  box-shadow: 0 0 0 5px rgba(0, 201, 76, 0.13);
}

.videos-encabezado h2 {
  max-width: 100%;
  margin: 14px 0 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.9rem, 8vw, 3.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.2px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.videos-encabezado h2 span {
  color: #24ce67;
}

.videos-encabezado p {
  max-width: 590px;
  margin: 16px auto 0;
  color: #b4c5b8;
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.videos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  width: 100%;
  min-width: 0;
  max-width: 440px;
  margin: 0 auto;
}

.video-tarjeta {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background: #122017;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.video-tarjeta[hidden] {
  display: none !important;
}

.video-marco {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 9 / 13;
  overflow: hidden;
  background: #080e0a;
}

.video-marco video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #080e0a;
}

.video-marco::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 25%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.36),
    transparent
  );
  pointer-events: none;
}

.video-etiqueta {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 28px);
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  background: rgba(5, 16, 8, 0.78);
  color: #e9fff0;
  font-size: 0.61rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.7px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.video-etiqueta::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #40ed7b;
}

.video-controles {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.video-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 45px;
  min-height: 45px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  outline: none;
  background: rgba(8, 17, 11, 0.83);
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.video-control:focus-visible {
  outline: 3px solid #f7c928;
  outline-offset: 3px;
}

.video-control[hidden] {
  display: none !important;
}

.video-control-sonido {
  margin-left: auto;
}

.video-control-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.video-informacion {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 21px 19px 23px;
}

.video-informacion > span {
  color: #54df82;
  font-family: "DM Sans", sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 1px;
}

.video-informacion h3 {
  margin: 9px 0 0;
  color: #ffffff;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.2rem, 5.5vw, 1.5rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.4px;
  overflow-wrap: anywhere;
}

.video-informacion p {
  margin: 11px 0 0;
  color: #b5c7b9;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.video-informacion-pie {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  color: #64e990;
  font-family: "DM Sans", sans-serif;
  font-size: 0.69rem;
  font-weight: 800;
}

.video-informacion-pie::before {
  content: "✦";
  color: #f7c928;
  font-size: 0.85rem;
}

.videos-grid:has(> .video-tarjeta:only-child) {
  max-width: 440px;
}

@media (min-width: 600px) {
  .videos-seccion {
    padding: 78px 0 88px;
  }

  .videos-seccion .contenedor {
    width: min(1200px, calc(100% - 48px));
  }

  .videos-encabezado {
    margin-bottom: 38px;
  }

  .videos-encabezado h2 {
    font-size: clamp(2.5rem, 5vw, 3.6rem);
  }

  .videos-encabezado p {
    font-size: 0.92rem;
  }

  .videos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 900px;
  }

  .videos-grid:has(> .video-tarjeta:only-child) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 420px;
  }

  .video-marco {
    aspect-ratio: 9 / 12;
  }

  .video-informacion {
    padding: 22px;
  }
}

@media (min-width: 1000px) {
  .videos-seccion {
    padding: 95px 0 105px;
  }

  .videos-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    max-width: 1200px;
  }

  .videos-grid:has(> .video-tarjeta:only-child) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 350px;
  }

  .videos-grid:has(> .video-tarjeta:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
  }

  .videos-grid:has(> .video-tarjeta:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1050px;
  }

  .video-marco {
    aspect-ratio: 9 / 13;
  }

  .video-informacion h3 {
    font-size: 1.4rem;
  }
}

@media (max-width: 359px) {
  .videos-seccion {
    padding: 48px 0 58px;
  }

  .videos-seccion .contenedor {
    width: calc(100% - 24px);
  }

  .videos-encabezado {
    margin-bottom: 24px;
  }

  .videos-encabezado h2 {
    font-size: 1.8rem;
  }

  .videos-encabezado p {
    font-size: 0.8rem;
  }

  .video-tarjeta {
    border-radius: 15px;
  }

  .video-informacion {
    padding: 18px 16px;
  }

  .video-informacion h3 {
    font-size: 1.2rem;
  }

  .video-control {
    min-width: 42px;
    min-height: 42px;
    padding: 9px 11px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .video-tarjeta:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 166, 60, 0.5);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  }

  .video-control:hover {
    border-color: rgba(83, 232, 137, 0.65);
    background: rgba(0, 110, 40, 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-tarjeta,
  .video-control {
    transition: none;
  }
}
