/* Portfolio Gallery Specific Styles */
:root {
    --gallery-gap: 20px;
}

.gallery-section {
    padding-top: 120px;
    background-color: var(--white);
}

.filter-container {
    margin-bottom: 40px;
    text-align: center;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.filter-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: inline-flex;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 25px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
}

.filter-btn:hover:not(.active) {
    background: #f0f4ff;
    color: var(--primary);
}

/* Featured / 1x Section */
.featured-section {
    margin-bottom: 60px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.featured-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    aspect-ratio: 4/3;
}

.featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.featured-item:hover img {
    transform: scale(1.05);
}

.onex-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.onex-badge img {
    width: 24px !important;
    height: 24px !important;
}

/* Masonry Gallery */
.photo-grid {
    column-count: 3;
    column-gap: var(--gallery-gap);
    transition: all 0.5s ease;
}

@media (max-width: 992px) {
    .photo-grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .photo-grid {
        column-count: 1;
    }
}

.photo-item {
    break-inside: avoid;
    margin-bottom: var(--gallery-gap);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
    cursor: pointer;
    animation: fadeIn 0.8s ease forwards;
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.03);
    filter: brightness(0.8);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.zoom-icon {
    color: #fff;
    font-size: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hide {
    display: none;
}
