/* Masonry Grid Photo Layout */

/* Photo section styles */
.photos {
    margin-bottom: 4rem;
}

.photos header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.photos header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Base image grid styles */
.image-grid {
    column-gap: 20px;
    margin-bottom: 3rem;
}

.image-grid img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    break-inside: avoid;
}

.image-grid img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Landscape grid - wider columns for landscape photos */
.landscape-grid {
    column-count: 3;
    column-width: 300px;
}

/* Portrait grid - narrower columns for portrait photos */
.portrait-grid {
    column-count: 4;
    column-width: 250px;
}

/* Responsive breakpoints */
@media (max-width: 1400px) {
    .landscape-grid {
        column-count: 3;
        column-width: 280px;
    }

    .portrait-grid {
        column-count: 3;
        column-width: 220px;
    }
}

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

    .portrait-grid {
        column-count: 3;
        column-width: 200px;
    }

    .image-grid {
        column-gap: 15px;
    }

    .image-grid img {
        margin-bottom: 15px;
    }
}

@media (max-width: 900px) {
    .landscape-grid {
        column-count: 2;
        column-width: 250px;
    }

    .portrait-grid {
        column-count: 2;
        column-width: 180px;
    }
}

@media (max-width: 768px) {
    .landscape-grid,
    .portrait-grid {
        column-count: 2;
        column-width: 150px;
    }

    .image-grid {
        column-gap: 10px;
    }

    .image-grid img {
        margin-bottom: 10px;
        border-radius: 6px;
    }

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

@media (max-width: 480px) {
    .landscape-grid,
    .portrait-grid {
        column-count: 1;
        column-width: 100%;
    }

    .image-grid img {
        margin-bottom: 15px;
    }

    .photos header h1 {
        font-size: 1.75rem;
    }
}

/* Image loading animation */
.image-grid img {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Stagger animation for images */
.image-grid img:nth-child(1) { animation-delay: 0.1s; }
.image-grid img:nth-child(2) { animation-delay: 0.2s; }
.image-grid img:nth-child(3) { animation-delay: 0.3s; }
.image-grid img:nth-child(4) { animation-delay: 0.4s; }
.image-grid img:nth-child(5) { animation-delay: 0.5s; }
.image-grid img:nth-child(6) { animation-delay: 0.6s; }
.image-grid img:nth-child(7) { animation-delay: 0.7s; }
.image-grid img:nth-child(8) { animation-delay: 0.8s; }
.image-grid img:nth-child(9) { animation-delay: 0.9s; }
.image-grid img:nth-child(10) { animation-delay: 1s; }

/* Lightbox effect on click (optional enhancement) */
.image-grid img:active {
    transform: scale(0.98);
}

/* Print styles */
@media print {
    .image-grid img {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .image-grid img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .photos header h1 {
        color: #f8f9fa;
    }

    .photos header {
        border-bottom-color: #495057;
    }

    .image-grid img {
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    }

    .image-grid img:hover {
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
    }
}
