/* Base */
html, body {
    overflow-x: hidden;
}

body {
    background-color: #131414;
    color: #eee;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(14px);
    background: rgba(10, 10, 10, .75);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

/* Filters */
.filters-wrap {
    width: 100%;
    padding-bottom: 6px;
}

#filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

#filters button {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Site title */
.site-title {
    font-size: 2.35rem;
    font-weight: 700;
    width: 14rem;
}

/* Grid */
.grid {
    column-count: 4;
    column-gap: 12px;
}

.grid-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 12px;
    break-inside: avoid;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: .2s;
    cursor: pointer;
}

/* Load more */
.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 0 0;
}

#loadMoreBtn {
    display: none;
}

/* Main */
main {
    background: #181818;
}

/* Footer */
.link-light.opacity-75 {
    transition: all 0.3s ease-in-out;
    display: inline-block;
}

a.text-decoration-none:hover {
    text-decoration: underline !important;
}

footer {padding: 2.5rem 0}

.footer-author {
    font-size: 1rem;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .75);
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
    margin: 0 1rem;
    transition: transform .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}

.footer-social-link:hover,
.footer-social-link:active {
    transform: scale(1.15);
}

.footer-social-link:hover .fa-phone    { color: #4caf50; }
.footer-social-link:hover .fa-vk      { color: #0077FF; }
.footer-social-link:hover .fa-telegram { color: #229ED9; }

/* Responsive */
@media (max-width: 1200px) {
    .grid { column-count: 3; }
}

@media (max-width: 800px) {
    .grid { column-count: 2; }
}

@media (max-width: 767.98px) {
    footer {padding: 0}
    .site-title {
        text-align: center;
        width: 100%;
    }

    #filters {
        align-items: center;
        justify-content: center;
    }

    .footer-author {
        font-size: 1.15rem;
        font-weight: 600;
        color: rgba(255, 255, 255, .9);
    }

    .footer-social-link {
        width: 3.2rem;
        height: 3.2rem;
        font-size: 2rem;
        margin: 0 .4rem;
    }
}

@media (max-width: 500px) {
    .grid { column-count: 1; }
}

@media (min-width: 768px) {
    .topbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        margin-bottom: 0 !important;
    }
}
