/* ==========================================================================
   dil.route Öğrenci Dinleme Alanı Hub Page
   Gateway page for selecting book levels (B1, A2, etc.)
   ========================================================================== */

/* Hero Banner */
.hub-hero {
  position: relative;
  padding: 5.5rem 0 4rem;
  background: linear-gradient(135deg, #0f283d 0%, #1e3a5f 40%, #0d4a6b 70%, #0284c7 100%);
  overflow: hidden;
  text-align: center;
}

.hub-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 70%, rgba(2, 132, 199, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hub-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg-body), transparent);
  pointer-events: none;
}

/* Floating decorative dots */
.hub-hero-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.hub-hero-decor .dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  animation: floatDot 12s ease-in-out infinite;
}

.hub-hero-decor .dot:nth-child(1) { width: 180px; height: 180px; top: 10%; left: 5%; animation-delay: 0s; }
.hub-hero-decor .dot:nth-child(2) { width: 120px; height: 120px; top: 60%; left: 85%; animation-delay: -3s; }
.hub-hero-decor .dot:nth-child(3) { width: 80px; height: 80px; top: 30%; left: 75%; animation-delay: -6s; }
.hub-hero-decor .dot:nth-child(4) { width: 200px; height: 200px; top: 55%; left: 15%; animation-delay: -9s; }

@keyframes floatDot {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
  50% { transform: translateY(-20px) scale(1.05); opacity: 0.8; }
}

.hub-hero .container {
  position: relative;
  z-index: 2;
}

.hub-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #bae6fd;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 1.25rem;
}

.hub-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin-bottom: 1rem;
}

.hub-hero-title .accent {
  background: linear-gradient(135deg, #38bdf8, #67e8f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-hero-desc {
  font-size: 1.1rem;
  color: #94a3b8;
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 1.5rem;
}

.hub-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  margin-top: 1rem;
}

.hub-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hub-stat-value {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.hub-stat-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Book Level Cards Section */
.hub-levels-section {
  padding: 4rem 0 5rem;
  background: var(--bg-body);
}

.hub-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.hub-section-header .section-tag {
  margin: 0 auto 0.75rem;
}

/* Levels Grid */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Individual Level Card */
.level-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.level-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: var(--border-medium);
}

/* Card Top Banner Stripe */
.level-card-banner {
  position: relative;
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(135deg, var(--card-gradient-start, #0f283d), var(--card-gradient-end, #1e3a5f));
  color: #ffffff;
  overflow: hidden;
}

.level-card-banner::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.level-card-banner .level-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.65rem;
}

.level-card-banner h3 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.level-card-banner .level-subtitle {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* Card Body */
.level-card-body {
  padding: 1.75rem 2rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.level-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Feature mini-list inside card */
.level-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  flex: 1;
}

.level-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.level-features li .check-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: var(--bg-accent-soft);
  color: var(--brand-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 1px;
}

/* Card Footer with CTA */
.level-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.level-card-footer .level-meta {
  display: flex;
  flex-direction: column;
}

.level-meta-value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.level-meta-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.level-card-footer .btn-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-navy);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.72rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.level-card-footer .btn-enter:hover {
  background: var(--brand-navy-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.level-card-footer .btn-enter svg {
  transition: transform 0.25s ease;
}

.level-card:hover .btn-enter svg {
  transform: translateX(3px);
}

/* "Coming Soon" variation */
.level-card.coming-soon {
  opacity: 0.65;
  pointer-events: none;
}

.level-card.coming-soon .level-card-banner {
  filter: grayscale(0.3);
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: 100%;
  justify-content: center;
}

/* Mini wave animation inside cards */
.card-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 2;
}

.card-wave span {
  width: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  animation: cardWavePulse 1.4s ease-in-out infinite alternate;
}

.card-wave span:nth-child(1) { height: 30%; animation-delay: 0.1s; }
.card-wave span:nth-child(2) { height: 60%; animation-delay: 0.25s; }
.card-wave span:nth-child(3) { height: 100%; animation-delay: 0.4s; }
.card-wave span:nth-child(4) { height: 45%; animation-delay: 0.15s; }
.card-wave span:nth-child(5) { height: 75%; animation-delay: 0.35s; }

@keyframes cardWavePulse {
  0% { transform: scaleY(0.35); opacity: 0.4; }
  100% { transform: scaleY(1); opacity: 0.9; }
}

/* How it works mini section */
.hub-howto-section {
  padding: 4rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
}

.howto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.howto-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.howto-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--bg-accent-soft);
  color: var(--brand-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.25rem;
  transition: all 0.3s ease;
}

.howto-card:hover .howto-icon {
  background: var(--brand-navy);
  color: #ffffff;
  transform: scale(1.05);
}

.howto-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
}

.howto-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Step connector arrows (desktop only) */
.howto-grid .howto-card:not(:last-child) {
  position: relative;
}

.howto-grid .howto-card:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--border-medium);
  font-weight: 700;
}

/* Entrance Animations */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.level-card {
  animation: fadeSlideUp 0.6s ease forwards;
}

.level-card:nth-child(1) { animation-delay: 0.1s; }
.level-card:nth-child(2) { animation-delay: 0.25s; }
.level-card:nth-child(3) { animation-delay: 0.4s; }
.level-card:nth-child(4) { animation-delay: 0.55s; }

/* Responsive Improvements */
@media (max-width: 1024px) {
  .hub-hero {
    padding: 4rem 0 3rem;
  }

  .hub-hero-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
  }

  .levels-grid {
    grid-template-columns: 1fr 1fr;
  }

  .howto-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hub-hero {
    padding: 2.75rem 0 2rem;
  }

  .hub-hero-tag {
    font-size: 0.72rem;
    padding: 0.3rem 0.8rem;
    margin-bottom: 1rem;
  }

  .hub-hero-title {
    font-size: clamp(1.75rem, 5.5vw, 2.3rem);
    line-height: 1.2;
    margin-bottom: 0.85rem;
  }

  .hub-hero-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
  }

  .hub-levels-section {
    padding: 2.5rem 0 3.5rem;
  }

  .hub-section-header {
    margin-bottom: 2rem;
  }

  .levels-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
    gap: 1.5rem;
  }

  .level-card-banner {
    padding: 1.5rem 1.25rem 1.2rem;
  }

  .level-card-banner .level-icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
  }

  .level-card-banner h3 {
    font-size: 1.4rem;
  }

  .level-card-body {
    padding: 1.25rem;
  }

  .level-features-list {
    gap: 0.65rem;
  }

  .feature-item-text {
    font-size: 0.88rem;
  }

  .level-card-footer {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
  }

  .hub-howto-section {
    padding: 2.5rem 0;
  }

  .howto-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.75rem;
  }

  .howto-card {
    padding: 1.25rem 1rem;
  }

  .howto-grid .howto-card:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .hub-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 0.85rem 0.5rem;
    width: 100%;
    max-width: 360px;
    margin: 1.25rem auto 0;
  }

  .hub-stat-value {
    font-size: 1.35rem;
  }

  .hub-stat-label {
    font-size: 0.65rem;
  }
}

@media (max-width: 440px) {
  .level-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .level-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }

  .btn-enter {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.25rem;
  }
}
