/* =================================================
OS HERO
Slider + Grid
No infinite slider
Desktop slider: 2 cards per view
No gap between slides
================================================= */

/* Base */
.oshero {
  width: 100%;
}

.oshero,
.oshero * {
  box-sizing: border-box;
}

/* ========================================
   SWIPER
======================================== */
.oshero-swiper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.oshero-swiper .swiper-wrapper {
  align-items: stretch;
}

.oshero-swiper .swiper-slide {
  height: auto;
}

.oshero-swiper .swiper-slide > * {
  height: 100%;
}

/* Refuerzo visual por si Swiper deja algún estilo */
.oshero--slider .swiper-slide {
  margin-right: 0 !important;
}

/* ========================================
   CARD
======================================== */
.oshero-card {
  position: relative;
  height: 100%;
  min-height: 260px;
}

.oshero-card--slider {
  min-height: 570px;
}

.oshero-card--xl {
  min-height: 540px;
}

.oshero-card--sm {
  min-height: 260px;
}

.oshero-card__shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #121212;
}

.oshero-card__mainlink {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  z-index: 1;
}

.oshero-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 450ms ease;
}

.oshero-card__shell:hover .oshero-card__bg {
  transform: scale(1.04);
}

.oshero-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.58) 35%,
      rgba(0, 0, 0, 0.18) 68%,
      rgba(0, 0, 0, 0.02) 100%
    );
}

.oshero-card__content {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 2;
}

.oshero-card__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.oshero-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 3;
}

/* ========================================
   BADGES
======================================== */
.oshero-badge {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  text-decoration: none;
  border-radius: 5px;
  line-height: 1.2;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.oshero-badge--cat {
  background: #0082bb;
  color: #ffffff;
}

.oshero-badge--sub {
  background: #42d7db;
  color: #232754;
}

/* ========================================
   TITLE / META
======================================== */
.oshero-title {
  margin: 0;
  line-height: 1.12;
  font-weight: 700;
  position: relative;
  z-index: 3;
  max-width: 100%;
}

.oshero-title__link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.oshero-title__link:hover {
  text-decoration: underline;
}

.oshero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.3;
  position: relative;
  z-index: 3;
  color: rgba(240, 240, 240, 0.9);
}

.oshero-author,
.oshero-date,
.oshero-dot {
  color: rgba(240, 240, 240, 0.9);
}

/* ========================================
   NAV
======================================== */
.oshero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;

  width: 64px;
  height: 64px;

  border: none;
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.34);
  color: #ffffff;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  line-height: 1;

  transition: transform 0.25s ease, background 0.25s ease, opacity 0.25s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.oshero-nav:hover {
  background: rgba(0, 0, 0, 0.90);
  transform: translateY(-50%) scale(1.06);
}

.oshero-nav__icon {
  display: inline-block;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-2px);
  pointer-events: none;
}

.oshero-prev {
  left: 16px;
}

.oshero-next {
  right: 16px;
}

.oshero-nav.swiper-button-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ========================================
   GRID LAYOUT
======================================== */
.oshero-grid--5 {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-areas:
    "hero a b"
    "hero c d";
  gap: 18px;
  align-items: stretch;
}

.oshero-grid__hero { grid-area: hero; }
.oshero-grid__a { grid-area: a; }
.oshero-grid__b { grid-area: b; }
.oshero-grid__c { grid-area: c; }
.oshero-grid__d { grid-area: d; }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 899px) {
  .oshero-card--slider {
    min-height: 380px;
  }

  .oshero-card--xl {
    min-height: 400px;
  }

  .oshero-grid--5 {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "a"
      "b"
      "c"
      "d";
  }

  .oshero-card__content {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .oshero-card__stack {
    gap: 8px;
  }

  .oshero-nav {
    width: 56px;
    height: 56px;
  }

  .oshero-nav__icon {
    font-size: 36px;
  }

  .oshero-prev {
    left: 10px;
  }

  .oshero-next {
    right: 10px;
  }
}