* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

header {
    background: #222;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

nav {
    background: #333;
    padding: 1rem;
    text-align: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
}

nav a:hover {
    background: #555;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Modal overlay for expanded images */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ccc;
}

footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}
