/* Shared Styles */
body { 
    font-family: 'Inter', sans-serif;
    margin: 0; 
    line-height: 1.6; 
    color: #333; 
    text-align: center;
    /* Prevents the horizontal scroll bar on mobile */
    overflow-x: hidden; 
}

.container { 
    max-width: 800px; 
    margin: 50px auto; 
    padding: 20px; 
    text-align: center; 
}

/* Force Header Centering */
header, .nav, .search-container { 
    display: block;
    width: 100%;
    text-align: center; 
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    margin: 0 auto;
    display: inline-block;
    color: inherit;
}

/* Default Navigation Style */
.nav {
    display: flex;
    flex-wrap: wrap; /* This is the key fix for mobile cut-offs */
    justify-content: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto 40px auto !important;
}

.nav a { 
    display: inline-block;
    margin: 5px 12px; 
    text-decoration: none; 
    color: #999; 
    font-size: 0.8rem; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
}

header {
    margin-bottom: 60px !important; 
}

/* Gallery Grid */
.gallery-grid { 
    display: grid; 
    /* Desktop default: fit as many 220px columns as possible */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 15px; 
    padding: 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
    text-align: left;
}

.photo-card img { 
    width: 100%; 
    height: 220px;
    object-fit: cover; 
    border-radius: 4px; 
}

/* Hide descriptions on main grid as requested */
.photo-info p {
    display: none;
}

/* --- Mobile Specific Fixes (iPhone/Android) --- */
@media (max-width: 600px) {
    body, .container, .gallery-container {
        padding: 5px;
    }

    /* Shrink spacing for mobile */
    header {
        margin-bottom: 30px !important;
    }

    .nav {
        margin-bottom: 20px !important;
        padding: 0 10px;
    }

    .nav a {
        margin: 3px 8px;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    /* Switch to 2 columns on mobile so they don't go off-screen */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    header h1 {
        font-size: 1.4rem;
        word-wrap: break-word;
    }

    .photo-info h4 {
        font-size: 0.8rem;
        word-wrap: break-word;
    }
}

/* Footer Styles */
footer { 
    padding: 60px 0; 
    color: #bbb; 
    font-size: 0.7rem; 
    border-top: 1px solid #eee; 
    margin-top: 50px; 
    clear: both;
}