@font-face {
    font-family: 'montserrat';
    src: url('fonts/Montserrat/static/Montserrat-Regular.ttf');
    font-weight: 400;
}
@font-face {
    font-family: 'montserrat';
    src: url('fonts/Montserrat/static/Montserrat-Medium.ttf');
    font-weight: 500;
}
@font-face {
    font-family: 'montserrat';
    src: url('fonts/Montserrat/static/Montserrat-Bold.ttf');
    font-weight: 600;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'montserrat';
}

body {
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

header {
    height: 300px;
    width: 100%;
    text-align: center;
    position: relative;
    margin-bottom: 4rem;
}

header img {
    object-fit: cover;
    filter: brightness(30%);
    width: 100%;
    height: 100%;
}

header .content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 400px;
    transform: translate(-50%, -50%);
    color: #fff;
}

header .content h2 {
    margin-bottom: 12px;
}

header .content p {
    line-height: 1.5;
}

header .search-wrapper {
    height: 50px;
    margin-top: 3rem;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    padding-left: 45px;
    font-size: 1rem;
    outline: none;
}

.search-wrapper i {
    position: absolute;
    font-size: 1.2rem;
    color: #777;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
}

.gallery {
    display: grid;
    place-items: center;
    grid-template-columns: repeat(auto-fit,minmax(250px, 1fr));
    gap: 6px;
    padding: 2rem;
}

.card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s ease;
}

.card img {
    max-width: 100%;
}

.card .details {
    position: absolute;
    bottom: -100px;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, #000, rgba(0,0,0,0.2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    transition: 0.2s ease;
}

.card:hover .details {
    bottom: 0;
}

.card .details .photographer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card .details .photographer p {
    font-size: 13px;
}

button.icon {
    background-color: transparent;
    color: #fff;
    border: none;
    outline: none;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s ease;
}

button:hover {
    opacity: 0.8;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}


.modal .modal-close-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
}

.modal .modal-content {
    background-color: black;
    color: #fff;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
    animation: scaleUp 0.3s linear;
}

@keyframes scaleUp {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}


.modal-content .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
}

.modal-header .photographer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.modal-header .download-close {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-header .download-close button {
    color: #fff;
    font-size: 1.2rem;
}

.modal-content img {
    width: 100%;
    max-height: 470px;
    object-fit: contain;
}

.load-more {
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    background-color: #5829ad;
    color: #fff;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 500;
    margin: 2rem 0;
    letter-spacing: 1px;
    transition: .2s ease;
}

.load-more:disabled {
    opacity: 0.8;
}

.load-more:hover {
    background-color: #46218b;
}