/**
 * What's Inside Section Styles
 * For the WoMoGuide sales page template
 */

/* Main section container */
.product-whats-inside-section {
  margin: 60px 0;
  padding: 40px 0;
  background-color: #f9f9f9;
  border-radius: 12px;
}

/* Two-column layout container */
.whats-inside-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 30px;
}

/* Left column with content */
.whats-inside-content {
  flex: 1 1 500px;
}

/* Right column with image */
.whats-inside-image {
  flex: 0 1 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whats-inside-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Section title */
.product-whats-inside-section .section-title {
  font-size: 2em;
  margin-bottom: 20px;
  color: #333;
}

/* Section intro text */
.product-whats-inside-section .section-intro {
  margin-bottom: 30px;
  font-size: 1.1em;
  line-height: 1.6;
}

/* Feature list styling */
.product-whats-inside-section .feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-whats-inside-section .whats-inside-item {
  display: flex;
  flex-direction: row;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

.product-whats-inside-section .whats-inside-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Icon styling */
.product-whats-inside-section .feature-icon {
  flex: 0 0 40px;
  height: 40px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f7ff;
  color: #0066cc;
  border-radius: 50%;
  font-size: 18px;
}

/* Content styling */
.product-whats-inside-section .feature-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
}

.product-whats-inside-section .feature-text-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.product-whats-inside-section .feature-text {
  flex: 1;
}

.product-whats-inside-section .feature-thumbnail {
  flex: 0 0 150px;
  width: 150px;
  height: auto;
  margin-left: 20px;
  border-radius: 6px;
  overflow: hidden;
}

.product-whats-inside-section .feature-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Media indicator badge */
.product-whats-inside-section .feature-media-indicator {
  margin: 10px;
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  pointer-events: none;
}

.product-whats-inside-section .media-badge {
  display: inline-block;
  padding: 3px 8px;
  background-color: #e6f2ff;
  color: #0066cc;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 500;
  margin-right: 5px;
}

.product-whats-inside-section .group-label {
  padding: 15px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
}

.product-whats-inside-section .group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 18px;
  color: #0066cc;
}

.product-whats-inside-section .group-title {
  flex: 1;
  margin: 0;
}

.product-whats-inside-section .feature-title {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-whats-inside-section .feature-description {
  font-size: 0.95em;
  color: #666;
  line-height: 1.5;
}

.feature-icon {
  margin-right: 10px;
  color: #0066cc;
  font-size: 1.2em;
  display: flex;
  align-items: center;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Gallery/Carousel section */
.whats-inside-gallery {
  margin-top: 2rem;
  position: relative;
}

/* Gallery Cards Layout - Pure Flexbox (No Carousel) */
.gallery-flexbox {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.5rem 0;
  justify-content: flex-start;
}

/* Gallery Item Groups */
.gallery-item-group {
  flex: 1 1 150px;
  max-width: calc(33.333% - 1rem); /* Show 3 cards per row on desktop */
  min-width: 280px; /* Ensure minimum width for mobile */
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .gallery-item-group {
    max-width: calc(50% - 1rem); /* Show 2 cards per row on tablets */
  }
}

@media (max-width: 768px) {
  /* Restyle cards as horizontal list items on mobile */
  .gallery-item-group {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff;
  }

  /* Content container (left side) */
  .gallery-item-group .content-container {
    flex: 1;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
  }

  /* Group label (title) */
  .gallery-item-group .group-label {
    order: 1;
    padding: 0 0 8px 0;
    background-color: transparent;
    border-bottom: none;
  }

  /* Group caption (description) - Mobile */
  .gallery-item-group .group-caption-mobile {
    order: 2;
    text-align: left;
    padding: 0;
    font-size: 0.9rem;
    color: #666;
    display: block;
    margin-top: 8px;
    line-height: 1.4;
  }

  /* Hide desktop caption on mobile */
  .gallery-item-group .group-caption-desktop {
    display: none;
  }

  /* Media container (right side) */
  .gallery-item-group .group-media-items {
    flex: 0 0 150px; /* Increased from 120px to 150px */
    height: 150px; /* Increased from 120px to 150px */
    order: 3;
  }

  /* Media item */
  .gallery-item-group .media-item {
    width: 150px; /* Increased from 120px to 150px */
    height: 150px; /* Increased from 120px to 150px */
  }

  /* Make the whole layout vertical */
  .gallery-flexbox {
    flex-direction: column;
    gap: 12px;
  }

  /* Ensure images maintain aspect ratio */
  .gallery-item-group .media-item img,
  .gallery-item-group .video-thumbnail {
    width: 150px; /* Increased from 120px to 150px */
    height: 150px; /* Increased from 120px to 150px */
    object-fit: cover;
    border-radius: 6px;
  }

  /* Make the whole card clickable */
  .gallery-item-group {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .gallery-item-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  /* Adjust badge position for mobile */
  .gallery-item-group .media-badge {
    font-size: 0.7rem;
    margin-top: 5px;
  }

  /* Adjust feature media indicator position */
  .gallery-item-group .feature-media-indicator {
    margin-top: 8px;
  }

  /* Adjust play button size for mobile */
  .gallery-item-group .media-overlay {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* Group title styling */
  .gallery-item-group .group-title {
    font-size: 1rem;
    margin: 0;
  }

  /* Reduce vertical spacing between items */
  .gallery-item-group {
    margin: 2px 15px 2px 15px;
    max-width: 95%;
  }
}

.gallery-item-group:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.group-label {
  padding: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eaeaea;
}

.group-title-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0; /* Remove gap to use margin-right instead */
}

.group-icon {
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  vertical-align: middle;
}

.group-title {
  flex: 1;
}

.group-media-items {
  display: flex;
  width: 100%;
  overflow: hidden; /* Ensure content doesn't overflow */
  position: relative;
  aspect-ratio: 3/2; /* Enforce 3:2 aspect ratio */
}

/* Media overlay styles */
.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 3;
}

/* Removed hover-only visibility */

.media-overlay.video-overlay {
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 1 !important;
}

.media-icon {
  font-size: 2rem;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Removed redundant loupe hover effect */

/* Desktop caption styling */
.group-caption-desktop {
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  color: #495057;
  display: block;
}

/* Mobile caption is hidden on desktop */
@media (min-width: 769px) {
  .group-caption-mobile {
    display: none;
  }

  .group-caption-desktop {
    display: block;
  }
}

/* Individual Gallery Items */
.gallery-item {
  flex: 1;
  width: 100%;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-item:hover {
  transform: translateY(-3px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.media-type-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 3px;
  font-weight: bold;
}

/* Video thumbnail styling */
.video-thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.play-button {
  position: absolute;
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #cc0000;
  z-index: 2;
  transition: transform 0.2s ease;
}

.gallery-item:hover .play-button {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.9);
}

.video-placeholder {
  width: 100%;
  height: 100%;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2em;
}

/* Gallery controls */
.gallery-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  transform: translateY(-50%);
  pointer-events: none;
}

.gallery-prev,
.gallery-next {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.gallery-prev:hover,
.gallery-next:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

/* Hidden elements */
.hidden {
  display: none;
}

/* Spinner animation kept for potential reuse */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* GLightbox will handle all lightbox functionality */

/* Responsive styles */
@media (max-width: 768px) {
  .whats-inside-container {
    flex-direction: column;
  }

  .whats-inside-image {
    order: -1;
    margin-bottom: 20px;
  }

  .gallery-item {
    flex: 0 0 200px;
  }

  /* Lightbox caption styles removed - GLightbox handles this */
}

@media (max-width: 480px) {
  .product-whats-inside-section {
    padding: 30px 15px;
  }

  .gallery-item {
    flex: 0 0 180px;
    height: 120px;
  }

  /* Lightbox mobile styles removed - GLightbox handles responsive behavior */

  /* All lightbox navigation styles removed - GLightbox handles this functionality */
}

/* All lightbox navigation button styles removed - GLightbox handles this functionality */

/* Updated What's Inside Layout */
@media (min-width: 768px) {
  /* Desktop: Flexbox card layout */
  .gallery-carousel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
  }

  .gallery-item-group {
    flex: 0 0 calc(50% - 20px); /* Change to 50% width for better layout */
    margin-bottom: 20px;

    transition: transform 0.2s ease;
  }

  .gallery-item-group:hover {
    transform: translateY(-5px);
  }

  /* Hide list view on desktop */
  .whats-inside-items {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Mobile: List with thumbnails */
  .whats-inside-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .whats-inside-item .feature-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .whats-inside-item .feature-text-wrapper {
    display: flex;
    flex-direction: column;
  }

  .whats-inside-item .feature-title {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
  }

  .whats-inside-item .feature-icon {
    display: flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .whats-inside-item .feature-icon svg {
    width: 24px;
    height: 24px;
  }

  .whats-inside-item .feature-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-left: 15px;
    flex-shrink: 0;
  }

  .whats-inside-item .feature-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
