/* Homepage Styles */

/* Hero Section */
.hero-section {
  position: relative;
  height: 80vh;
  min-height: 500px;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
              url('../images/hero-background.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 20px;
  margin-bottom: 60px;
}

.hero-content {
  max-width: 800px;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 30px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn {
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  text-decoration: none;
}

.primary-btn {
  background: var(--primary-color);
  color: #000;
}

.primary-btn:hover {
  background: var(--primary-color-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Section Styles */
section {
  padding: 60px 20px;
  margin-bottom: 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #fff;
}

.section-header p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Featured Section */
.featured-section {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5));
  border-radius: 10px;
  overflow: hidden;
}

.featured-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
  padding: 20px 0;
}

.featured-slider::-webkit-scrollbar {
  height: 8px;
}

.featured-slider::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.featured-slider::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.featured-item {
  flex: 0 0 90%;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  height: 400px;
}

.featured-backdrop {
  width: 100%;
  height: 100%;
  position: relative;
}

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

.featured-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.2) 100%);
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.featured-content {
  width: 100%;
}

.featured-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.featured-badge.movies {
  background: var(--movies-color);
  color: #000;
}

.featured-badge.tvshows {
  background: var(--tvshows-color);
  color: #000;
}

.featured-badge.anime {
  background: var(--anime-color);
  color: #000;
}

.featured-badge.korean {
  background: var(--korean-color);
  color: #000;
}

.featured-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.featured-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.featured-overview {
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 80%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-buttons {
  display: flex;
  gap: 15px;
}

/* Categories Section */
.categories-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 20px;
  margin: 30px 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.category-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.category-tile {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 180px;
  height: 180px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.category-icon {
  background: rgba(0, 0, 0, 0.3);
  height: 70px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.category-tile.movies .category-icon {
  color: var(--movies-color);
  border-bottom: 4px solid var(--movies-color);
}

.category-tile.tvshows .category-icon {
  color: var(--tvshows-color);
  border-bottom: 4px solid var(--tvshows-color);
}

.category-tile.anime .category-icon {
  color: var(--anime-color);
  border-bottom: 4px solid var(--anime-color);
}

.category-tile.korean .category-icon {
  color: var(--korean-color);
  border-bottom: 4px solid var(--korean-color);
}

.category-tile.cartoon .category-icon {
  color: var(--cartoon-color);
  border-bottom: 4px solid var(--cartoon-color);
}

.category-info {
  padding: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 110px;
}

.category-info .category-text {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.category-info h3 {
  font-size: 1rem;
  margin-bottom: 5px;
  font-weight: 600;
  text-align: center;
}

.category-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
  text-align: center;
  display: block;
  height: 40px;
  overflow: hidden;
}

.browse-btn {
  font-size: 0.8rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  padding: 6px 0;
  border-radius: 4px;
  transition: all 0.2s ease;
  background-color: rgba(0, 0, 0, 0.3);
  margin: 0 auto;
  width: 90%;
}

.category-tile.movies .browse-btn {
  color: var(--movies-color);
}

.category-tile.tvshows .browse-btn {
  color: var(--tvshows-color);
}

.category-tile.anime .browse-btn {
  color: var(--anime-color);
}

.category-tile.korean .browse-btn {
  color: var(--korean-color);
}

.category-tile.cartoon .browse-btn {
  color: var(--cartoon-color);
}

.category-tile:hover .browse-btn i {
  transform: translateX(5px);
}

.browse-btn i {
  transition: transform 0.3s ease;
}

/* Responsive design for categories */
@media (max-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .category-tile {
    height: 250px;
  }
  
  .category-icon {
    height: 120px;
  }
}

/* Trending Section */
.trending-section {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5));
  border-radius: 10px;
}

/* Default for tablets and desktops */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}

/* Mobile view */
@media (max-width: 767px) {
  .trending-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
  }
}

.trending-item {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.trending-item:hover {
  transform: translateY(-10px);
}

.trending-poster-container {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 10px;
  overflow: hidden;
}

.trending-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 15px;
}

.trending-item:hover .trending-overlay {
  opacity: 1;
}

.trending-buttons {
  display: flex;
  gap: 10px;
}

.trending-buttons .btn {
  padding: 8px 15px;
  font-size: 0.8rem;
}

@media (max-width: 576px) {
  .trending-buttons {
    flex-direction: column; /* Stack buttons vertically */
    align-items: stretch;   /* Make buttons take full width of their container */
  }
}

.trending-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.trending-badge.movies {
  background: var(--movies-color);
  color: #000;
}

.trending-badge.tvshows {
  background: var(--tvshows-color);
  color: #000;
}

.trending-badge.anime {
  background: var(--anime-color);
  color: #000;
}

.trending-badge.korean {
  background: var(--korean-color);
  color: #000;
}

.trending-info {
  padding: 15px 0;
}

.trending-title {
  font-size: 1rem;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Quick Access Section */
.quick-access-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
}

.quick-access-item {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  padding: 20px 15px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.quick-access-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.quick-access-item i {
  font-size: 2rem;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.quick-access-item span {
  font-size: 0.9rem;
  font-weight: bold;
}

/* Newsletter Section */
.newsletter-section {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5));
  border-radius: 10px;
  padding: 60px 20px;
  margin-bottom: 60px;
  text-align: center;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-content h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.newsletter-content p {
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
  padding: 12px 25px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
  
  .hero-content p {
    font-size: 1.2rem;
  }
  
  .featured-item {
    flex: 0 0 95%;
    height: 350px;
  }
  
  /* Media query adjustments */
  .section-header h2 {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn {
    width: 100%;
  }
  
  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .categories-section {
    max-width: 100%;
    margin: 20px 15px;
    padding: 15px 10px;
  }
  
  .category-grid {
    gap: 10px;
  }
  
  .category-tile {
    width: 150px;
    height: 170px;
  }
  
  .category-icon {
    height: 60px;
    font-size: 1.6rem;
  }
  
  .category-info {
    height: 110px;
    padding: 8px;
  }
  
  .category-info h3 {
    font-size: 0.9rem;
    margin-bottom: 3px;
  }
  
  .category-info p {
    font-size: 0.7rem;
    height: 35px;
  }
  
  .browse-btn {
    font-size: 0.7rem;
    padding: 5px 0;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .hero-section {
    height: 60vh;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-tile {
    width: 90%; /* Or 100% if preferred, adjust height accordingly if needed */
    max-width: 300px; /* Optional: prevent it from becoming too wide on slightly larger small screens */
    margin-left: auto;
    margin-right: auto;
  }
  

  
  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
