@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #ffcd28;
    --bg-color: #f4f4f4;
    --text-color: #333;
    --light-text-color: #fff;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light-text-color);
}

.logo i {
    margin-right: 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--light-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

main {
    padding-top: 80px;
}

.hero {
    background-image: url('https://plus.unsplash.com/premium_photo-1661767490975-f31a02946f48?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8YXJ0fGVufDB8fDB8fHww');
    background-size: cover;
    background-position: center;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text-color);
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    direction: none;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #27ae60;
}

.cta-button a {
    color: var(--light-text-color);
    text-decoration: none;
}

.search-section, .upload-section, .gallery-section, .about-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.search-container {
    text-align: center;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 1rem auto;
}

#search-input {
    flex-grow: 1;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px 0 0 5px;
}

#search-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-btn:hover {
    background-color: #2980b9;
}

.upload-form {
    max-width: 600px;
    margin: 0 auto;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-bottom: 1rem;
}

.file-input-label {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.file-input-label:hover {
    background-color: #2980b9;
}

#image-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

#image-title, #image-description {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


.submit-btn:hover {
    background-color: #27ae60;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    object-fit: cover;
}

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--light-text-color);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.gallery-item:hover .gallery-item-info {
    transform: translateY(0);
}

.gallery-item-text {
    flex-grow: 1;
}

.gallery-item-title {
    font-size: .1rem;
    margin-bottom: 0.5rem;
}

.gallery-item-description {
    font-size: 0.6rem;
    opacity: 0.8;
}

.download-btn {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.download-btn:hover {
    background-color: #27ae60;
}

.load-more-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: #2980b9;
}
.about-section {
    text-align: center;
}

footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.social-links a {
    color: var(--light-text-color);
    font-size: 1.5rem;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 50%;
    height: 10%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 20%;
    max-width: 300px;
    max-height: 30vh;
    object-fit: contain;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 30%;
    max-width: 100px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}


.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 1080px) {
    nav, .footer-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
    }

    nav ul li {
        margin: 0 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .social-links {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    nav, .footer-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: .9rem;
    }

    nav ul li {
        margin: 0 0.4rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .social-links {
        margin-top: 1.8rem;
    }

}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .search-bar {
        flex-direction: column;
    }

    #search-input, #search-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    nav, .footer-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: .7rem;
    }

    nav ul li {
        margin: 0 0.3rem;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .social-links {
        margin-top: 1.4rem;
    }
}

@media (max-width: 320px) {
    .hero-content {
        padding: 0.4rem;
    }

    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    nav, .footer-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: .7rem;
    }

    nav ul li {
        margin: 0 0.2rem;
    }

    .hero h1 {
        font-size: .7rem;
    }

    .social-links {
        margin-top: 1rem;
    }
}