/* --- RESET & FONTS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000000;
    color: #fff;
}

/* --- NAVIGATION (Shared) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: #000000;
    color: white;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.6);
}

.logo { 
    font-size: 1.5rem; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: white;
}

.nav-links { 
    list-style: none; 
    display: flex; 
    gap: 20px; 
}

.nav-links a { 
    text-decoration: none; 
    color: white; 
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a:hover, .active { 
    color: #00d2ff;
    transform: translateY(-2px);
}

/* --- HEADER --- */
.gallery-header {
    text-align: center;
    padding: 40px;
}
.gallery-header h1 { font-weight: 300; letter-spacing: 2px; margin-bottom: 10px; }
.gallery-header p { color: #aaa; font-style: italic; }

/* --- CSS GRID LAYOUT --- */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    /* This creates a responsive grid automatically */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px; /* Base height for standard images */
    gap: 15px;
    grid-auto-flow: dense; /* Fills in empty gaps efficiently */
}

/* --- PHOTO ITEM STYLING --- */
.photo-item {
    position: relative;
    overflow: hidden; /* Hides the image when it zooms out */
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the box without stretching */
    transition: transform 0.5s ease;
}

/* --- GRID SPANS (The Mosaic Effect) --- */
.wide {
    grid-column: span 2; /* Takes up 2 columns width */
}

.tall {
    grid-row: span 2; /* Takes up 2 rows height */
}

/* --- HOVER EFFECTS --- */
.photo-item:hover img {
    transform: scale(1.15); /* Zoom In */
    opacity: 0.7; /* Darken slightly to show text */
}

/* Text Overlay */
.overlay {
    position: absolute;
    bottom: -50px; /* Hidden below the box initially */
    left: 0;
    width: 100%;
    padding: 10px;
    background: rgba(0, 210, 255, 0.8); /* Blue transparent background */
    color: #222;
    text-align: center;
    font-weight: bold;
    transition: bottom 0.3s ease;
}

/* Slide text up on hover */
.photo-item:hover .overlay {
    bottom: 0;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px;
    background-color: #000000;
    color: #ffffff;
    margin-top: 20px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .wide, .tall {
        grid-column: span 1; /* Reset spans on mobile so everything is 1 block */
        grid-row: span 1;
    }
    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }
}