/* Stories Section Styles */
.stories-section {
  padding: 3rem 0;
  margin-top: 2rem;
}

.stories-title {
  color: white;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stories-carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.stories-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: space-between;
}

.stories-container::-webkit-scrollbar {
  display: none;
}

.story-item {
  flex: 1;
  min-width: 120px;
  max-width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 3px solid hsl(340, 67%, 45%);
  backdrop-filter: blur(10px);
}

.story-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: hsl(340, 67%, 37%);
}

.story-thumbnail {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.story-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.story-item:hover .story-thumbnail video {
  transform: scale(1.1);
}

.story-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 1rem 0.5rem 0.5rem;
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
}

.stories-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.stories-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.stories-nav.prev {
  left: -25px;
}

.stories-nav.next {
  right: -25px;
}

.stories-nav svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

/* Stories Navigation Dots */
.stories-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.stories-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.stories-dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.stories-dot.active {
  background: var(--primary);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

/* Stories Modal */
.stories-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.stories-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stories-modal-content {
  position: relative;
  width: 350px;
  height: 622px;
  background: black;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  aspect-ratio: 9/16;
}

.stories-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.stories-close:hover {
  background: white;
  transform: scale(1.1);
}

.stories-close svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

/* Custom Video Player */
.custom-video-player {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
}

#stories-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: none;
  cursor: pointer;
}

/* Progress Bar */
.video-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 10;
  cursor: pointer;
}

.video-progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s ease;
}

/* Video Controls */
.video-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 16px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.custom-video-player:hover .video-controls {
  opacity: 1;
}

.play-pause-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.play-pause-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.video-time {
  color: white;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-time .current-time {
  color: var(--primary);
}

/* Stories Posts Section */
.stories-posts-section {
    padding: 3rem 0;
    background: #861036;
}

.stories-posts-section .section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.stories-posts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.story-post {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  aspect-ratio: 9/16;
}

.story-post:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.story-post-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.story-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.story-post:hover .story-post-image img {
  transform: scale(1.1);
}

.story-post-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem 1.5rem 1.5rem;
  color: white;
}

.story-post-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e74c3c;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  display: block;
}

.story-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0;
  line-height: 1.3;
  font-family: 'Playfair Display', serif;
}

/* Mobile adjustments for video controls */
@media (max-width: 768px) {
  .video-controls {
    bottom: 10px;
    left: 10px;
    right: 10px;
    padding: 8px 12px;
  }
  
  .video-time {
    font-size: 12px;
  }
  
  .play-pause-btn {
    padding: 6px;
  }
  
  .play-pause-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .stories-title {
    font-size: 2rem;
  }
  
  .story-item {
    width: 100px;
    height: 178px;
  }
  
  .stories-nav {
    width: 40px;
    height: 40px;
  }
  
  .stories-nav.prev {
    left: -20px;
  }
  
  .stories-nav.next {
    right: -20px;
  }
  
  .stories-nav svg {
    width: 20px;
    height: 20px;
  }
  
  .stories-modal-content {
    width: 280px;
    height: 498px;
    aspect-ratio: 9/16;
  }
  
  .stories-container {
    justify-content: flex-start;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  .story-item {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    scroll-snap-align: start;
  }
  
  .stories-dots {
    display: none;
  }
  
  .stories-posts-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0 1rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  
  .stories-posts-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
  }
  
  .stories-posts-grid .story-post {
    flex: 0 0 auto;
    width: 200px;
    scroll-snap-align: start;
  }
  
  .stories-posts-section {
    padding: 3rem 0;
  }
  
  .stories-posts-section .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .stories-section {
    padding: 2rem 0;
  }
  
  .stories-carousel {
    padding: 0 0.5rem;
  }
  
  .story-item {
    width: 100px;
    height: 100px;
  }
  
  .stories-container {
    gap: 0.5rem;
  }
  
  .story-overlay {
    font-size: 0.7rem;
    padding: 0.5rem 0.25rem 0.25rem;
  }
  
  .stories-nav {
    width: 35px;
    height: 35px;
  }
  
  .stories-nav svg {
    width: 18px;
    height: 18px;
  }
  
  .stories-close {
    width: 35px;
    height: 35px;
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .stories-close svg {
    width: 18px;
    height: 18px;
  }
  
  .stories-posts-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem;
    padding: 0 1rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  
  .stories-posts-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
  }
  
  .stories-posts-grid .story-post {
    flex: 0 0 auto;
    width: 160px;
    scroll-snap-align: start;
  }
  
  .stories-posts-section {
    padding: 2rem 0;
  }
  
  .stories-posts-section .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .story-post-overlay {
    padding: 1.5rem 1rem 1rem;
  }
}

@media (max-width: 1200px) {
  .stories-posts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}