/* Generic Section Filtering Styles */
.cms-filter-group {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 5px;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.cms-filter-group::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

@media (max-width: 767px) {
    .cms-filter-group {
        justify-content: flex-start;
    }
}

@media (min-width: 768px) {
    .cms-filter-group {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.cms-filter-btn {
    background-color: #f8f8f8;
    color: #212529;
    border: 1px solid #e9ecef;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cms-filter-btn:hover {
    background-color: var(--primary, #ff1d4d);
    color: #ffffff;
    border-color: var(--primary, #ff1d4d);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb, 255, 29, 77), 0.25);
}

.cms-filter-btn.active {
    background-color: var(--primary, #ff1d4d);
    color: #ffffff;
    border-color: var(--primary, #ff1d4d);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb, 255, 29, 77), 0.35);
}

/* Animations for filter items */
.cms-filter-item {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.cms-filter-item.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    border: none !important;
}

/* Custom Project Card Grid Layout Styles */
.cms-project-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 320px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cms-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.cms-project-card .cms-project-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.cms-project-card .cms-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cms-project-card:hover .cms-project-image img {
    transform: scale(1.08);
}

/* Gradient overlay */
.cms-project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 1;
    transition: opacity 0.3s ease;
}

.cms-project-card:hover::after {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

.cms-project-card .cms-project-content {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    transition: transform 0.3s ease;
}

.cms-project-card .cms-project-category {
    color: var(--primary, #ff1d4d);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 8px;
}

.cms-project-card .cms-project-title {
    margin: 0;
}

.cms-project-card .cms-project-title a {
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    font-size: clamp(18px, 1.8vw, 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.3s ease;
}

.cms-project-card .cms-project-desc {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    line-height: 1.4;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox preview button trigger */
.cms-project-card .view-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(5px);
    border-radius: 50% !important;
    z-index: 3;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.cms-project-card .view-btn::after {
    content: "\f065"; /* FontAwesome search-plus icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #fff;
    font-size: 14px;
}

.cms-project-card:hover .view-btn {
    opacity: 1;
    transform: translateY(0);
    background: var(--primary, #ff1d4d) !important;
}

@media (max-width: 991px) {
    .cms-project-card {
        aspect-ratio: 4 / 3;
    }
}

