/* Illustration Tile Section - What Makes Wallie Different */
.illustration-tile-section {
  padding: 4rem 0;
  background: white;
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  z-index: 1;
  clear: both;
  order: 2;
}

.illustration-tile-section .container {
  max-width: 100%;
  padding: 0;
}

.app-store-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 2.5rem;
  flex-wrap: wrap;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.app-badge:hover {
  transform: translateY(-2px);
}

.illustration-tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* Tile Base Styles - Tight fit with light green border */
.illustration-tile {
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid #A8C4B2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fcf8ef;
}

.illustration-tile:hover {
  transform: translateY(-4px);
  border-color: #8FB5A2;
  box-shadow: 0 8px 24px rgba(168, 196, 178, 0.2);
}

/* Tile Image Styling - No padding, exact fit */
.illustration-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.illustration-tile:hover img {
  transform: scale(1.02);
}

/* Specific Tile Sizes - Matched to image proportions */

/* Unlimited Photos - Square (800x800) - Takes 2x2 */
.tile-unlimited-photos {
  grid-column: span 2;
  grid-row: span 2;
  background: #fcf8ef;
}

.tile-unlimited-photos img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  padding: 0;
}

/* Living Gallery - Portrait (2:3 ratio) - Takes 2x3 */
.tile-living-gallery {
  grid-column: span 2;
  grid-row: span 3;
  background: #fcf8ef;
}

.tile-living-gallery img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  padding: 0;
}

/* iOS Phone App - Portrait (tall) - Takes 2x3 */
.tile-ios-phone {
  grid-column: span 2;
  grid-row: span 3;
  background: #fcf8ef;
}

.tile-ios-phone img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  padding: 0;
}

/* Wireless - Wide horizontal (3:1 ratio) - Takes 3x1 */
.tile-wireless {
  grid-column: span 3;
  grid-row: span 1;
  background: #FAF9F7;
}

.tile-wireless img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  padding: 0;
}

/* Battery - Wide horizontal (3:1 ratio) - Takes 3x1 */
.tile-battery {
  grid-column: span 3;
  grid-row: span 1;
  background: #FAF9F7;
}

.tile-battery img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  padding: 0;
}

/* Placeholder tiles - 2x1 each */
.tile-placeholder {
  grid-column: span 2;
  grid-row: span 1;
  background: linear-gradient(135deg, #FAF9F7 0%, #F5F3EF 100%);
  border: 2px dashed #A8C4B2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8FB5A2;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.6;
}

.tile-placeholder::after {
  content: 'Coming Soon';
}

/* Small square tiles - 1x1 */
.tile-small {
  grid-column: span 1;
  grid-row: span 1;
  background: #FAF9F7;
}

.tile-small img {
  object-fit: contain;
  padding: 0.75rem;
}

/* Medium tiles - 2x1 */
.tile-medium {
  grid-column: span 2;
  grid-row: span 1;
  background: #fcf8ef;
}

.tile-medium img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  padding: 0;
}

/* Hover Effects & Interactions */
.illustration-tile::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(168, 196, 178, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: 20px;
}

.illustration-tile:hover::after {
  opacity: 1;
}

/* Optional: Add subtle text overlays or captions */
.tile-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.illustration-tile:hover .tile-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .illustration-tiles-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 12px;
  }
  
  .tile-wireless,
  .tile-battery {
    grid-column: span 2;
  }
  
  .tile-placeholder,
  .tile-medium {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  .illustration-tiles-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 12px;
  }
  
  .tile-unlimited-photos {
    grid-column: span 2;
    grid-row: span 2;
  }
  
  .tile-living-gallery,
  .tile-ios-phone {
    grid-column: span 2;
    grid-row: span 2;
  }
  
  .tile-wireless,
  .tile-battery {
    grid-column: span 4;
    grid-row: span 1;
  }
  
  .tile-placeholder,
  .tile-medium {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .illustration-tile-section {
    padding: 4rem 0;
  }
  
  .illustration-tiles-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 1rem;
    padding: 0 1.5rem;
  }
  
  .tile-unlimited-photos,
  .tile-living-gallery,
  .tile-ios-phone,
  .tile-wireless,
  .tile-battery,
  .tile-placeholder,
  .tile-medium,
  .tile-small {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 200px;
  }
  
  .tile-living-gallery,
  .tile-ios-phone {
    min-height: 300px;
  }
  
  .illustration-tile {
    cursor: default;
    pointer-events: none;
  }
  
  .illustration-tile img {
    width: 80%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    pointer-events: none;
  }
}

@media (max-width: 480px) {
  .illustration-tile-section {
    padding: 3rem 0;
  }
  
  .illustration-tiles-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 0.75rem;
    padding: 0 1rem;
  }
  
  .tile-unlimited-photos,
  .tile-wireless,
  .tile-battery,
  .tile-living-gallery,
  .tile-ios-phone,
  .tile-placeholder,
  .tile-small,
  .tile-medium {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 180px;
  }
  
  .tile-living-gallery,
  .tile-ios-phone {
    min-height: 280px;
  }
  
  .illustration-tile {
    cursor: default;
    pointer-events: none;
  }
  
  .illustration-tile img {
    width: 80%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    pointer-events: none;
  }
}

/* Alternative Layout Option - Masonry Style */
.illustration-tiles-grid.masonry-style {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-rows: 20px;
  gap: 1.5rem;
}

.masonry-style .tile-unlimited-photos {
  grid-row: span 20;
}

.masonry-style .tile-wireless {
  grid-row: span 10;
}

.masonry-style .tile-battery {
  grid-row: span 10;
}

.masonry-style .tile-living-gallery {
  grid-row: span 30;
}

/* Accessibility */
.illustration-tile:focus {
  outline: 3px solid var(--forest-green);
  outline-offset: 4px;
}

.illustration-tile:focus:not(:focus-visible) {
  outline: none;
}

/* Print styles */
@media print {
  .illustration-tile:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }
}

