/* ============================================
   GALLERY PAGE - PREMIUM STYLING
   Image Gallery with Sophisticated Layouts
   ============================================ */

@import url('base.css');

/* Gallery Header */
.gallery-header {
    height: 45vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #f5f3f0;
    overflow: hidden;
}

.gallery-header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(201, 168, 109, 0.03) 10px,
        rgba(201, 168, 109, 0.03) 20px
    );
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

.gallery-header-content {
    position: relative;
    z-index: 2;
}

.gallery-header .ornament {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    display: inline-block;
    opacity: 0;
    animation: fadeInDown 0.8s ease 0.2s forwards;
}

.gallery-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInDown 0.8s ease 0.4s forwards;
}

.gallery-header p {
    color: var(--cream);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 0;
    line-height: 1.8;
    font-weight: 300;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

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

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

/* Gallery Intro Section */
.gallery-intro {
    background: linear-gradient(135deg, #f5f3f0 0%, #faf8f5 100%);
    padding: 80px 0;
    text-align: center;
}

.gallery-intro-content {
    max-width: 700px;
    margin: 0 auto;
}

.gallery-intro h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 300;
    color: #0f0f0f;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
}

.gallery-intro-ornament {
    display: inline-block;
    margin-bottom: 2rem;
    color: #c9a86d;
    font-size: 2rem;
    opacity: 0;
    animation: fadeInDown 0.8s ease 0.2s forwards;
}

.gallery-intro p {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 0;
    font-weight: 300;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

/* Gallery Section */
.gallery-section {
    background: #fff;
    padding: 80px 0;
}

/* Gallery Category */
.gallery-category {
    margin-bottom: 100px;
}

.category-header {
    text-align: center;
    margin-bottom: 60px;
}

.category-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 300;
    color: #0f0f0f;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
}

.category-header p {
    font-size: 0.95rem;
    color: #666;
    font-weight: 300;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.category-ornament {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #c9a86d;
    font-size: 1.5rem;
    opacity: 0;
    animation: fadeInDown 0.8s ease 0.1s forwards;
}

/* Masonry Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(n+7) { animation-delay: 0.7s; }

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(201, 168, 109, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-overlay i {
    font-size: 2.5rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    opacity: 1;
    transform: scale(1);
}

/* Wider Gallery Items for Variety */
/* All items are now square - removed varied aspect ratios */

/* Lightbox Modal */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.3s ease;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: transparent;
    color: #c9a86d;
    border: 2px solid #c9a86d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lightbox-close:hover {
    background: #c9a86d;
    color: #0f0f0f;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(201, 168, 109, 0.8);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: #c9a86d;
    color: #0f0f0f;
    transform: scale(1.15);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #c9a86d;
    font-size: 0.9rem;
    white-space: nowrap;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }

    .gallery-item:nth-child(2n),
    .gallery-item:nth-child(3n) {
        aspect-ratio: 1;
    }

    .gallery-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .gallery-intro {
        padding: 60px 20px;
    }

    .gallery-section {
        padding: 60px 20px;
    }

    .gallery-header {
        height: 40vh;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-header p {
        font-size: 1rem;
    }

    .gallery-intro h2 {
        font-size: 2rem;
    }

    .category-header h3 {
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-item:nth-child(2n),
    .gallery-item:nth-child(3n) {
        aspect-ratio: 1;
    }
}

@media (max-width: 768px) {
    .gallery-header {
        height: 35vh;
        padding: 2rem;
    }

    .gallery-header h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .gallery-header p {
        font-size: 0.95rem;
    }

    .gallery-intro {
        padding: 50px 20px;
    }

    .gallery-intro h2 {
        font-size: 1.6rem;
    }

    .gallery-intro p {
        font-size: 0.95rem;
    }

    .gallery-section {
        padding: 50px 20px;
    }

    .category-header h3 {
        font-size: 1.5rem;
    }

    .category-header p {
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        height: 30vh;
        padding: 1rem;
    }

    .gallery-header h1 {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
        margin-bottom: 0.5rem;
    }

    .gallery-header p {
        font-size: 0.9rem;
    }

    .gallery-intro {
        padding: 40px 15px;
    }

    .gallery-intro h2 {
        font-size: 1.4rem;
    }

    .gallery-intro p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .gallery-section {
        padding: 40px 15px;
    }

    .category-header {
        margin-bottom: 40px;
    }

    .category-header h3 {
        font-size: 1.3rem;
    }

    .category-header p {
        font-size: 0.85rem;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
    }

    .gallery-overlay i {
        font-size: 2rem;
    }
}
