/* Photography Page Styles - Fluid SPA Architecture */

/* ==========================================
   DESIGN TOKENS
   ========================================== */
:root {
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Animation timings */
  --anim-fast: 0.2s;
  --anim-normal: 0.35s;
  --anim-slow: 0.5s;
  --anim-stagger: 0.06s;
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================
   PAGE ENTRY ANIMATION
   ========================================== */
body {
  animation: pageEnter 0.6s var(--ease-out);
}

@keyframes pageEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================
   HERO SECTION - Minimalist, Centered
   ========================================== */
.photos-hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md) var(--spacing-xl);
  position: relative;
  /* Reduced top padding since we are centered in smaller height */
  padding-top: var(--spacing-xl); 
}

/* Remove old background/overlay styles */
.photos-hero::before,
.photos-hero-bg {
  display: none;
}

.photos-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  /* Use global text color instead of forced white */
  color: var(--text-primary); 
}

.photos-hero h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 300;
  line-height: 1;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  /* Removed text-shadow for cleaner look */
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 0.8s var(--ease-out) 0.2s forwards;
}

/* Hero subtitle with crossfade animation */
.photos-hero-subtitle {
  font-family: "Manrope", sans-serif; /* Matched from plan */
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.5;
  margin: 0 auto var(--spacing-lg); /* Center with auto margins */
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s var(--ease-out) 0.35s forwards;
  transition: opacity var(--anim-normal) var(--ease-out);
}

.photos-hero-subtitle.changing {
  opacity: 0;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   TAB NAVIGATION - Pill Style
   ========================================== */
.photos-tabs {
  display: inline-flex;
  gap: 0.5rem;
  /* Use global tertiary background for tabs container */
  background: var(--bg-tertiary);
  backdrop-filter: blur(10px);
  padding: 0.25rem;
  border-radius: 99px; /* Fully rounded */
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeIn 0.8s var(--ease-out) 0.5s forwards;
  margin-top: var(--spacing-md);
}

.photos-tab {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 99px; /* Rounded pill */
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--anim-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.photos-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text-primary);
  opacity: 0;
  transition: opacity var(--anim-normal) var(--ease-out);
  border-radius: inherit;
}

.photos-tab:hover {
  color: var(--text-primary);
}

.photos-tab:hover::before {
  opacity: 0.05;
}

.photos-tab.active {
  background: var(--bg-primary);
  opacity: 1;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.photos-tab.active::before {
  opacity: 0;
}

.photos-tab .icon {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform var(--anim-normal) var(--ease-spring);
}

.photos-tab:hover .icon {
  transform: scale(1.1);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  animation: bounce 2s infinite 1.5s;
  opacity: 0;
}

.scroll-indicator.visible {
  opacity: 1;
  transition: opacity 0.5s ease 1s;
}

.scroll-indicator .icon {
  width: 1.5rem;
  height: 1.5rem;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ==========================================
   VIEW CONTAINERS - Animated Show/Hide
   ========================================== */
.photos-views {
  position: relative;
  min-height: 50vh;
  /* Add transition for height if we were using JS to set it, but for now we rely on content */
}

.photos-view {
  /* Use absolute positioning for crossfade, then switch to relative */
  /* Actually, to avoid jump we need to keep them in flow but hide securely */
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--anim-normal) var(--ease-out), transform var(--anim-normal) var(--ease-out);
}

.photos-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInView 0.5s var(--ease-out);
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   FAVORITES VIEW - Featured Photos
   ========================================== */
.featured-section {
  padding: var(--spacing-xl) 0;
  background: var(--bg-primary);
}

.featured-header {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 800px;
  margin: 0 auto;
}

.featured-header h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  margin-bottom: var(--spacing-sm);
  opacity: 0;
  transform: translateY(25px);
  transition: all 0.7s var(--ease-out);
}

.featured-header h2.visible {
  opacity: 1;
  transform: translateY(0);
}

.featured-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.7s var(--ease-out) 0.15s;
}

.featured-header p.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Featured photo cards */
.featured-photo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  padding: var(--spacing-lg) var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto var(--spacing-xl);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.featured-photo.visible {
  opacity: 1;
  transform: translateY(0);
}

.featured-photo:nth-child(odd) {
  flex-direction: row;
}

.featured-photo:nth-child(even) {
  flex-direction: row-reverse;
}

.featured-photo-image {
  flex: 1.5;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
  max-height: calc(100vh - 80px - 10vh);
}

.featured-photo-image:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-xl);
}

.featured-photo-image img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: scale(1.08);
  filter: blur(10px);
  transition: opacity 0.8s var(--ease-out), transform 1s var(--ease-out),
    filter 0.8s var(--ease-out);
}

.featured-photo-image.visible img,
.featured-photo-image img.loaded {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.featured-photo-image:hover img {
  transform: scale(1.03);
}

.featured-photo-content {
  flex: 1;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* Center align */
  text-align: center;
}

.featured-photo-content h3 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 400;
  margin-bottom: var(--spacing-md);
  opacity: 0;
  transform: translateX(25px);
  transition: all 0.7s var(--ease-out) 0.2s;
  width: 100%;
  text-align: center;
}

.featured-photo:nth-child(even) .featured-photo-content h3 {
  transform: translateX(-25px);
}

.featured-photo-content h3.visible,
.featured-photo:nth-child(even) .featured-photo-content h3.visible {
  opacity: 1;
  transform: translateX(0);
}

.featured-photo-content p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.7s var(--ease-out) 0.35s;
  width: 100%;
  text-align: center;
}

.featured-photo-content p.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 968px) {
  .featured-photo,
  .featured-photo:nth-child(odd),
  .featured-photo:nth-child(even) {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .featured-photo-image {
    width: 100%;
  }

  .featured-photo-content {
    padding: var(--spacing-sm) 0;
    text-align: center;
  }

  .featured-photo-content h3,
  .featured-photo:nth-child(even) .featured-photo-content h3 {
    transform: translateY(20px);
  }
}

/* ==========================================
   ALBUMS VIEW
   ========================================== */
.album-list-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
}

#album-list {
  display: block;
  column-count: 3;
  column-gap: 24px;
}

.album-item {
  position: relative;
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* When expanded, break the grid flow and take full width */
.album-item.expanded {
  grid-column: 1 / -1;
  margin: 20px 0;
  box-shadow: var(--shadow-xl);
  z-index: 10;
  transform: scale(1.00); /* Reset scale */
}

.album-item:hover:not(.expanded) {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.album-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered album entrance */
.album-item:nth-child(1) { transition-delay: 0s; }
.album-item:nth-child(2) { transition-delay: 0.05s; }
.album-item:nth-child(3) { transition-delay: 0.1s; }
.album-item:nth-child(4) { transition-delay: 0.15s; }
.album-item:nth-child(5) { transition-delay: 0.2s; }

/* Album Header - Clean, vertical layout for cards */
.album-header {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

/* Cover Wrapper - Pure Image, No Cropping */
.album-cover-wrapper {
  width: 100%;
  background: #000;
  line-height: 0;
}

.album-cover-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain; 
}

/* Info Section */
.album-info {
  padding: 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.album-title {
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: var(--text-primary);
}

.album-title .expand-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.album-item.expanded .album-title .expand-icon {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.album-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.album-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-top: 4px;
}

/* 


.album-photo-item {
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  break-inside: avoid;
  transition: transform 0.2s ease;
}

.album-photo-item:not(:last-child) {
  margin-bottom: 16px;
}

.album-photo-item img {
  width: 100%;
  display: block;
  border-radius: 8px;
  transition: transform 0.3s var(--ease-out);
}

.album-photo-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Responsive Columns */
@media (max-width: 1100px) {
  #album-list {
    column-count: 2;
  }
  .album-photos-grid {
    column-count: 3;
  }
}

@media (max-width: 650px) {
  #album-list {
    column-count: 1;
  }
  .album-photos-grid {
    column-count: 2;
  }
}

/* ==========================================
   LIGHTBOX - Side panel layout
   ========================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px); /* Add blur to backdrop */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--anim-normal) var(--ease-out),
    visibility 0s var(--anim-normal);
  padding: 80px 100px;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--anim-normal) var(--ease-out), visibility 0s 0s;
}

.lightbox-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  max-width: 100%;
  max-height: 100%;
  transform: scale(0.95);
  opacity: 0;
  transition: transform var(--anim-slow) var(--ease-spring),
    opacity var(--anim-normal) var(--ease-out);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
  opacity: 1;
}

.lightbox-image-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(100vh - 160px);
  /* Prevent layout shift by reserving space */
  min-height: 200px;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: 100%; /* Full width on mobile by default */
  max-width: 1200px; /* Cap width on large screens */
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transition: opacity var(--anim-normal) var(--ease-out);
}

@media (min-width: 1025px) {
  .lightbox-image {
    width: 80%; /* Restore user preference for desktop */
    max-height: calc(100vh - 120px);
  }
}

/* Lightbox info panel - hidden until active to prevent jump */
/* Lightbox info panel */
.lightbox-info {
  align-items: center;
  flex-shrink: 0;
  width: 320px; /* Slightly wider for better text fit */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-self: center; /* Center vertically relative to image */
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(20px);
  transition: all var(--anim-normal) var(--ease-out) 0.1s;
}

.lightbox.active .lightbox-info {
  opacity: 1;
  transform: translateX(0);
}

.lightbox-caption {
  color: white;
}

.lightbox-caption h3 {
  font-family: "Fraunces", serif;
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 var(--spacing-sm);
  color: white;
  line-height: 1.3;
}

.lightbox-caption p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.6;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  padding: 0.625rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

 .lightbox-actions {
   position: absolute;
   top: 24px;
   right: 24px;
   display: flex;
   align-items: center;
   gap: 12px;
   z-index: 10;
 }

 .lightbox-close,
 .lightbox-download {
   position: relative; /* Reset absolute positioning */
   top: auto;
   right: auto;
   background: rgba(255, 255, 255, 0.1);
   backdrop-filter: blur(12px);
   border: 1px solid rgba(255, 255, 255, 0.15);
   color: white;
   width: 48px;
   height: 48px;
   border-radius: 50%;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all var(--anim-normal) var(--ease-out);
 }

 .lightbox-close:hover,
 .lightbox-download:hover {
   background: rgba(255, 255, 255, 0.2);
   transform: scale(1.1);
 }

 .lightbox-close:hover {
   transform: rotate(90deg);
 }

 .lightbox-close .icon,
 .lightbox-download .icon {
   width: 1.25rem;
   height: 1.25rem;
 }

.lightbox-nav {
  z-index: 10000;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 56px; /* Slightly larger targets */
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--anim-normal) var(--ease-out);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.prev:hover {
  transform: translateY(-50%) translateX(-4px) scale(1.1);
}

.lightbox-nav.next {
  right: 32px; /* More spacing */
}

.lightbox-nav.next:hover {
  transform: translateY(-50%) translateX(4px) scale(1.1);
}

.lightbox-nav .icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* ==========================================
   LOADING & EMPTY STATES
   ========================================== */
.photo-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text-secondary);
  gap: var(--spacing-md);
}

.photo-loading .spinner {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.photos-empty {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
}

.photos-empty .icon {
  width: 5rem;
  height: 5rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.3;
}

.photos-empty h3 {
  margin-bottom: var(--spacing-sm);
  font-weight: 400;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .lightbox {
    padding: 0; /* Full screen on mobile/tablet */
  }

  .lightbox-content {
    flex-direction: column;
    gap: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
  }

  .lightbox-image-wrapper {
    flex: 1;
    max-height: none;
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox-image {
    max-height: 100%; /* Fit within wrapper */
    max-width: 100%;
    width: auto;
    object-fit: contain;
    box-shadow: none;
  }

  .lightbox-info {
    width: 100%;
    max-width: none;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    /* Use relative positioning to reserve space and prevent overlap */
    position: relative; 
    transform: translateY(100%); /* Start pushed down */
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0; /* Don't shrink */
    z-index: 10;
  }

  .lightbox.active .lightbox-info {
    transform: translateY(0); /* Slide up into reserved space */
  }

  .lightbox-counter {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  .photos-hero {
    padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-xl);
    padding-top: calc(80px + var(--spacing-lg));
    min-height: 40vh; /* Match desktop change */
  }

  .photos-tabs {
    width: 100%;
    /* Keep row layout */
  }

  .photos-tab {
    justify-content: center;
    flex: 1; /* Distribute space evenly */
  }

  .lightbox {
    padding: 60px 16px;
  }

  /* Hide buttons on mobile in favor of gestures */
  .lightbox-nav {
    display: none;
  }

  .lightbox-actions {
    top: 12px;
    right: 12px;
    gap: 8px;
  }

  .lightbox-close,
  .lightbox-download {
    width: 44px;
    height: 44px;
  }

  .lightbox-caption h3 {
    font-size: 1.25rem;
  }

  .lightbox-caption p {
    font-size: 0.9rem;
  }

  .featured-photo-image {
    border-radius: var(--radius-lg);
  }

  .album-item {
    border-radius: var(--radius-lg);
  }

  .album-photo-item {
    border-radius: var(--radius-md);
  }
}
/* ==========================================
   ALBUM VIEWER OVERLAY
   ========================================== */
/* ==========================================
   ALBUM VIEWER OVERLAY
   ========================================== */
.album-viewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 10, 0.85); /* Dark semi-transparent background */
  backdrop-filter: blur(20px); /* Heavy blur for immersion */
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0s 0.4s;
  padding: 0;
  /* Scrollbar styling for the viewer */
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.album-viewer::-webkit-scrollbar {
  width: 8px;
}
.album-viewer::-webkit-scrollbar-track {
  background: transparent;
}
.album-viewer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.album-viewer::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.album-viewer.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s var(--ease-out);
}

.album-viewer-header {
  width: 100%; /* Full width background */
  display: flex;
  justify-content: center; /* Center the inner content */
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0; /* Vertical padding only, horizontal handled by inner */
  margin-bottom: 40px;
  transition: padding 0.3s ease;
}

.album-viewer-header-content {
  width: 100%;
  max-width: 1600px;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.album-viewer-title-group {
    flex: 1;
}

.album-viewer-title-group h2 {
  font-family: "Fraunces", serif;
  font-size: 2.5rem;
  margin-bottom: 8px;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.album-viewer-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  max-width: 800px;
  line-height: 1.6;
}

.album-viewer-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-left: 20px;
}

.album-viewer-close:hover {
  background: white;
  color: black;
  transform: rotate(90deg) scale(1.1);
}

.album-viewer-content {
    padding: 0 var(--spacing-md) 80px;
}

.album-viewer-grid {
  max-width: 1600px;
  margin: 0 auto;
  column-count: 3;
  column-gap: 24px;
}

/* Photo Item Styles */
.album-viewer-grid .album-photo-item {
  margin-bottom: 24px;
  width: 100%;
  break-inside: avoid;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: albumItemReveal 0.6s var(--ease-out) forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.album-viewer-grid .album-photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    z-index: 2;
}

.album-viewer-grid .album-photo-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  transition: transform 0.5s ease;
}

.album-viewer-grid .album-photo-item:hover img {
    transform: scale(1.03);
}

@keyframes albumItemReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
  .album-viewer-grid { column-count: 2; }
}

@media (max-width: 768px) {
  .album-viewer-grid { column-count: 1; }
  .album-viewer-header { padding: 16px; flex-direction: row; align-items: center; }
  .album-viewer-title-group h2 { font-size: 1.75rem; }
  .album-viewer-description { font-size: 0.95rem; display: none; /* Hide desc on mobile for space */ }
  .album-viewer-close { width: 40px; height: 40px; }
}
