/* ============================================================
   KitsuneWebtoon.com — Home Page Styles
   ============================================================ */

.main-content {
  padding-top: calc(var(--navbar-height) + 20px);
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  margin-bottom: 40px;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 20%;
  filter: blur(10px) brightness(0.3);
  transform: scale(1.1);
  z-index: 1;
}

.slide-content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(11, 14, 20, 0.95) 30%, rgba(11, 14, 20, 0.4) 70%, rgba(11, 14, 20, 0.9) 100%),
              linear-gradient(to top, rgba(11, 14, 20, 1) 0%, transparent 40%);
  display: flex;
  align-items: center;
  z-index: 2;
}

.slide-container {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.slide-info {
  flex: 1;
  max-width: 600px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s, opacity 0.6s ease 0.3s;
}

.slide.active .slide-info {
  transform: translateY(0);
  opacity: 1;
}

.slide-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

.slide-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.slide-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.slide-meta .rating {
  color: var(--accent-gold);
  font-weight: 700;
}

.slide-meta .genres span {
  margin-right: 8px;
  color: var(--primary-light);
  font-weight: 600;
}

.slide-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 30px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slide-buttons {
  display: flex;
  gap: 16px;
}

.slide-cover-art {
  width: 240px;
  height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.2);
  transform: scale(0.9) rotate(-3deg);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s, opacity 0.8s ease 0.2s;
}

.slide.active .slide-cover-art {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.slide-cover-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 30px;
  left: var(--container-padding);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 24px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-normal);
}

.dot.active {
  background: var(--primary);
  width: 48px;
  box-shadow: 0 0 10px var(--primary);
}

/* ============================================================
   GENRES SECTION
   ============================================================ */
.genres-section {
  margin-bottom: 50px;
}

.genre-tags {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 4px;
  scrollbar-width: none; /* Firefox */
}

.genre-tags::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* ============================================================
   WEBTOON GRID (POPULAR)
   ============================================================ */
.popular-section {
  margin-bottom: 60px;
}

.webtoon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

/* ============================================================
   LATEST UPDATES SECTION (WITH SIDEBAR)
   ============================================================ */
.latest-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 30px;
  align-items: start;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Latest Card Style */
.latest-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
}

.latest-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.latest-cover {
  width: 90px;
  height: 125px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.latest-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.latest-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.latest-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-genres {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.latest-chapters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.latest-chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.latest-chapter-row:hover {
  background: rgba(255, 107, 53, 0.08);
  border-color: rgba(255, 107, 53, 0.2);
  color: var(--primary-light);
}

.latest-chapter-time {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* ============================================================
   SIDEBAR WIDGET
   ============================================================ */
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: calc(var(--navbar-height) + 20px);
}

.widget-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.widget-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

/* Daily Recommendation Inside Widget */
.recommend-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommend-cover {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.recommend-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommend-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 14, 20, 0.9), transparent);
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.recommend-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
}

.recommend-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommend-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recommend-genres span {
  font-size: 0.68rem;
  padding: 3px 8px;
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: 4px;
  color: var(--primary-light);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1200px) {
  .webtoon-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .latest-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar-widget {
    position: static;
  }
}

@media (max-width: 900px) {
  .slide-cover-art {
    display: none;
  }
  .slide-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    height: 380px;
  }
  .slide-title {
    font-size: 1.8rem;
  }
  .slide-desc {
    margin-bottom: 20px;
  }
  .webtoon-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .latest-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 340px;
  }
  .slide-title {
    font-size: 1.5rem;
  }
  .slide-desc {
    display: none;
  }
  .webtoon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .slide-buttons {
    flex-direction: column;
    gap: 8px;
  }
  .slide-buttons .btn {
    width: 100%;
    text-align: center;
  }
}
