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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fff;
    color: #909090;
    font-size: 22px;
    line-height: 33px;
    font-weight: 360;
    letter-spacing: -0.8px;
    text-wrap: balance;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 400;;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #909090;
    text-decoration: underline;
}

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    background-color: #fff;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 380;
    margin: 0;
    color: rgb(35, 35, 35);
}

.header-center {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    opacity: 0.5;
    color: #666;
    pointer-events: none;
}

.search-input {
    padding: 8px 36px 8px 36px;
    border: 1px solid transparent;
    border-radius: 100px;
    background-color: #f3f3f3;
    font-size: 14px;
    width: 400px;
    height: 40px;
    outline: none;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s ease-out;
}

.search-input::placeholder {
    color: #666;
    opacity: 0.7;
    user-select: none;
}

.search-input:focus {
    background-color: #fff;
    border-color: #b6b6b6;
    /* box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.02); */
    transition: all 0.15s ease-out;
}

.search-hint {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #e6e6e6;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    pointer-events: none;
    font-weight: 500;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: #f3f3f3;
    border: none;
    border-radius: 100%;
    padding: 0;
    cursor: pointer;
    color: #666;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-out;
}

.search-clear svg {
    width: 16px;
    height: 16px;
}

.search-clear:hover {
    background-color: #e6e6e6;
    color: #232323;
    transition: all 0.15s ease-out;
}

.header-right {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-button-group {
    display: flex;
    background-color: #f3f3f3;
    border-radius: 100px;
    padding: 4px;
    gap: 4px;
}

.filter-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 100px;
    background-color: transparent;
    font-size: 14px;
    height: 32px;
    font-family: inherit;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    transition: all 0.15s ease;
    user-select: none;
    flex: 1;
}

.filter-btn:hover:not(.active) {
    color: rgb(35, 35, 35);
}

.filter-btn.active {
    background-color: #fff;
    color: rgb(35, 35, 35);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.suggest-btn {
    padding: 8px 20px 8px 16px;
    border-radius: 100px;
    background-color: #232323;
    color: rgb(232, 232, 232);
    font-size: 14px;
    height: 40px;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
    user-select: none;
}

.suggest-btn svg {
    width: 16px;
    height: 16px;
}

.suggest-btn:hover {
    background-color: #000;
    color: #fff;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 8px 14px 8px 16px;
    background-color: #f3f3f3;
    border: 1px solid transparent;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #666;
    height: 40px;
    user-select: none;
    position: relative;
}

.dropdown-btn.has-selections::after {
    content: '';
    position: absolute;
    top: -4px;
    right: 0px;
    width: 10px;
    height: 10px;
    background-color: #007AFF;
    border-radius: 50%;
    border: 2px solid #fff;
}

.dropdown-btn:hover {
    color: rgb(35, 35, 35);
}

.dropdown-btn svg {
    transition: transform 0.2s;
    width: 14px;

}

.dropdown.active .dropdown-btn svg {
    transform: scaleY(-1);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.25rem;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-section {
    padding: 0;
}

.dropdown-section + .dropdown-section {
    border-top: 1px solid #f0f0f0;
}

.dropdown-section-title {
    padding: 0.5rem 1rem;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 0.25rem .5rem;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.15s;
    text-transform: capitalize;
    color: #666;
    border-radius: 12px;
}

.dropdown-option:hover {
    background-color: #f9f9f9;
    color: rgb(35, 35, 35);
}

.dropdown-option input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.dropdown-option label {
    cursor: pointer;
    flex: 1;
}

.dropdown-actions {
    padding: 0.25rem;
    border-top: 1px solid #f0f0f0;
}

.dropdown-clear {
    width: 100%;
    padding: 0.5rem;
    background-color: #f3f3f3;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
}

.dropdown-clear:hover {
    background-color: #e0e0e0;
}

.intro {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem 2rem;
    width: 100%;
}

.intro p {
    margin: 0;
    max-width: 75%;
    font-size: 18px;
    line-height: 30px;
}

.gallery {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.gallery-item {
    background-color: #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    padding: 32px;
    position: relative;
}

.gallery-item.featured {
    /* background: linear-gradient(135deg, #f3f3f3 2%, #e1ecff 100%, #f3f3f3 100%); */
}

.featured-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #00000000;
    color: #666;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s ease;
    user-select: none;
}

.featured-badge:hover {
    color: #232323;
    transition: all 0.15s ease;
    background-color: #0000000f;
}

.featured-badge svg {
    width: 14px;
    height: 14px;
    color: inherit;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.gallery-item-filename {
    margin-top: 1rem;
    font-size: 13px;
    color: #909090;
    font-weight: 360;
    text-align: center;
}

.no-results {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 2rem;
}

.no-results-content {
    background-color: #f3f3f3;
    border-radius: 8px;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    align-self: stretch;
}

.no-results-icon {
    width: 32px;
    height: 32px;
    color: #a8a8a8;
    opacity: 1;
}

.no-results-text {
    margin: 0;
    font-size: 22px;
    font-weight: 380;
    color: #232323;
    text-align: center;
}

.no-results-gif {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.clear-filters-btn {
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 100px;
    background-color: #fff;
    font-size: 14px;
    height: 40px;
    font-family: inherit;
    cursor: pointer;
    color: #666;
    font-weight: 400;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.clear-filters-btn:hover {
    color: rgb(35, 35, 35)
}

footer {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 360;
    color: #909090;
    gap: 0;
}

.footer-content p {
    margin: 0;
}

@media (min-width: 1024px) {
    .footer-content {
        font-size: 18px;
    }
}


/* Responsive design for tablets */
@media (max-width: 968px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive design for mobile */
@media (max-width: 576px) {
    header {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        gap: 1rem;
        padding: 1rem;
    }

    header h1 {
        grid-column: 1;
        grid-row: 1;
    }

    .header-right {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .header-center {
        grid-column: 1 / -1;
        grid-row: 2 / 4;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .header-filters {
        width: 100%;
    }

    .filter-button-group {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
    }

    .intro {
        padding: 1rem 2rem;
    }

    .intro p {
        max-width: 100%;
        font-size: 16px;
        line-height: 24px;
    }

    .gallery {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
    color: #909090;
}

.scroll-to-top:hover {
    background-color: #f3f3f3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: rgb(35, 35, 35);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img,
.lightbox video {
    max-width: 75vw;
    max-height: 75vh;
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: #666;
    padding: 0;
}

.lightbox-close:hover {
    background-color: #f3f3f3;
    color: #232323;
}
