
/* Squarespace Photo Portfolio Styles */
/* Inherits typography and base colors from Squarespace theme */

/* Profile Styles */
.ssphoto-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--background, #ffffff);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ssphoto-profile-avatar {
  flex-shrink: 0;
}

.ssphoto-profile-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.ssphoto-profile-content {
  flex: 1;
}

.ssphoto-profile-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color, #000000);
}

.ssphoto-profile-bio {
  margin: 0 0 1rem 0;
  color: var(--text-color-light, #666666);
  line-height: 1.5;
}

.ssphoto-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ssphoto-link {
  color: var(--accent-color, #007cba);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.ssphoto-link:hover,
.ssphoto-link:focus {
  color: var(--accent-color-hover, #005a87);
  text-decoration: underline;
}

/* Gallery Common Styles */
.ssphoto-gallery-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color, #000000);
}

.ssphoto-gallery-description {
  margin: 0 0 1.5rem 0;
  color: var(--text-color-light, #666666);
  line-height: 1.5;
}

/* Slideshow Styles */
.ssphoto-slideshow {
  margin: 2rem 0;
}

.ssphoto-slideshow-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
  aspect-ratio: 16/10;
}

.ssphoto-slideshow-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ssphoto-slide {
  flex: 0 0 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ssphoto-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.ssphoto-slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.ssphoto-slide:hover .ssphoto-slide-caption {
  transform: translateY(0);
}

.ssphoto-slide-caption h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.ssphoto-slide-caption p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.4;
}

/* Navigation Controls */
.ssphoto-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.ssphoto-nav:hover,
.ssphoto-nav:focus {
  background: rgba(0, 0, 0, 0.8);
  outline: 2px solid var(--accent-color, #007cba);
  outline-offset: 2px;
}

.ssphoto-nav-prev {
  left: 1rem;
}

.ssphoto-nav-next {
  right: 1rem;
}

/* Dots Navigation */
.ssphoto-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ssphoto-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ssphoto-dot.active,
.ssphoto-dot:hover,
.ssphoto-dot:focus {
  background: var(--accent-color, #007cba);
  outline: 2px solid var(--accent-color, #007cba);
  outline-offset: 2px;
}

/* Mosaic Styles */
.ssphoto-mosaic {
  margin: 2rem 0;
}

.ssphoto-mosaic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.ssphoto-mosaic-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #f5f5f5;
}

.ssphoto-mosaic-item:hover,
.ssphoto-mosaic-item:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  outline: 2px solid var(--accent-color, #007cba);
  outline-offset: 2px;
}

.ssphoto-mosaic-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ssphoto-mosaic-item:hover img {
  transform: scale(1.05);
}

.ssphoto-mosaic-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 2rem 1rem 1rem;
  font-weight: 500;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.ssphoto-mosaic-item:hover .ssphoto-mosaic-caption {
  transform: translateY(0);
}

/* Lightbox Styles */
.ssphoto-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
  box-sizing: border-box;
}

.ssphoto-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ssphoto-lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.ssphoto-lightbox-close:hover,
.ssphoto-lightbox-close:focus {
  opacity: 0.7;
  outline: 2px solid white;
  border-radius: 4px;
}

.ssphoto-lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.ssphoto-lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 1rem;
  max-width: 600px;
}

.ssphoto-lightbox-caption h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.ssphoto-lightbox-caption p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

/* Error States */
.ssphoto-error {
  padding: 1rem;
  background: #fee;
  color: #c33;
  border: 1px solid #fcc;
  border-radius: 4px;
  margin: 1rem 0;
  text-align: center;
}

/* Loading States */
.ssphoto-profile:not(.ssphoto-profile-loaded),
.ssphoto-slideshow:not(.ssphoto-gallery-loaded),
.ssphoto-mosaic:not(.ssphoto-gallery-loaded) {
  opacity: 0.7;
  position: relative;
}

.ssphoto-profile:not(.ssphoto-profile-loaded)::after,
.ssphoto-slideshow:not(.ssphoto-gallery-loaded)::after,
.ssphoto-mosaic:not(.ssphoto-gallery-loaded)::after {
  content: 'Loading...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--text-color-light, #666666);
}

/* Responsive Design */
@media (max-width: 768px) {
  .ssphoto-profile {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .ssphoto-profile-avatar img {
    width: 100px;
    height: 100px;
  }
  
  .ssphoto-slideshow-container {
    aspect-ratio: 4/3;
  }
  
  .ssphoto-nav {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .ssphoto-nav-prev {
    left: 0.5rem;
  }
  
  .ssphoto-nav-next {
    right: 0.5rem;
  }
  
  .ssphoto-mosaic-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
  }
  
  .ssphoto-mosaic-item img {
    height: 150px;
  }
  
  .ssphoto-lightbox {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .ssphoto-profile {
    padding: 1rem;
  }
  
  .ssphoto-slideshow-container {
    aspect-ratio: 1/1;
  }
  
  .ssphoto-mosaic-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
  }
  
  .ssphoto-mosaic-item img {
    height: 120px;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .ssphoto-slideshow-track,
  .ssphoto-slide img,
  .ssphoto-slide-caption,
  .ssphoto-mosaic-item,
  .ssphoto-mosaic-item img,
  .ssphoto-mosaic-caption,
  .ssphoto-nav,
  .ssphoto-dot {
    transition: none;
  }
}

/* Focus visible for better keyboard navigation */
@media (pointer: coarse) {
  .ssphoto-nav,
  .ssphoto-dot {
    width: 44px;
    height: 44px;
  }
}
