.hp-stories {
  padding: 48px 0 40px;
  background: #eef6fe;
}
.hp-stories-wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
}
.hp-stories-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
}
.hp-stories-head h2 {
  margin: 0 0 8px;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0b1f3a;
  line-height: 1.2;
}
.hp-stories-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
}

.hp-stories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hp-story-card {
  position: relative;
  aspect-ratio: 3 / 4.35;
  min-height: 430px;
  border-radius: 22px;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: #fff;
  background: #0b1f3a;
  isolation: isolate;
  display: block;
  width: 100%;
  box-shadow: 0 10px 30px rgba(7, 17, 31, 0.08);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.hp-story-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 28px 56px rgba(7, 17, 31, 0.18);
}
.hp-story-card:focus-visible {
  outline: 3px solid #0a66c2;
  outline-offset: 3px;
}

.hp-story-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}
.hp-story-card:hover .hp-story-bg {
  transform: scale(1.08);
}
.hp-story-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 17, 31, 0.12) 0%, rgba(7, 17, 31, 0.08) 28%, rgba(7, 17, 31, 0.55) 62%, rgba(7, 17, 31, 0.92) 100%);
  transition: background 0.35s ease;
}
.hp-story-card:hover::after {
  background:
    linear-gradient(180deg, rgba(7, 17, 31, 0.18) 0%, rgba(7, 17, 31, 0.14) 28%, rgba(7, 17, 31, 0.62) 62%, rgba(7, 17, 31, 0.95) 100%);
}

.hp-story-body {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: inherit;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hp-story-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  border-radius: 999px;
  padding: 7px 12px;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}
.hp-story-tag i {
  color: #0a66c2;
  font-size: 12px;
}

.hp-story-foot h3 {
  margin: 0 0 8px;
  font-size: clamp(20px, 1.55vw, 26px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.hp-story-foot p {
  margin: 0 0 18px;
  max-width: 100%;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-story-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.hp-story-btn i {
  transition: transform 0.25s ease;
}
.hp-story-card:hover .hp-story-btn {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}
.hp-story-card:hover .hp-story-btn i {
  transform: translateX(3px);
}

.hp-story-play {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #0a66c2;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.hp-story-play i {
  margin-left: 2px;
}
.hp-story-card:hover .hp-story-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal */
.hp-yt-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hp-yt-modal.is-open {
  display: flex;
}
.hp-yt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.76);
  backdrop-filter: blur(6px);
}
.hp-yt-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  background: #0b1220;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.5);
}
.hp-yt-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hp-yt-close:hover {
  background: rgba(255, 255, 255, 0.24);
}
.hp-yt-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}
.hp-yt-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.hp-yt-caption {
  padding: 16px 20px 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.6;
  max-height: 160px;
  overflow-y: auto;
}
.hp-yt-caption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  color: #fff;
}
#hpYtModalDesc {
  margin-top: 2px;
  opacity: 0.92;
}

@media (max-width: 1280px) {
  .hp-stories-wrap {
    max-width: 1240px;
  }
  .hp-story-card {
    min-height: 400px;
  }
}
@media (max-width: 1100px) {
  .hp-stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .hp-story-card {
    aspect-ratio: 3 / 4;
    min-height: 360px;
  }
}
@media (max-width: 640px) {
  .hp-stories {
    padding: 48px 0 28px;
  }
  .hp-stories-wrap {
    padding: 0 16px;
  }
  .hp-stories-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hp-story-card {
    aspect-ratio: 16 / 11;
    min-height: 250px;
  }
  .hp-story-body {
    padding: 18px;
  }
  .hp-story-play {
    opacity: 1;
    width: 52px;
    height: 52px;
  }
}
