/* ========================================
   APEXPLAY Custom Styles
   ======================================== */

/* ========================================
   Products Section
   ======================================== */

/* Ensure all product boxes have equal height */
#products .game-block {
  display: flex;
  margin-bottom: 30px;
}

#products .game-block .inner-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Ensure all product images have equal height */
#products .game-block .image-box {
  position: relative;
  overflow: hidden;
  height: 300px; /* Fixed height for images */
}

#products .game-block .image-box .image {
  height: 100%;
  margin: 0;
}

#products .game-block .image-box .image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensure images fill the box without distortion */
}

/* Ensure lower-content has flexible but uniform height */
#products .game-block .lower-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#products .game-block .lower-content .text {
  flex: 1;
}

/* ========================================
   Video Banner Section
   ======================================== */

/* Video background container */
.banner-section video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
}

/* Dark overlay for video banner */
.banner-section .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* ========================================
   Build Steps Section
   ======================================== */

.build-steps-section {
  padding: 60px 0;
  position: relative;
}

/* Left Column - Image Container */
.build-image-container {
  position: sticky;
  top: 100px;
  padding: 20px;
  text-align: center;
}

.build-step-image {
  max-width: 100%;
  height: auto;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.build-step-image.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.build-step-image.fade-in {
  opacity: 1;
  transform: scale(1);
}

/* Right Column - Steps List */
.build-steps-list {
  padding: 20px;
}

/* Individual Step Item */
.step-item {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  margin-bottom: 20px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  background: rgba(255, 255, 255, 0.02);
}

.step-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(255, 193, 7, 0.5);
}

/* Active Step */
.step-item.active {
  background: rgba(255, 193, 7, 0.1);
  border-left-color: #ffc107;
}

.step-item.active .step-number {
  color: #ffc107;
  font-weight: 700;
}

.step-item.active .step-content h3 {
  color: #ffc107;
}

/* Step Number */
.step-number {
  font-size: 48px;
  font-weight: 700;
  color: #666;
  line-height: 1;
  margin-right: 20px;
  min-width: 80px;
  transition: color 0.3s ease;
}

/* Step Content */
.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
  transition: color 0.3s ease;
}

.step-content p {
  font-size: 15px;
  color: #aaa;
  line-height: 1.6;
  margin: 0;
}

/* ========================================
   Partners/Sponsors Section
   ======================================== */

/* Ensure partner logos display uniformly */
#partnersCarousel .slide-item .image-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 10px;
}

#partnersCarousel .slide-item img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: grayscale(0%);
}

#partnersCarousel .slide-item:hover img {
  opacity: 1;
  transform: scale(1.1);
}

/* Error state for failed images */
#partnersCarousel .slide-item img.img-load-error {
  opacity: 0.3;
  border: 2px dashed #ff4444;
  background: rgba(255, 68, 68, 0.1);
  position: relative;
}

#partnersCarousel .slide-item img.img-load-error::after {
  content: "❌";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
}

/* ========================================
   Services Section
   ======================================== */

.services-section {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.services-section .subtitle {
  color: #aaa;
  font-size: 18px;
  margin-top: 15px;
  line-height: 1.6;
}

/* Services Grid Layout */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 60px;
}

/* Service Card Base Styles */
.service-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 193, 7, 0.2);
  transition: all 0.5s ease;
  cursor: pointer;
}

/* Service Overlay - Dark gradient over background */
.service-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
  transition: all 0.5s ease;
  z-index: 1;
}

/* Large Cards (Full Width) */
.service-large {
  grid-column: span 2;
  min-height: 350px;
}

/* Small Cards (Half Width) */
.service-small {
  grid-column: span 1;
  min-height: 300px;
}

/* Service Inner Container */
.service-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* Large Cards - Content on Left */
.service-large .service-inner {
  justify-content: flex-start;
}

/* Small Cards - Content at Top */
.service-small .service-inner {
  justify-content: center;
  align-items: flex-start;
}

/* Service Content */
.service-content {
  text-align: left;
  max-width: 600px;
}

.service-large .service-content {
  max-width: 500px;
}

.service-content h3 {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.service-content p {
  font-size: 18px;
  line-height: 1.8;
  color: #ccc;
  transition: all 0.3s ease;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Hover Effects */
.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(255, 193, 7, 0.8);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  background-size: 110%;
}

.service-card:hover .service-overlay {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.service-card:hover .service-content h3 {
  color: #ffc107;
  transform: translateY(-5px);
}

.service-card:hover .service-content p {
  color: #fff;
  transform: translateY(-3px);
}

/* Animated Background Glow */
.service-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 193, 7, 0.15) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 0;
}

.service-card:hover::before {
  opacity: 1;
  animation: rotate-glow 10s linear infinite;
}

@keyframes rotate-glow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Remove pulse animation - not needed */

/* Individual Card Styles with Color Themes */
.service-1 {
  border-color: rgba(255, 68, 68, 0.3);
}

.service-1 .service-overlay {
  background: linear-gradient(
    135deg,
    rgba(255, 68, 68, 0.3) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.service-1:hover {
  border-color: rgba(255, 68, 68, 0.8);
  box-shadow: 0 25px 70px rgba(255, 68, 68, 0.4);
}

.service-1:hover .service-content h3 {
  color: #ff4444;
}

.service-2 {
  border-color: rgba(76, 175, 80, 0.3);
}

.service-2 .service-overlay {
  background: linear-gradient(
    135deg,
    rgba(76, 175, 80, 0.3) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.service-2:hover {
  border-color: rgba(76, 175, 80, 0.8);
  box-shadow: 0 25px 70px rgba(76, 175, 80, 0.4);
}

.service-2:hover .service-content h3 {
  color: #4caf50;
}

.service-3 {
  border-color: rgba(33, 150, 243, 0.3);
}

.service-3 .service-overlay {
  background: linear-gradient(
    135deg,
    rgba(33, 150, 243, 0.3) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.service-3:hover {
  border-color: rgba(33, 150, 243, 0.8);
  box-shadow: 0 25px 70px rgba(33, 150, 243, 0.4);
}

.service-3:hover .service-content h3 {
  color: #2196f3;
}

.service-4 {
  border-color: rgba(156, 39, 176, 0.3);
}

.service-4 .service-overlay {
  background: linear-gradient(
    135deg,
    rgba(156, 39, 176, 0.3) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.service-4:hover {
  border-color: rgba(156, 39, 176, 0.8);
  box-shadow: 0 25px 70px rgba(156, 39, 176, 0.4);
}

.service-4:hover .service-content h3 {
  color: #9c27b0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

/* Tablet and mobile devices */
@media (max-width: 991px) {
  #products .game-block .image-box {
    height: 250px;
  }

  /* Build Steps - Tablet */
  .build-image-container {
    position: relative;
    top: 0;
    margin-bottom: 40px;
  }

  .step-number {
    font-size: 36px;
    min-width: 60px;
  }

  .step-content h3 {
    font-size: 20px;
  }

  .step-content p {
    font-size: 14px;
  }

  /* Services - Tablet */
  .services-grid {
    gap: 25px;
  }

  .service-inner {
    padding: 40px 30px;
  }

  .service-content h3 {
    font-size: 28px;
  }

  .service-content p {
    font-size: 15px;
  }

  .service-large {
    min-height: 320px;
  }

  .service-small {
    min-height: 280px;
  }
}

/* Mobile devices */
@media (max-width: 767px) {
  #products .game-block .image-box {
    height: 200px;
  }
  
  #products .game-block {
    margin-bottom: 20px;
  }

  /* Build Steps - Mobile */
  .build-steps-section {
    padding: 30px 0;
  }

  .step-item {
    padding: 20px 15px;
    margin-bottom: 15px;
  }

  .step-number {
    font-size: 28px;
    min-width: 50px;
    margin-right: 15px;
  }

  .step-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .step-content p {
    font-size: 13px;
  }

  /* Partners - Mobile */
  #partnersCarousel .slide-item .image-box {
    min-height: 60px;
    padding: 5px;
  }

  #partnersCarousel .slide-item img {
    max-height: 40px;
  }

  /* Services - Mobile */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-large,
  .service-small {
    grid-column: span 1;
    min-height: 300px;
  }

  .service-inner {
    padding: 40px 30px;
  }

  .service-content {
    max-width: 100%;
    text-align: center;
  }

  .service-content h3 {
    font-size: 26px;
  }

  .service-content p {
    font-size: 15px;
  }

  .services-section .subtitle {
    font-size: 16px;
  }

  .service-card {
    background-size: cover;
    background-position: center;
  }

  .service-card:hover {
    background-size: 105%;
  }
}

/* ========================================
   Vision Section - About Page
   ======================================== */

.vision-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 16px;
}

.vision-title-column {
  padding: 60px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.vision-heading {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: center;
  line-height: 1.2;
}

.vision-content-column {
  padding: 20px;
}

.vision-text {
  font-size: 18px;
  line-height: 1.9;
  color: #b8b8b8;
  margin: 0;
  text-align: left;
}

/* Responsive */
@media (max-width: 991px) {
  .vision-container {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 50px 20px;
  }

  .vision-title-column {
    padding: 20px;
    min-height: auto;
  }

  .vision-text {
    font-size: 17px;
  }

}

@media (max-width: 767px) {
  .vision-title-column {
    padding: 20px;
  }

  .vision-text {
    font-size: 16px;
    line-height: 1.8;
  }
}

@media (max-width: 575px) {
  .vision-text {
    font-size: 15px;
  }

  .vision-heading {
    font-size: 32px;
  }

  .vision-container {
    margin: 50px 20px;
  }
}
