/* Custom styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400&family=Playfair+Display:wght@400;600&family=Merriweather:wght@300;400;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Title */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    text-align: center;
    color: #1a1a1a;
}

.intro-text {
    font-family: 'Lora', serif;
    font-size: 20px;
    max-width: 900px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
    text-align: center;
    color: #2a2a2a;
    letter-spacing: 0.01em;
}

/* Hide hover instruction on mobile */
.hover-instruction {
    display: none;
}

@media (min-width: 1280px) {
    .hover-instruction {
        display: block;
        margin-top: 1rem;
        font-style: italic;
        color: #666;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
        padding: 0 1rem;
    }
    
    .intro-text {
        font-size: 1.3rem;
        line-height: 1.6;
        padding: 0 1.5rem;
    }
}

/* Masonry Layout */
.masonry {
    columns: 1;
    column-gap: 72px;
    padding: 48px;
}

@media (min-width: 640px) {
    .masonry {
        columns: 2;
    }
}

@media (min-width: 1024px) {
    .masonry {
        columns: 3;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 72px;
    position: relative;
    cursor: pointer;
    display: inline-block;
    width: 100%;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

/* Image sizes */
.masonry-item.portrait img {
    aspect-ratio: 3/4;
    object-fit: cover;
}

.masonry-item:not(.portrait) img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Text display */
.image-text {
    display: block;
    width: 100%;
    padding: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    border: 1px solid #e5e5e5;
    border-top: none;
    background-color: #fafafa;
    margin-top: -1px;
}

/* SEO-friendly hidden text */
.seo-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hover overlay - hidden by default */
.image-overlay {
    display: none;
}

/* Desktop styles (min-width: 1280px) */
@media (min-width: 1280px) {
    .image-text {
        display: none;
    }

    .image-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.75);
        color: white;
        opacity: 0;
        transition: opacity 0.3s ease;
        padding: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: left;
    }

    .image-overlay p {
        font-family: 'Merriweather', serif;
        font-size: 17px;
        font-weight: 300;
        line-height: 1.8;
        transform: translateY(20px);
        transition: transform 0.3s ease;
        letter-spacing: 0.01em;
    }

    .masonry-item:hover .image-overlay {
        opacity: 1;
    }

    .masonry-item:hover .image-overlay p {
        transform: translateY(0);
    }
}

/* Show text below image for smaller screens */
@media (max-width: 1279px) {
    .image-overlay {
        display: none;
    }

    .image-text {
        display: block;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}