/* Home page specific styles */

/* View All Button */
.view-all-btn {
  display: inline-block;
  color: #000000;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.2s ease;
  position: relative;
  top: -2px;
  margin-left: auto;
  margin-right: 12px;
}

.view-all-btn:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .view-all-btn {
    margin-right: 16px;
    top: -4px;
  }
}

/* Center View All Button */
.view-all-btn-center {
  display: inline-block;
  padding: 12px 40px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.view-all-btn-center:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

/* No Data Message Styles */
.no-data-message {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.no-data-message .no-data-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.no-data-message h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.no-data-message p {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 24px;
}

.no-data-message .btn {
  display: inline-block;
  padding: 12px 24px;
  background: #333333;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.no-data-message .btn:hover {
  background: #555555;
}

/* Ad Banner Section */
.ad-banner-section {
  padding: 30px 0;
  background: white;
}

.ad-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ad-banner-link {
  display: block;
  width: 100%;
  height: auto;
}

.ad-banner-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@media (max-width: 768px) {
  .ad-banner-section {
    padding: 20px 0;
  }
  
  .ad-banner-container {
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    padding: 0;
  }
  
  .ad-banner-image {
    max-height: 200px;
    width: 100%;
    height: 200px;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* New badge for new classes */
.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
  z-index: 10;
}

/* Hero section */
.hero-section {
  position: relative;
  height: 40vh;
  min-height: 300px;
  margin-top: -70px;
  overflow: hidden;
  z-index: 1;
}

/* Mobile app-like hero section */
@media (max-width: 768px) {
  .hero-section {
    height: 120px;
    min-height: 120px;
    margin-top: 0;
    border-radius: 0;
    overflow: hidden;
  }
}

.hero-slide {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  cursor: pointer;
}

.slide-counter {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10;
}

.hero-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  pointer-events: none;
}

.hero-arrow {
  background: transparent;
  border: none;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-arrow:hover {
  transform: scale(1.2);
  color: rgba(255, 255, 255, 0.8);
}


/* Swiper customization */
.hero-swiper {
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Mid Banner Section */
.mid-banner-section {
  background: white;
}

.mid-banner-wrapper {
  width: 100%;
  max-width: 900px;
  max-height: 200px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.mid-banner-wrapper:hover {
  transform: scale(1.01);
}

.mid-banner-wrapper img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .mid-banner-section {
    padding: 20px 0 !important;
  }

  .mid-banner-wrapper {
    border-radius: 8px;
    max-height: 120px;
  }

  .mid-banner-wrapper img {
    height: 120px;
  }
}

/* Categories section */
.categories-no-padding {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.categories-grid {
  margin-top: var(--spacing-lg);
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  border: none;
  outline: none;
}

.category-item {
  text-align: center;
  padding: 12px 8px;
  background: var(--background-white);
  border-radius: var(--radius-large);
  box-shadow: none;
  border: none;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
  flex: 0 0 auto;
  min-width: 80px;
  max-width: 90px;
}

.category-item:hover {
  transform: translateY(-4px);
  box-shadow: none;
}

/* Mobile app-like categories */
@media (max-width: 768px) {
  .categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
    padding: 20px 16px;
    background: white;
    margin-top: 0;
    overflow: visible;
  }
  
  .category-item {
    padding: 20px 12px;
    border-radius: 16px;
    box-shadow: none;
    border: none !important;
    outline: none !important;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  }
  
  .category-item:active {
    transform: scale(0.98);
    box-shadow: none;
  }
}

.category-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
  line-height: 1;
  display: block;
}

.category-item h3 {
  font-size: 0.75rem;
  font-weight: bold;
  margin: 0;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Popular classes section */
.loading-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
}

.class-card {
  background: var(--background-white);
  border-radius: 8px;
  overflow: hidden;
  border: none;
  box-shadow: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.class-card:hover {
  transform: translateY(-2px);
}

/* Mobile app-like class cards */
@media (max-width: 768px) {
  .class-card {
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
  }
  
  .class-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }
  
  .class-card-content {
    padding: 16px;
  }
  
  .class-card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 8px;
  }
  
  .class-card-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }
}

.card-image-container {
  position: relative;
  width: 100%;
  height: 150px;
}

.class-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.category-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 500;
}

.featured-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ffd700;
  color: #333;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 2;
}

.city-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  backdrop-filter: blur(8px);
}

.class-card-content {
  padding: 12px;
}

.class-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #000000;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
}

.host-info {
  margin-bottom: 10px;
  padding: 4px 0;
}

.host-name {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  border-left: 3px solid var(--primary-color);
}

.event-datetime {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.event-datetime svg {
  color: var(--text-light);
  flex-shrink: 0;
}

.event-date-time {
  font-weight: 500;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.review-count-row {
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.review-count {
  font-size: 0.85rem;
  color: #64748b;
}

.rating-stars {
  color: #ffd700;
  font-size: 0.8rem;
  letter-spacing: -2px;
}

.rating-number {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-left: 2px;
}

.review-count {
  color: var(--text-light);
  font-size: 0.7rem;
}

.no-reviews {
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-style: italic;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.original-price {
  color: #999;
  font-size: 0.75rem;
  text-decoration: line-through;
}

.discount-percent {
  color: #ff4757;
  font-size: 0.75rem;
  font-weight: 600;
}

.current-price {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.promotion-tag {
  background: #ff4757;
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 500;
  display: inline-block;
}

/* Responsive adjustments for home page */
@media (max-width: 767px) {
  .hero-section {
    height: 50vh;
    min-height: 400px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .hero-content {
    padding: var(--spacing-md);
  }
  
  .category-item {
    padding: var(--spacing-md) var(--spacing-sm);
  }
  
  .category-icon {
    font-size: 2.5rem;
  }
  
  .class-card-image {
    height: 150px;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .category-item h3 {
    font-size: 1.125rem;
  }
  
}

/* Animation for category items */
.category-item {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }
.category-item:nth-child(5) { animation-delay: 0.5s; }
.category-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Location Filter Section */
.location-filter-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Mobile responsive for location buttons */
@media (max-width: 768px) {
  .location-filter-buttons {
    gap: 8px;
  }
  
  .location-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-width: 70px;
  }
}

.location-btn {
  padding: 10px 20px;
  border: 2px solid var(--border-color);
  background: var(--background-white);
  color: var(--text-secondary);
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 80px;
}

.location-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.location-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Section Header with Dropdown */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.location-dropdown {
  position: relative;
}

.location-select {
  padding: 10px 40px 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  background: white;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  transition: all 0.3s ease;
  min-width: 150px;
}

.location-select:hover {
  border-color: var(--primary-color);
}

.location-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Horizontal Scroll for Popular Classes */
.section-header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.view-all-link {
  display: inline-block;
  color: #000000;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.view-all-link:hover {
  opacity: 0.7;
}

.horizontal-scroll-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  margin: 0 auto;
  padding: 0;
  scroll-behavior: smooth;
}


.horizontal-scroll-wrapper #popular-classes-grid,
.horizontal-scroll-wrapper #after-work-grid,
.horizontal-scroll-wrapper #weekend-grid {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
  padding: 0 10px;
  width: 100%;
  max-width: 100%;
}

.horizontal-scroll-grid::-webkit-scrollbar {
  height: 8px;
}

.horizontal-scroll-grid::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 10px;
}

.horizontal-scroll-grid::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

.horizontal-scroll-grid::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* Scroll Arrow Buttons */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  color: #333;
}

.scroll-arrow:hover {
  background: #333;
  border-color: #333;
  color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.scroll-arrow:active {
  transform: translateY(-50%) scale(1.05);
}

.scroll-arrow-left {
  left: -70px;
}

.scroll-arrow-right {
  right: -70px;
}

.scroll-arrow svg {
  pointer-events: none;
  stroke-width: 3;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
  .scroll-arrow {
    display: none;
  }

  .horizontal-scroll-wrapper {
    padding: 0;
  }
}

.horizontal-scroll-grid {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 10px 0 20px 0;
}

/* Card size - match grid-4 exactly */
.horizontal-scroll-grid .class-card {
  flex: 0 0 220px;
  width: 220px;
  min-width: 220px;
}

/* Mobile */
@media (max-width: 768px) {
  .section-header-actions {
    gap: 12px;
  }

  .view-all-link {
    font-size: 14px;
  }

  .location-select {
    min-width: 120px;
    font-size: 13px;
  }

  .horizontal-scroll-grid {
    gap: 12px;
  }

  /* Card size matches grid-4 on mobile: 2 columns */
  .horizontal-scroll-grid .class-card {
    flex: 0 0 165px;
    width: 165px;
    min-width: 165px;
  }
}