/**
 * Landing (Home) Page – design system and section styles
 * All rules scoped under .page-home so other pages are unaffected.
 */

.page-home {
  --landing-hero-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  --landing-text: #111827;
  --landing-muted: #6b7280;
  --landing-primary: #6366f1;
  --landing-radius: 12px;
  --landing-radius-lg: 16px;
  --landing-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --landing-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --landing-space-section: 60px;
  --landing-space-block: 24px;
  --landing-font: 'Plus Jakarta Sans', sans-serif;
}

/* Modal / popup (login form on home) */
.page-home .input-icons i { position: absolute; }
.page-home .input-icons { width: 100%; margin-bottom: 5px; }
.page-home .icon { padding: 10px; min-width: 40px; }
.page-home .input-field { width: 100%; padding: 10px; text-align: center; }

/* Hero */
.page-home .main-banner {
  position: relative;
  padding: var(--landing-space-section) 0;
  background: var(--landing-hero-bg);
  background-size: cover;
  background-position: center;
}

.page-home .main-banner .header-text h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.page-home .main-banner .header-text h2 em { font-style: italic; }

.page-home .main-banner .header-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.page-home .main-banner .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.page-home .main-banner .big-border-button a {
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 44px;
  line-height: 1.2;
}

.page-home .main-banner .big-border-button a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.page-home .main-banner .big-border-button a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

/* Section headings (shared) */
.page-home .section-heading {
  margin-bottom: 2rem;
}

.page-home .section-heading h6 {
  font-size: 0.9rem;
  color: var(--landing-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-home .section-heading h4 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--landing-text);
  margin: 0;
}

.page-home .section-heading h4 em { font-style: italic; }

/* Featured items – contest cards */
.page-home .featured-items {
  padding: var(--landing-space-section) 0;
  background: #fff;
}

.page-home .featured-items .owl-features,
.page-home .closed-contests .owl-features {
  min-height: 320px;
}

.page-home .featured-items .owl-features .item {
  padding: 0 10px;
}

.page-home .featured-items .thumb {
  position: relative;
  border-radius: var(--landing-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.page-home .featured-items .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.page-home .featured-items .hover-effect {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-home .featured-items .thumb:hover .hover-effect { opacity: 1; }

.page-home .featured-items .hover-effect .content {
  color: #fff;
  width: 100%;
}

.page-home .featured-items .hover-effect .content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.page-home .featured-items .hover-effect .content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.page-home .featured-items .hover-effect .content ul li { margin: 4px 0; }
.page-home .featured-items .hover-effect .content span { font-weight: 600; }

/* Popular categories */
.page-home .popular-categories {
  padding: var(--landing-space-section) 0;
  background: #fafafa;
}

.page-home .popular-item {
  background: #fff;
  border-radius: var(--landing-radius);
  overflow: hidden;
  box-shadow: var(--landing-shadow);
  margin-bottom: var(--landing-space-block);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-home .popular-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--landing-shadow-hover);
}

.page-home .popular-item .top-content {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
}

.page-home .popular-item .top-content .icon img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.page-home .popular-item .top-content .right h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--landing-text);
}

.page-home .popular-item .top-content .right span {
  font-size: 0.875rem;
  color: var(--landing-muted);
}

.page-home .popular-item .top-content .right em { font-style: italic; }

.page-home .popular-item .thumb {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.page-home .popular-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.page-home .popular-item .thumb .category,
.page-home .popular-item .thumb .likes {
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.page-home .popular-item .thumb .category { top: 10px; left: 10px; }
.page-home .popular-item .thumb .likes { top: 10px; right: 10px; }

.page-home .popular-item .border-button {
  padding: 16px;
  text-align: center;
}

.page-home .popular-item .border-button a {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid var(--landing-primary);
  color: var(--landing-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 44px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-home .popular-item .border-button a:hover {
  background: var(--landing-primary);
  color: #fff;
}

.page-home .popular-item .border-button a:focus-visible {
  outline: 2px solid var(--landing-primary);
  outline-offset: 2px;
}

/* Closed contests */
.page-home .closed-contests {
  padding: var(--landing-space-section) 0;
  background: #fff;
}

.page-home .closed-contests .owl-features .item {
  padding: 0 10px;
}

.page-home .closed-item {
  background: #fff;
  border-radius: var(--landing-radius);
  overflow: hidden;
  box-shadow: var(--landing-shadow);
  transition: box-shadow 0.2s ease;
}

.page-home .closed-item:hover { box-shadow: var(--landing-shadow-hover); }

.page-home .closed-item .thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.page-home .closed-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.page-home .closed-item .thumb .winner,
.page-home .closed-item .thumb .price {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.page-home .closed-item .thumb .price { bottom: 44px; }
.page-home .closed-item .thumb em { font-style: italic; }

.page-home .closed-item .down-content {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
}

.page-home .closed-item .down-content .row {
  display: flex;
  align-items: center;
  margin: 0 -8px;
}

.page-home .closed-item .down-content .col-7,
.page-home .closed-item .down-content .col-5 {
  padding: 0 8px;
}

.page-home .closed-item .down-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--landing-text);
}

.page-home .closed-item .down-content h4 span {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--landing-muted);
}

.page-home .closed-contests .border-button.text-center {
  margin-top: 2rem;
}

.page-home .closed-contests .border-button a {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid var(--landing-primary);
  color: var(--landing-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 44px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-home .closed-contests .border-button a:hover {
  background: var(--landing-primary);
  color: #fff;
}

.page-home .closed-contests .border-button a:focus-visible {
  outline: 2px solid var(--landing-primary);
  outline-offset: 2px;
}

/* Pricing plans */
.page-home .pricing-plans {
  padding: var(--landing-space-section) 0;
  background: #fafafa;
}

.page-home .pricing-item {
  background: #fff;
  border-radius: var(--landing-radius);
  overflow: hidden;
  box-shadow: var(--landing-shadow);
  margin-bottom: var(--landing-space-block);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-home .pricing-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--landing-shadow-hover);
}

.page-home .pricing-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.page-home .pricing-item .border-button {
  padding: 20px;
  text-align: center;
}

.page-home .pricing-item .border-button a {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid var(--landing-primary);
  color: var(--landing-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 44px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-home .pricing-item .border-button a:hover {
  background: var(--landing-primary);
  color: #fff;
}

.page-home .pricing-item .border-button a:focus-visible {
  outline: 2px solid var(--landing-primary);
  outline-offset: 2px;
}

/* Owl carousel – nav and dots */
.page-home .owl-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
}

.page-home .owl-carousel .owl-nav .owl-prev,
.page-home .owl-carousel .owl-nav .owl-next {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff !important;
  color: #374151 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border: none;
  font-size: 24px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: auto;
  transition: background 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-home .owl-carousel .owl-nav .owl-prev:hover,
.page-home .owl-carousel .owl-nav .owl-next:hover {
  background: var(--landing-primary) !important;
  color: #fff !important;
}

.page-home .owl-carousel .owl-nav .owl-prev:focus-visible,
.page-home .owl-carousel .owl-nav .owl-next:focus-visible {
  outline: 2px solid var(--landing-primary);
  outline-offset: 2px;
}

.page-home .owl-carousel .owl-nav .owl-prev { left: -12px; }
.page-home .owl-carousel .owl-nav .owl-next { right: -12px; }

.page-home .owl-carousel .owl-dots {
  margin-top: 1.5rem;
  text-align: center;
}

.page-home .owl-carousel .owl-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 4px;
  border-radius: 50%;
  background: #cbd5e0;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  min-width: 12px;
  min-height: 12px;
}

.page-home .owl-carousel .owl-dot.active { background: var(--landing-primary); }

.page-home .owl-carousel .owl-dot:focus-visible {
  outline: 2px solid var(--landing-primary);
  outline-offset: 2px;
}

/* Fallback when images fail to load */
.page-home .thumb img {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* Responsive */
@media (max-width: 992px) {
  .page-home .main-banner {
    padding: 80px 0 60px;
  }

  .page-home .featured-items,
  .page-home .popular-categories,
  .page-home .closed-contests,
  .page-home .pricing-plans {
    padding: 48px 0;
  }

  .page-home .section-heading h4 {
    font-size: 1.5rem;
  }

  .page-home .owl-carousel .owl-nav .owl-prev { left: 4px; }
  .page-home .owl-carousel .owl-nav .owl-next { right: 4px; }
}

@media (max-width: 768px) {
  .page-home .main-banner {
    padding: 60px 0 48px;
  }

  .page-home .main-banner .header-text h2 {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }

  .page-home .main-banner .buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .page-home .main-banner .big-border-button a {
    text-align: center;
    padding: 14px 20px;
  }

  .page-home .featured-items,
  .page-home .popular-categories,
  .page-home .closed-contests,
  .page-home .pricing-plans {
    padding: 40px 0;
  }

  .page-home .section-heading {
    margin-bottom: 1.5rem;
  }

  .page-home .section-heading h4 {
    font-size: 1.35rem;
  }

  .page-home .popular-item .thumb {
    height: 160px;
  }

  .page-home .closed-item .thumb {
    height: 200px;
  }

  .page-home .pricing-item img {
    height: 180px;
  }
}

@media (max-width: 576px) {
  .page-home .owl-carousel .owl-nav .owl-prev,
  .page-home .owl-carousel .owl-nav .owl-next {
    width: 36px;
    height: 36px;
    font-size: 18px !important;
  }

  .page-home .owl-carousel .owl-nav .owl-prev { left: 0; }
  .page-home .owl-carousel .owl-nav .owl-next { right: 0; }
}
