/* css/photos.css - Styles for the Photography Page */

/* General Page Styles (common to all options) */
.photos-page-content .photo-section h1
{
    text-align: center;
    color: var(--titleColor);
    font-size: var(--h1-font-size); /* Using variable from main.css */
    margin-bottom: 0.75rem;
}

.photos-page-content .page-intro
{
    text-align: center;
    font-size: 1.1rem; /* Slightly larger than default p */
    color: var(--textColor);
    max-width: 65ch; /* Good readability length */
    margin: 0 auto 3rem auto;
    line-height: 1.7;
}

/* ====================================================================== */
/* CSS For "Responsive Grid Gallery"                                   */
/* ====================================================================== */
.photo-grid
{
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; /* Space between photo items */
    justify-content: center; /* Center items in the row */
    padding: 1rem 0;
}

.photo-item
{
    background-color: #fff; /* Optional: card-like background */
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden; /* Ensures image corners also get rounded if image itself isn't */
    width: calc(33.333% - 1rem); /* 3 columns, accounting for gap (1.5rem * 2/3) */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item:hover
{
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Default image styling (will apply if no specific aspect ratio class is on .photo-item) */
.photo-item img
{
    display: block;
    width: 100%;
    /* Default to square aspect ratio */
    aspect-ratio: 1 / 1;
    object-fit: cover; /* Ensures the image covers the area, may crop */
}

/* Specific styling for landscape images */
.photo-item.aspect-landscape img
{
    aspect-ratio: 191 / 100; /* Landscape aspect ratio (1.91:1) */
    /* For 16:9, you would use: aspect-ratio: 16 / 9; */
    object-fit: cover; /* Ensures the image covers the area, may crop */
}

/* Specific styling for portrait images (if you need to use it again) */
/*
.photo-item.aspect-portrait img
{
    aspect-ratio: 4 / 5; /* Portrait aspect ratio */
/* object-fit: cover; /* Ensures the image covers the area, may crop */
/*}
*/

.photo-item .caption
{
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--textColor);
    text-align: center;
    background-color: #f9f9f9; /* Light background for caption area */
    margin-top: auto; /* Pushes caption to bottom, useful if images have varying heights */
}

/* Responsive adjustments for Grid Gallery */
@media (max-width: 992px) { /* Tablets and larger phones */
    .photo-item
    {
        width: calc(50% - 0.75rem); /* 2 columns, adjust gap calculation (1.5rem * 1/2) */
    }
}

@media (max-width: 600px) { /* Smaller mobile devices */
    .photo-grid
    {
        gap: 1rem; /* Slightly reduce gap for smaller screens */
    }
    .photo-item
    {
        width: 100%; /* 1 column */
    }
    .photos-page-content .page-intro
    {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}
