/* ================= HERO ================= */
.smartsy-hero {
  min-height: 55vh;
  display: flex;
  align-items: center;
  background: url("../images/banner/banner_events.jpg")
    no-repeat right center / cover;
}

.hero-inner {
  max-width: 560px;
  margin-left: 80px;
}

.hero-pill {
  background: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .8rem;
  display: inline-block;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-title span {
  background: linear-gradient(90deg,#ff4fae,#ffb000,#4fd2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text {
  margin-top: 14px;
  color: #555;
  max-width: 460px;
}

/* ================= LEARNING BACKGROUND ================= */
.learning-wrap {
  background: url("../images/game_bg.png") center / cover no-repeat;
  padding: 10px 16px 110px;
}

.learning-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
}

.learning-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 50px;
}

/* ================= GRID ================= */
.learning-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 30px;
}

/* ================= CARD ================= */
.game-card {
  background: rgba(255,255,255,.96);
  border-radius: 26px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 20px 50px rgba(0,0,0,.08);
  transition: transform .35s ease, box-shadow .35s ease;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 70px rgba(0,0,0,.12);
}

/* ================= THUMB ================= */
.game-thumb {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

.game-thumb img:first-child {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 18px;
}

/* ================= DARK HOVER OVERLAY ================= */
.game-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.18);
  opacity: 0;
  transition: opacity .3s ease;
    pointer-events: none;

}

.game-card:hover .game-thumb::after {
  opacity: 1;
}

/* ================= PLAY BUTTON ================= */
/* ================= PLAY BUTTON (ALWAYS VISIBLE) ================= */
.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 110px;
  opacity: 1;                /* ALWAYS visible */
  transform: scale(.95);
  z-index: 2;
  pointer-events: none;      /* DO NOT block clicks */
  animation:
    playPulseIdle 2.8s infinite ease-in-out,
    playFloatIdle 4s infinite ease-in-out;
  transition: transform .3s ease;
}

.game-card:hover .play-btn {
  transform: scale(1.1);
  animation:
    playPulseHover 1.6s infinite ease-in-out,
    playFloatHover 2.2s infinite ease-in-out;
}


/* ================= PLAY ANIMATIONS ================= */
@keyframes playPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(168,115,255,.6);
  }
  70% {
    box-shadow: 0 0 0 24px rgba(168,115,255,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168,115,255,0);
  }
}

@keyframes playFloat {
  0%   { transform: scale(1) translateY(0); }
  50%  { transform: scale(1.05) translateY(-8px); }
  100% { transform: scale(1) translateY(0); }
}

.game-card:active .play-btn {
  transform: scale(.92);
}

/* ================= TAG ================= */
.game-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: .7rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  z-index: 3;
}

.game-tag.green { background:#e9f8ef; color:#2fa36b; }
.game-tag.blue  { background:#eaf6ff; color:#2b87d3; }
.game-tag.yellow{ background:#fff5db; color:#d9a400; }

/* ================= INFO ================= */
.game-info {
  padding: 18px 8px 8px;
}

.game-info h3 {
  margin: 0 0 6px;
  font-weight: 700;
}

.game-info p {
  font-size: .95rem;
  color: #666;
  margin-bottom: 12px;
}

.game-meta {
  display: flex;
  gap: 14px;
  font-size: .8rem;
  color: #888;
}

/* ================= LIGHTBOX ================= */
.game-lb {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.game-lb.open { display:block; }

.game-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
}

.game-dialog {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(1200px,96vw);
  height: min(720px,90vh);
  background: #000;
  border-radius: 22px;
  overflow: hidden;
}

.game-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.game-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .hero-inner { margin: 0 24px; }
  .hero-title { font-size: 2.1rem; }
  .smartsy-hero { min-height: 48vh; }

  .play-btn {
    opacity: 1;
    transform: scale(.95);
    animation:
      playPulse 2s infinite ease-in-out,
      playFloat 3s infinite ease-in-out;
  }
}
