/* Styling Display - Frontend Styles */

.sd-container {
    margin: 20px 0;
    clear: both;
}

/* Grid Layout */
.sd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.sd-item {
    width: 100%;
    position: relative;
    /* transition for filtering */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sd-item.sd-hidden {
    display: none;
}

/* Item Wrapper */
.sd-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
}

.sd-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.sd-link:hover,
.sd-link:focus {
    text-decoration: none;
    outline: none;
}

/* Media Container */
.sd-media-container {
    position: relative;
    width: 100%;
    /* Fixed height for all items */
    height: 600px;
    overflow: hidden;
    background: #f0f0f0;
}

.sd-image,
.sd-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.3s ease;
}

.sd-image {
    opacity: 1;
    z-index: 1;
}

.sd-video {
    opacity: 0;
    z-index: 2;
}

/* Active State */
.sd-item.sd-video-active .sd-image {
    opacity: 0;
}

.sd-item.sd-video-active .sd-video {
    opacity: 1;
}

/* Filter Bar */
.sd-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    /* justify-content: center; Removed as requested */
}

.sd-filter-btn {
    transition: all 0.3s ease;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sd-filter-btn.active {
    background: #7C736C;
    border-color: #7C736C;
    color: #fff;
}

.sd-filter-btn:hover {
    border-color: #7C736C;
    background: #fff;
    color: #7C736C;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .sd-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .sd-media-container {
        height: 500px;
    }
}

@media (max-width: 480px) {
    .sd-media-container {
        height: 450px;
        /* Slightly taller on mobile for better view */
    }

    .sd-filter-bar {
        gap: 8px;
    }

    .sd-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}