/* ====== CAROUSEL SECTION STYLES ====== */
:root {
  --bg-dark: #0a0a0c;
  --cyber-blue: #00f3ff;
  --text-light: #ffffff;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

/* ====== LOADING SCREEN ====== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0a0a0f;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(14, 165, 255, 0.3);
  border-top-color: #0ea5ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====== FADE IN ANIMATIONS ====== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== MAIN CONTENT ====== */
.main-content {
  background: #ffffff;
  position: relative;
  z-index: 1000;
  padding-top: 10px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #ffffff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}

/* ====== CAROUSEL SECTION ====== */
.carousel-section {
  position: relative;
  width: 100%;
  padding: 80px 40px;
  background: rgb(255, 255, 255);
  overflow: hidden;
  margin-bottom: 40px;
  /* No opacity/transform here — children handle animation */
}

/* Animate title separately (Safari-safe) */
.carousel-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #000000, #000000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  
  /* Initial state */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.carousel-title.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Animate carousel content after title */
.desktop-carousel,
.mobile-carousel-container {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease 0.1s, transform 0.8s ease 0.1s;
}

.carousel-section.animate .desktop-carousel,
.carousel-section.animate .mobile-carousel-container {
  opacity: 1;
  transform: translateY(0);
}

/* ====== DESKTOP CAROUSEL STYLES ====== */
.carousel-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
  margin-top: -150px;
}
.carousel-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-slide {
  position: absolute;
  width: 900px;
  height: 506px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 1;
  opacity: 0.5;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #000;
}
.carousel-slide.left-preview {
  left: 0%;
  transform: translateX(-60%) scale(0.85);
  filter: brightness(0.5) blur(1px);
  z-index: 2;
}
.carousel-slide.center-active {
  left: 50%;
  transform: translateX(-50%) scale(1);
  z-index: 3;
  opacity: 1;
  filter: brightness(1) blur(0);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}
.carousel-slide.right-preview {
  left: 100%;
  transform: translateX(-40%) scale(0.85);
  filter: brightness(0.5) blur(1px);
  z-index: 2;
}
.carousel-slide.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.8);
  z-index: 0;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.carousel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  padding: 30px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.85) 100%);
  border-radius: 0 0 16px 16px;
}
.carousel-text-content {
  flex: 1;
  padding-right: 40px;
}
.carousel-button-right {
  flex-shrink: 0;
  margin-left: auto;
}
.carousel-title-large {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: white;
  line-height: 1.3;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.carousel-description {
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  text-align: left;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  font-weight: 400;
}
.carousel-btn {
  background: linear-gradient(135deg, #0ea5ff, #7c3aed);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-decoration: none;
  white-space: nowrap;
}
.carousel-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(14, 165, 255, 0.4);
}
.carousel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 10;
  pointer-events: none;
}
.carousel-nav-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: all;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.carousel-nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
  border-color: rgba(14, 165, 255, 0.6);
  box-shadow: 0 8px 30px rgba(14, 165, 255, 0.4);
}
.carousel-dots {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  z-index: 10;
  padding: 20px;
}
.carousel-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}
.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}
.carousel-dot.active {
  background: #0ea5ff;
  transform: scale(1.4);
  box-shadow: 0 0 20px rgba(14, 165, 255, 0.7);
}

/* ====== MOBILE CAROUSEL STYLES ====== */
.mobile-carousel-container {
  display: none;
}
.desktop-carousel {
  display: block;
}
.mobile-carousel-track {
  display: flex;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
  user-select: none;
  will-change: transform;
  height: 100%;
}
.mobile-carousel-track:active {
  cursor: grabbing;
}
.mobile-carousel-slide {
  flex: 0 0 80%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
}
/* Container — no background, no z-index */
.mobile-slide-content {
  background: none !important;
  border-radius: 16px;
  padding: 0;
  width: 100%;
  height: 100%;
  border: 2px solid #000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  color: white;
  position: relative; /* ← needed for absolute image */
  overflow: hidden;
}

/* Full-bleed image */
.mobile-slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fit-content;
  background-color: #000000d4;
  object-position: center;
  z-index: 1; /* behind text */
}

/* Text container — must be above image */
.mobile-carousel-content {
  position: relative; /* creates stacking context */
  z-index: 2; /* ensures it's above image */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 20px 30px; /* add spacing */
}

/* Optional: ensure inner text layers are safe */
.mobile-slide-category,
.mobile-text-overlay,
.mobile-text-content-wrapper {
  position: relative;
  z-index: 3;
}
.mobile-slide-category {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(0, 0, 0);
  z-index: 3;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.mobile-slide-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: white;
  line-height: 1.3;
  text-align: left;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}
.mobile-slide-desc {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.5;
  font-size: 0.95rem;
  max-width: 90%;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  margin-bottom: 15px;
  font-weight: 400;
}
.mobile-demo-btn {
  background: linear-gradient(135deg, #0ea5ff, #7c3aed);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-decoration: none;
  align-self: flex-start;
  margin-top: 10px;
}
.mobile-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(14, 165, 255, 0.4);
}
.mobile-carousel-indicators {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 10px;
}
.mobile-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}
.mobile-indicator.active {
  background: #0ea5ff;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(14, 165, 255, 0.7);
}
.mobile-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 20%,
    rgba(0, 0, 0, 0.95) 80%);
  z-index: 2;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.mobile-text-content-wrapper {
  position: relative;
  z-index: 3;
}

/* MOBILE CAROUSEL ANIMATIONS */
.mobile-carousel-content > * {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-carousel-slide.active .mobile-carousel-content > * {
  opacity: 1;
  transform: translateX(0);
}
.mobile-carousel-slide.active .mobile-slide-category {
  transition-delay: 0.1s;
}
.mobile-carousel-slide.active .mobile-slide-title {
  transition-delay: 0.1s;
}
.mobile-carousel-slide.active .mobile-slide-desc {
  transition-delay: 0.1s;
}
.mobile-carousel-slide.active .mobile-demo-btn {
  transition-delay: 0.1s;
}
.mobile-indicator.active {
  animation: pulse-indicator 1s infinite;
}
@keyframes pulse-indicator {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 255, 0.7);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(14, 165, 255, 0);
  }
}

/* ====== MOBILE VERSION ====== */
@media (max-width: 768px) {
  .carousel-section {
    width: 100vw !important;
    margin-left: -20px !important;
    margin-right: -20px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .desktop-carousel {
    display: none !important;
  }
  .mobile-carousel-container {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
  }
  .mobile-carousel-slide {
    min-height: 500px !important;
    padding: 10px !important;
  }
  .mobile-slide-content {
    padding: 10px;
  }
  .mobile-slide-category {
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    font-size: 0.75rem;
  }
  .mobile-slide-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }
  .mobile-slide-desc {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  .mobile-demo-btn {
    padding: 0.9rem 1.2rem !important;
    font-size: 0.95rem !important;
    margin-top: 0.5rem !important;
  }
  .mobile-text-overlay {
    padding: 15px;
  }
  .content-section {
    padding: 30px 15px !important;
  }
  .section-title {
    font-size: 1.6rem !important;
    margin-bottom: 25px !important;
  }
  .carousel-title {
    font-size: 1.6rem !important;
    margin-bottom: 10px !important;
  }
}
@media (max-width: 480px) {
  .mobile-carousel-slide {
    min-height: 450px !important;
  }
}

/* ====== DESKTOP STYLES ====== */
@media (min-width: 768px) {
  .mobile-carousel-container {
    display: none !important;
  }
  .desktop-carousel {
    display: block !important;
  }
  .content-section {
    padding: 80px 40px;
  }
  .section-title {
    margin-bottom: 50px;
  }
  .carousel-container {
    height: 100vh;
    padding: 80px 40px;
  }
  .carousel-slide {
    width: 1200px;
    height: 506px;
  }
  .carousel-slide.left-preview {
    left: 0%;
    transform: translateX(-60%) scale(0.85);
  }
  .carousel-slide.center-active {
    left: 50%;
    transform: translateX(-50%) scale(1);
  }
  .carousel-slide.right-preview {
    left: 100%;
    transform: translateX(-40%) scale(0.85);
  }
  .carousel-content {
    padding: 40px 50px;
    height: 30%;
  }
  .carousel-title-large {
    font-size: 2rem;
  }
  .carousel-description {
    font-size: 1.1rem;
  }
  .carousel-btn {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
  }
  .carousel-nav-btn {
    width: 70px;
    height: 70px;
  }
  .carousel-dots {
    bottom: 50px;
  }
}
