/* ==========================================================================
   Homestay Korea — Themes Page
   테마별 홈스테이 카드 그리드, 히어로, CTA
   ========================================================================== */

/* ---- 히어로 ---- */
.themes-hero {
  position: relative;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--color-gray-900);
}

.themes-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.themes-hero__content {
  position: relative;
  z-index: 1;
  color: var(--color-text-white);
  padding: 0 var(--spacing-4);
}

.themes-hero__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--spacing-3);
}

.themes-hero__text {
  font-size: var(--text-lg);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ---- 테마 그리드 ---- */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-6);
  padding: var(--spacing-12) 0;
}

.theme-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.theme-card:hover,
.theme-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.theme-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.theme-card:hover .theme-card__image {
  transform: scale(1.08);
}

.theme-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0) 100%);
}

.theme-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-6);
  color: var(--color-text-white);
}

.theme-card__title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-1);
}

.theme-card__title a {
  color: inherit;
  text-decoration: none;
}

.theme-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.theme-card__description {
  font-size: var(--text-sm);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
  line-height: var(--leading-relaxed);
}

.theme-card:hover .theme-card__description,
.theme-card:focus-within .theme-card__description {
  opacity: 0.9;
  max-height: 80px;
  margin-bottom: var(--spacing-3);
}

.theme-card__count {
  font-size: var(--text-sm);
  opacity: 0.85;
}

.theme-card__icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-3);
}

.theme-card__icon svg {
  width: 20px;
  height: 20px;
  fill: var(--color-text-white);
}

/* ---- CTA 섹션 ---- */
.themes-cta {
  text-align: center;
  padding: var(--spacing-12) 0;
}

.themes-cta__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-white);
  margin-bottom: var(--spacing-3);
}

.themes-cta__text {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-6);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- 반응형 ---- */
@media (max-width: 1024px) {
  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .themes-hero {
    height: 260px;
  }

  .themes-hero__title {
    font-size: var(--text-2xl);
  }

  .themes-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
  }
}
