﻿@media (max-width: 576px) {
  #popupSlider .popup-slider-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  #popupSlider .modal-content {
    max-height: 100vh !important;
    border-radius: 0 !important;
  }
  #popupSlider #carouselExampleControls .carousel-item,
  #popupSlider #carouselExampleControls .ratio {
    height: 60vw !important;
    min-height: 180px !important;
    max-height: 70vh !important;
  }
  #popupSlider #carouselExampleControls .carousel-item img {
    width: 100vw !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: 70vh !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block;
    margin: 0 auto;
  }
}
/* Slider, popup and story styles extracted from anasayfa.php */

/* ======================================== */
/* CLEAN SLIDER STYLES                      */
/* ======================================== */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  max-height: 900px;
  background: #f8fafc;
  overflow: hidden;
  isolation: isolate;
  contain: layout style paint;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.slider-wrapper:has(.stories-bar) .slider-container {
  padding-top: 140px;
}

.clean-slider {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none !important;
}

.clean-slider .swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
}

.slider-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.05) 100%);
  z-index: 1;
}

.slider-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  max-width: 900px;
  width: 90%;
  padding: 3rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 1rem;
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider-title {
  font-size: 3.5rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin-bottom: 1.5rem !important;
  text-shadow: none !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
}

.slider-description {
  font-size: 1.5rem !important;
  color: rgba(255, 255, 255, 0.95) !important;
  margin-bottom: 2.5rem !important;
  text-shadow: none !important;
  line-height: 1.7 !important;
  font-weight: 400 !important;
}

.slider-play-pause {
  position: absolute;
  bottom: 2rem;
  left: auto;
  right: 2rem;
  transform: none;
  z-index: 10;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none !important;
}

.slider-play-pause:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
  box-shadow: none !important;
}

.slider-play-pause:active {
  transform: scale(0.95);
}

.slider-play-pause i {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.slider-play-pause.paused i {
  transform: translateX(2px);
}

.slider-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none !important;
  border: none;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.slider-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.slider-button:hover::before {
  left: 100%;
}

.slider-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: none !important;
  color: #1e293b;
  text-decoration: none;
}

.slider-button i {
  transition: transform 0.3s ease;
}

.slider-button:hover i {
  transform: translateX(4px);
}

.slider-container .swiper-button-next,
.slider-container .swiper-button-prev {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #3b82f6;
  box-shadow: none !important;
  transition: all 0.3s ease;
}

.slider-container .swiper-button-next:hover,
.slider-container .swiper-button-prev:hover {
  background: #ffffff;
  transform: scale(1.1);
  box-shadow: none !important;
}

.slider-container .swiper-button-next:after,
.slider-container .swiper-button-prev:after {
  font-size: 18px;
  font-weight: 600;
}

.slider-container .swiper-pagination {
  bottom: 2rem;
}

.slider-container .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition: all 0.3s ease;
}

.slider-container .swiper-pagination-bullet-active {
  background: #3b82f6;
  transform: scale(1.2);
}

/* POPUP SHIMMER + POPUP MODAL */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.lazy {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

.lazy.loaded {
  animation: none;
  background: none;
}

#popupSlider .popup-slider-content {
  border: 0;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: none !important;
}

#popupSlider .popup-slider-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#popupSlider .popup-slider-headline {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

#popupSlider .popup-slider-close-btn {
  background-size: 0.8rem;
  opacity: 0.7;
}

#popupSlider .popup-slider-close-btn:hover {
  opacity: 1;
}

#popupSlider .popup-slider-dialog {
  width: min(96vw, 1280px);
  max-width: min(96vw, 1280px);
  margin: 0.75rem auto auto;
}

#popupSlider {
  z-index: 110001 !important;
}

#popupSlider .modal-content {
  max-height: calc(100vh - 1.5rem);
  overflow: hidden;
}

#popupSlider .modal-body {
  padding: clamp(0.5rem, 1.5vw, 1rem);
}

#popupSlider #carouselExampleControls .carousel-item {
  height: min(62vh, 780px);
  background: #000;
}

#popupSlider #carouselExampleControls .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

#popupSlider #carouselExampleControls .ratio {
  height: min(62vh, 780px);
}

#popupSlider #carouselExampleControls .ratio::before {
  padding-top: 0;
}

#popupSlider #carouselExampleControls iframe {
  width: 100%;
  height: 100%;
}

#popupSlider .modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

#popupSlider .popup-slider-footer {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.9rem 1rem;
  justify-content: flex-end;
}

#popupSlider .popup-slide-title {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 700;
  color: #0f172a;
}

#popupSlider .popup-slide-desc {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.45;
}

#popupSlider .popup-slider-close {
  background: #0f172a;
  color: #ffffff;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.55rem 1rem;
  font-weight: 600;
}

#popupSlider .popup-slider-close:hover {
  background: #1e293b;
  color: #ffffff;
}

.modal-backdrop.popup-slider-backdrop {
  z-index: 110000 !important;
}

/* STORIES BAR */
.stories-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  max-height: 140px;
  clip-path: inset(0);
  will-change: transform;
  transform: translateZ(0);
}

.stories-container {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  box-shadow: none !important;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 15px auto;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.stories-container::-webkit-scrollbar { display: none; }

.story-item {
  position: relative;
  width: 80px;
  flex: 0 0 auto;
  text-decoration: none;
  color: #111827;
  scroll-snap-align: center;
}

.story-ring { display: none; }

.story-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.95);
  transition: opacity 0.3s ease, transform 0.2s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.story-avatar.lazy {
  opacity: 0.6;
  filter: blur(2px);
}

.story-avatar.loaded {
  opacity: 1;
  filter: blur(0);
}

.story-title {
  display: block;
  width: 80px;
  text-align: center;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.2;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* STORY MODAL */
.modal-backdrop.modal-backdrop-story { z-index: 220000 !important; }
#storyModal { z-index: 220010 !important; }
.story-modal-dialog {
  z-index: 220011 !important;
  max-width: 960px;
  min-height: calc(100vh - 1rem);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto;
}

body.story-open .floating-menu-container,
body.story-open #floatingMenuContainer {
  z-index: 10 !important;
  pointer-events: none;
}

body.story-open .modern-topbar-wrapper,
body.story-open .modern-header,
body.story-open .header,
body.story-open header {
  z-index: 1 !important;
  pointer-events: none !important;
}

.story-slide-wrapper {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.story-slide-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  max-width: 60%;
}

.story-slide-link {
  color: #fff;
  background: #000;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none !important;
  flex: 0 0 auto;
  white-space: nowrap;
}

.story-slide-link:hover {
  background: #111827;
  color: #fff;
}

.story-slide-link:active { transform: translateY(1px); }

.story-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 11999;
  width: 44px;
  height: 44px;
  line-height: 42px;
  text-align: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.4);
  font-size: 30px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: none !important;
}

.story-close:active { transform: scale(0.98); }

.story-progress {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  z-index: 11998;
}

.story-progress .seg {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
  overflow: hidden;
}

.story-progress .seg > span {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  transition: width linear;
}

.story-progress .seg.filled > span {
  width: 100%;
  transition: none;
}

.story-progress .seg.active > span {
  width: 100%;
  transition-duration: var(--story-delay, 3.5s);
}

@media (min-width: 1024px) and (max-width: 1440px) {
  .slider-wrapper { height: 75vh; min-height: 650px; max-height: 850px; }
  .slider-container { max-width: 1200px; padding: 1.5rem; }
  .slider-content { max-width: 800px; padding: 2.5rem; }
  .slider-title { font-size: 4.5rem !important; margin-bottom: 1.2rem; }
  .slider-description { font-size: 2rem !important; margin-bottom: 2rem; }
  .slider-button { padding: 0.9rem 1.8rem; font-size: 0.95rem; }
}

@media (min-width: 1441px) and (max-width: 1600px) {
  .slider-wrapper { height: 78vh; min-height: 700px; max-height: 900px; }
  .slider-container { max-width: 1300px; }
  .slider-content { max-width: 850px; }
  .slider-title { font-size: 3.2rem !important; }
  .slider-description { font-size: 1.4rem !important; }
}

@media (min-width: 1601px) and (max-width: 1920px) {
  .slider-wrapper { height: 85vh; min-height: 750px; max-height: 950px; }
  .slider-container { max-width: 1400px; }
  .slider-content { max-width: 900px; padding: 3rem; }
  .slider-title { font-size: 2.8rem !important; }
  .slider-description { font-size: 1.3rem !important; }
}

@media (min-width: 1921px) {
  .slider-wrapper { height: 85vh; min-height: 800px; max-height: 1000px; }
  .slider-container { max-width: 1600px; }
  .slider-content { max-width: 1000px; padding: 3.5rem; }
  .slider-title { font-size: 3rem !important; }
  .slider-description { font-size: 1.4rem !important; }
}

@media (max-width: 1023px) {
  .slider-wrapper { height: auto; min-height: clamp(260px, 50vw, 420px); max-height: none; }
  .slider-container { max-width: 100%; padding: 1.25rem; }
  .slider-content { max-width: 700px; padding: 1.2rem; max-height: none; overflow: visible; }
  .slider-title { font-size: clamp(1.2rem, 4vw, 1.9rem) !important; margin-bottom: 0.65rem !important; }
  .slider-description { font-size: clamp(0.82rem, 2.6vw, 1rem) !important; margin-bottom: 1rem !important; }
}

@media (max-width: 768px) {
  .slider-wrapper { height: auto; min-height: clamp(240px, 52vw, 320px); }
  .slider-container { padding: 1rem; }
  .slider-content {
    top: auto;
    bottom: 0.75rem;
    transform: translateX(-50%);
    padding: 0.9rem;
    width: calc(100% - 1rem);
    max-width: none;
    max-height: none;
    overflow: visible;
    text-align: left;
  }
  .slider-title { font-size: clamp(1rem, 5.2vw, 1.4rem) !important; margin-bottom: 0.4rem !important; }
  .slider-description { font-size: 0.82rem !important; margin-bottom: 0.7rem !important; line-height: 1.35 !important; }
  .slider-button { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
  .slider-play-pause { width: 3rem; height: 3rem; bottom: 1.5rem; }
  .slider-play-pause i { font-size: 1.1rem; }
  .stories-bar { top: 5px; }
  .slider-wrapper:has(.stories-bar) .slider-container { padding-top: 115px; }
  .stories-container { margin-bottom: 10px; }
  .story-item { width: 60px; }
  .story-avatar { width: 52px; height: 52px; }
  .story-title { width: 60px; font-size: 10px; }

  #popupSlider .popup-slider-dialog { width: 98vw; max-width: 98vw; margin: 0.25rem auto auto; }
  #popupSlider .modal-content { max-height: calc(100vh - 0.5rem); }
  #popupSlider .popup-slider-header,
  #popupSlider .popup-slider-footer { padding: 0.7rem 0.75rem; }
  #popupSlider .popup-slider-close { width: auto; }
  #popupSlider #carouselExampleControls .carousel-item,
  #popupSlider #carouselExampleControls .ratio { height: min(48vh, 420px); }

  .story-modal-dialog {
    margin: auto;
    max-width: calc(100% - 1rem);
    min-height: 100vh;
    height: auto;
  }
  #storyModal .modal-content {
    width: 100%;
    max-height: calc(100vh - 1rem);
    border-radius: 16px;
    overflow: hidden;
  }
  #storyModal .modal-body { height: auto; }
  .story-slide-wrapper {
    height: min(78vh, 720px);
    min-height: 420px;
  }
  .story-slide-title { font-size: 0.95rem; max-width: 55%; }
  .story-slide-link { font-size: 0.95rem; padding: 0.45rem 0.8rem; }
}

@media (max-width: 700px) {
  #popupSlider #carouselExampleControls .carousel-item,
  #popupSlider #carouselExampleControls .ratio { height: min(42vh, 340px); }
}

@media (max-width: 480px) {
  .slider-content { padding: 1.5rem; }
  .slider-title { font-size: 2.5rem !important; }
  .slider-description { font-size: 1.2rem !important; }
  .slider-button { padding: 0.7rem 1.2rem; font-size: 0.85rem; gap: 0.5rem; }
  .slider-play-pause { width: 2.75rem; height: 2.75rem; bottom: 1.25rem; }
  .slider-play-pause i { font-size: 1rem; }
}

