
/* Gallery Hero Section */
.gallery-hero {
    position: relative;
    background: linear-gradient(135deg, #FAF8F5 0%, #F5F1EB 100%);
    padding: 4rem 2rem 6rem;
    overflow: hidden;
    margin-bottom: 3rem;
  }
  
  .gallery-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, transparent 0%, #FAF8F5 100%);
    z-index: 1;
  }
  
  .hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 2rem;
  }
  
  .hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    color: #3A3632;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 3rem;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 0 1rem;
  }
  
  .hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .stat-item {
    text-align: center;
  }
  
  .stat-number {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #8BA9B5;
    line-height: 1;
  }
  
  .stat-label {
    display: block;
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
  }
  
  .stat-divider {
    width: 1px;
    height: 3rem;
    background: #E8E4DF;
  }
  
  .hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
  }
  
  .floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .floating-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(139, 169, 181, 0.1);
    animation: float 6s ease-in-out infinite;
  }
  
  .circle-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
  }
  
  .circle-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
  }
  
  .circle-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
  }
  
  @keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
  }
  
  /* Gallery Controls */
  .gallery-controls {
    background: white;
    border-bottom: 1px solid #F0EDE8;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  }
  
  .controls-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
  }
  
  /* Search Container */
  .search-container {
    flex: 1;
    min-width: 300px;
  }
  
  .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .search-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: #888;
    z-index: 1;
  }
  
  .search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    border: 2px solid #E8E4DF;
    border-radius: 50px;
    font-size: 1rem;
    background: #FAF8F5;
    transition: all 0.3s ease;
    outline: none;
  }
  
  .search-input:focus {
    border-color: #8BA9B5;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 169, 181, 0.1);
  }
  
  .search-clear {
    position: absolute;
    right: 1rem;
    width: 24px;
    height: 24px;
    border: none;
    background: #888;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
  }
  
  .search-clear:hover {
    background: #666;
  }
  
  /* Filter Tabs */
  .filter-tabs {
    display: flex;
    gap: 0.5rem;
  }
  
  .tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #E8E4DF;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
  }
  
  .tab-btn:hover {
    border-color: #8BA9B5;
    transform: translateY(-1px);
  }
  
  .tab-btn.active {
    background: #8BA9B5;
    color: white;
    border-color: #8BA9B5;
    box-shadow: 0 4px 12px rgba(139, 169, 181, 0.3);
  }
  
  .tab-icon {
    font-size: 1.1rem;
  }
  
  /* View Options */
  .view-options {
    display: flex;
    gap: 0.5rem;
  }
  
  .view-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #E8E4DF;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .view-btn:hover {
    border-color: #8BA9B5;
    transform: translateY(-1px);
  }
  
  .view-btn.active {
    background: #8BA9B5;
    border-color: #8BA9B5;
    color: white;
  }
  
  .view-btn svg {
    width: 20px;
    height: 20px;
  }
  
  /* Gallery Section */
  .gallery-section {
    padding: 2rem 0;
  }
  
  .gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
  }
  
  /* Masonry Layout */
  .gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start; /* Allow items to have different heights */
  }
  
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    break-inside: avoid;
    display: flex;
    flex-direction: column;
    min-height: 200px;
  }
  
  .gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  }
  
  .gallery-item img {
    width: 100%;
    height: 0;
    flex: 1;
    min-height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
  }
  
  .gallery-item:hover img {
    transform: scale(1.05);
  }
  
  .gallery-item-info {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(250,248,245,0.95) 100%);
    backdrop-filter: blur(10px);
  }
  
  .gallery-item-prompt {
    font-size: 0.95rem;
    color: #3A3632;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .gallery-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 1rem;
  }
  
  .gallery-item-date {
    font-weight: 500;
  }
  
  .gallery-item-heart {
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
  }
  
  .gallery-item-heart:hover {
    color: #e74c3c;
    transform: scale(1.2);
  }
  
  .gallery-item-heart.liked {
    color: #e74c3c;
  }
  
  /* Loading States */
  .gallery-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    text-align: center;
  }
  
  .loading-spinner {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
  }
  
  .spinner-ring {
    width: 12px;
    height: 12px;
    border: 2px solid #E8E4DF;
    border-top: 2px solid #8BA9B5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  .spinner-ring:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  .spinner-ring:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  .loading-text {
    color: #666;
    font-size: 1.1rem;
    font-weight: 300;
  }
  
  /* Gallery End */
  .gallery-end {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
  }
  
  .end-content {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .end-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }
  
  .end-content h3 {
    color: #3A3632;
    margin-bottom: 1rem;
    font-weight: 300;
  }
  
  .end-content p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
  }
  
  /* Infinite Scroll Sentinel */
  .scroll-sentinel {
    grid-column: 1 / -1;
    height: 100px;
    margin: 2rem 0;
  }
  
  /* Responsive Design */
  @media (max-width: 1024px) {
    .gallery-masonry {
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 1.5rem;
    }
  
    .controls-container {
      padding: 1.5rem;
      gap: 1rem;
    }
  
    .search-container {
      min-width: 250px;
    }
  }
  
  @media (max-width: 768px) {
    .gallery-hero {
      padding: 3rem 1rem 4rem;
    }
  
    .hero-content {
      padding: 0 1rem;
    }
  
    .hero-title {
      font-size: 2.5rem;
    }
  
    .hero-subtitle {
      font-size: 1.1rem;
      padding: 0;
      text-align: center;
    }
  
    .hero-stats {
      flex-direction: column;
      gap: 1rem;
    }
  
    .stat-divider {
      display: none;
    }
  
    .controls-container {
      flex-direction: column;
      align-items: stretch;
    }
  
    .filter-tabs {
      justify-content: center;
      flex-wrap: wrap;
    }
  
    .view-options {
      justify-content: center;
    }
  
    .gallery-masonry {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 1rem;
    }
  
    .gallery-item {
      min-height: 120px;
    }
  
    .gallery-item img {
      height: 120px;
    }
  
    .gallery-container {
      padding: 0 1rem;
    }
  }
  
  @media (max-width: 480px) {
    .gallery-masonry {
      grid-template-columns: 1fr;
    }
  
    .gallery-item {
      min-height: 150px;
    }
  
    .gallery-item img {
      height: 150px;
    }
  
    .gallery-item-info {
      padding: 1rem;
    }
  
    .hero-title {
      font-size: 2rem;
    }
  
    .hero-subtitle {
      font-size: 1rem;
      line-height: 1.7;
    }
  }
  
  /* Lightbox styles */
  .lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    cursor: pointer;
  }
  
  .lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .lightbox-image {
    max-height: 70vh;
    max-width: 60vw;
    object-fit: contain;
  }
  
  .lightbox-info {
    padding: 2rem;
    min-width: 300px;
    background: white;
  }
  
  .lightbox-title {
    margin: 0 0 1rem 0;
    color: #3A3632;
  }
  
  .lightbox-meta {
    margin-bottom: 1rem;
  }
  
  .lightbox-date {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
  }
  
  .lightbox-prompt {
    font-size: 0.9rem;
    color: #333;
    font-style: italic;
  }
  
  .lightbox-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }
  
  .lightbox-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .lightbox-btn:hover {
    border-color: #8BA9B5;
  }
  
  .lightbox-btn.primary {
    background: #8BA9B5;
    color: white;
    border-color: #8BA9B5;
  }
  
  .lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 1001;
  }
  
  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 1001;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  @media (max-width: 768px) {
    .gallery-controls {
      flex-direction: column;
      align-items: stretch;
    }
  
    .gallery-filters {
      justify-content: center;
    }
  
    .gallery-grid {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 1rem;
    }
  
    .lightbox-content {
      flex-direction: column;
      max-width: 95vw;
      max-height: 95vh;
    }
  
    .lightbox-image {
      max-width: 100%;
      max-height: 50vh;
    }
  
    .lightbox-info {
      padding: 1rem;
      min-width: auto;
    }
  }