/**
 * Playground Image Showcase Styles
 */

/* =========================================================
   PLAYGROUND SECTION - Image Showcase
========================================================= */
.playground-section {
  position: relative;
  z-index: 34;
  width: 100%;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 40px 0;
  overflow: visible; /* Changed from hidden to visible to prevent cropping */
  background: transparent;
}

.playground-wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: auto;
  background: transparent;
  overflow: visible; /* Changed from hidden to visible */
  position: relative;
  padding: 0 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.playground-head {
  text-align: center;
  position: relative;
  z-index: 4;
  margin-bottom: 60px;
  flex-shrink: 0;
  padding: 0 40px;
}

.playground-head .section-title {
  color: #fff;
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 56px);
}

.playground-head .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
}

/* Image showcase container */
.playground-slider {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 60vh;
  overflow: visible; /* Changed to visible to allow hover expansion */
}

.playground-world {
  position: relative;
  width: 100%;
  min-height: 100%;
  padding: 0; /* Remove padding to allow proper centering */
}

/* Square frame container for images */
.pg-image {
  position: absolute;
  aspect-ratio: 1 / 1; /* Force square 1:1 ratio */
  width: auto; /* Will be set by JS */
  height: auto; /* Will be set by JS */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 16px; /* Frame padding around the image */
  user-select: none;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.2s ease, 
              background 0.2s ease,
              border-color 0.2s ease;
  z-index: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Inner image - also square */
.pg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  aspect-ratio: 1 / 1; /* Force square image */
}

/* Hover effect - desktop only */
@media (hover: hover) and (pointer: fine) {
  .pg-image:hover {
    transform: scale(1.5) !important; /* Increased scale for better visibility */
    opacity: 1 !important;
    z-index: 100;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.2s ease, 
                background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .pg-image {
    transition: none !important;
  }
}

/* Responsive breakpoints */
@media (max-width: 992px) {
  .playground-section {
    padding: 60px 0 30px 0;
  }
  
  .playground-wrap {
    padding: 0 20px;
  }
  
  .playground-world {
    padding: 0; /* Keep no padding for proper centering */
  }
  
  .pg-image {
    border-radius: 18px;
    padding: 14px;
  }
  
  .pg-image img {
    border-radius: 10px;
  }
}

@media (max-width: 768px) {
  .playground-section {
    padding: 50px 0 20px 0;
  }
  
  .playground-wrap {
    padding: 0 20px;
  }
  
  .playground-head {
    margin-bottom: 40px;
    padding: 0 20px;
  }
  
  .playground-head .section-title {
    font-size: clamp(28px, 4vw, 40px);
  }
  
  .playground-head .section-subtitle {
    font-size: 16px;
  }
  
  .pg-image {
    border-radius: 16px;
    padding: 12px;
  }
  
  .pg-image img {
    border-radius: 8px;
  }
  
  /* Reduce hover scale on touch devices */
  .pg-image:active {
    transform: scale(1.2) !important;
  }
}

@media (max-width: 576px) {
  .playground-section {
    padding: 40px 0 20px 0;
  }
  
  .playground-wrap {
    padding: 0 16px;
  }
  
  .playground-head {
    margin-bottom: 30px;
    padding: 0 16px;
  }
  
  .playground-head .section-title {
    font-size: clamp(24px, 6vw, 32px);
  }
  
  .playground-head .section-subtitle {
    font-size: 14px;
  }
  
  .playground-world {
    padding: 0; /* Keep no padding for proper centering */
  }
  
  .pg-image {
    border-radius: 14px;
    padding: 10px;
  }
  
  .pg-image img {
    border-radius: 6px;
  }
}
