/* Gallery */
.gallery-section {
  padding: 4rem 2rem;
  background: #f8fafc;
  min-height: calc(100vh - 80px);
}

/* Pool Types Section */
.pool-types-section {
  margin-bottom: 4rem;
}

.pool-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.pool-type-card-centered:nth-child(5) {
  grid-column: 2 / 3;
}

.pool-type-card-centered:nth-child(6) {
  grid-column: 3 / 4;
}

.pool-type-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.pool-type-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  border-color: #0066cc;
}

.pool-type-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pool-type-image {
  width: 100%;
  max-width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.pool-type-card h3 {
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 1rem;
  font-weight: 700;
}

.pool-type-card p {
  color: #666;
  line-height: 1.6;
  font-size: 1rem;
}

/* Section Divider */
.section-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, #0066cc, transparent);
  margin: 4rem 0;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #0066cc;
  border-radius: 50%;
}

.section-divider::before {
  left: 20%;
}

.section-divider::after {
  right: 20%;
}

/* Inspiration Section */
.inspiration-section {
  margin-top: 4rem;
}

.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Card with 3D Flip Effect - From Uiverse.io by gharsh11032000 */
.card {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #f2f2f2;
  border-radius: 10px;
  overflow: hidden;
  perspective: 1000px;
  box-shadow: 0 0 0 5px #ffffff80;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.card__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
}

.card__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  background-color: #f2f2f2;
  transform: rotateX(-90deg);
  transform-origin: bottom;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
}

.card:hover .card__content {
  transform: rotateX(0deg);
}

.card__title {
  margin: 0;
  font-size: 24px;
  color: #333;
  font-weight: 700;
}

.card__type {
  margin: 5px 0 0 0;
  font-size: 12px;
  color: #0066cc;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card__description {
  margin: 10px 0 0;
  font-size: 14px;
  color: #777;
  line-height: 1.4;
}


/* Loading State */
.card.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .pool-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pool-type-card-centered:nth-child(5),
  .pool-type-card-centered:nth-child(6) {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 3rem 1rem;
  }

  .pool-types-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pool-type-card-centered:nth-child(5),
  .pool-type-card-centered:nth-child(6) {
    grid-column: 1 / -1;
  }

  .inspiration-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .card {
    aspect-ratio: 4/3;
  }

  .card__title {
    font-size: 1.25rem;
  }

  .card__description {
    font-size: 0.85rem;
  }

  .section-divider {
    margin: 3rem 0;
  }
}
