/* Services Showcase Widget Styles */


/* Container */

.services-showcase-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 0;
    opacity: 1;
    visibility: visible;
}


/* Heading */

.services-showcase-heading {
    margin-bottom: 40px;
    text-align: center;
}

.services-showcase-subheader {
    margin-bottom: 10px;
    color: #0073aa;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
}

.services-showcase-title {
    margin-bottom: 15px;
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.services-showcase-description {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    font-size: 1.125rem;
    line-height: 1.6;
}


/* Grid */

.services-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.services-showcase-columns-1 {
    grid-template-columns: 1fr;
}

.services-showcase-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.services-showcase-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.services-showcase-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}


/* Service Item */

.services-showcase-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    /* Ensure consistent height */
}

.services-showcase-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}


/* Service Image */

.services-showcase-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    max-height: 14rem;
}

.services-showcase-image img {
    width: 100%;
    height: 14rem;
    display: block;
    transition: transform 0.5s ease;
    object-fit: cover;
    object-position: center;
}

.services-showcase-item:hover .services-showcase-image img {
    transform: scale(1.05);
}


/* Service Content */

.services-showcase-content {
    padding: 25px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.services-showcase-item-title {
    margin: 0 0 15px;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.services-showcase-item-description {
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}


/* Category */

.services-showcase-item-category {
    margin-bottom: 8px;
    color: #0073aa;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}


/* Date */

.services-showcase-item-date {
    color: #0073aa;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}


/* Button */

.services-showcase-button {
    display: inline-block;
    padding: 10px 20px;
    margin-top: auto;
    color: #0073aa;
    background-color: transparent;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid #0073aa;
    border-radius: 4px;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}


/* Create a span inside the button to hold the text and animation */

.services-showcase-button span {
    position: relative;
    display: inline-block;
}

.services-showcase-button span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.services-showcase-button:hover span::after {
    transform: scaleX(1);
    transform-origin: left;
}

.services-showcase-button:hover {
    color: #fff;
    background-color: #0073aa;
}


/* Post Item Specific Styles */

.services-showcase-item.no-image .services-showcase-content {
    padding-top: 30px;
}


/* Responsive Styles */

@media screen and (max-width: 1024px) {
    .services-showcase-grid {
        gap: 20px;
    }
    .services-showcase-title {
        font-size: 2rem;
    }
    .services-showcase-subheader {
        font-size: 0.9rem;
    }
    .services-showcase-description {
        font-size: 1rem;
    }
    .services-showcase-item-title {
        font-size: 1.25rem;
    }
    .services-showcase-item-category {
        font-size: 0.8rem;
    }
    .services-showcase-item-date {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 768px) {
    .services-showcase-columns-3,
    .services-showcase-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-showcase-heading {
        margin-bottom: 30px;
    }
    .services-showcase-title {
        font-size: 1.75rem;
    }
    .services-showcase-subheader {
        font-size: 0.85rem;
    }
    .services-showcase-content {
        padding: 20px 15px;
    }
    .services-showcase-item-category {
        font-size: 0.75rem;
    }
    .services-showcase-item-date {
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 576px) {
    .services-showcase-columns-2,
    .services-showcase-columns-3,
    .services-showcase-columns-4 {
        grid-template-columns: 1fr;
    }
    .services-showcase-container {
        padding: 25px 0;
    }
    .services-showcase-title {
        font-size: 1.5rem;
    }
    .services-showcase-subheader {
        font-size: 0.8rem;
    }
    .services-showcase-description {
        font-size: 0.9rem;
    }
    .services-showcase-item-category {
        font-size: 0.7rem;
    }
    .services-showcase-item-date {
        font-size: 0.7rem;
    }
}


/* Add filter styles to the existing CSS file */


/* Filter Container */

.services-showcase-filters {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
}


/* Filter Heading */

.services-showcase-filter-heading {
    font-weight: 600;
    margin-right: 5px;
}


/* Filter Buttons Container */

.services-showcase-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* Filter Button */

.services-showcase-filter-button {
    padding: 0.75rem 2rem;
    background-color: transparent;
    border: 1px solid #E7EAEE;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000;
    font-size: 1.125rem;
}

.services-showcase-filter-button:hover {
    background-color: #0155A6;
    color: #fff;
}

.services-showcase-filter-button.active {
    background-color: #0155A6;
    color: #fff;
    border-color: #0155A6;
}


/* Responsive Filters */

@media (max-width: 767px) {
    .services-showcase-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .services-showcase-filter-buttons {
        width: 100%;
    }
}


/* Animation Styles */


/* Ensure items are visible by default */

.services-showcase-container,
.services-showcase-heading,
.services-showcase-filter-button,
.services-showcase-item,
.services-showcase-cta-container {
    opacity: 1;
    visibility: visible;
}


/* Only hide when explicitly set by JavaScript */

.gsap-reveal.gsap-hidden {
    opacity: 0;
    transform: translateY(30px);
}


/* When JavaScript is enabled, these will be animated */

.gsap-reveal {
    will-change: transform, opacity;
    backface-visibility: hidden;
    /* Prevent flickering */
}


/* JavaScript will override these styles when it's ready */

.no-js .gsap-reveal {
    opacity: 1 !important;
    transform: none !important;
}


/* Filtering transition styles */

.services-showcase-filterable-item {
    transition: transform 0.5s ease, opacity 0.5s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .services-showcase-container .services-showcase-heading,
    .services-showcase-container .services-showcase-filter-button,
    .services-showcase-container .services-showcase-item,
    .services-showcase-container .services-showcase-cta-container {
        /* Disable animations for users who prefer reduced motion */
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}


/* No Results Message */

.services-showcase-no-results {
    width: 100%;
    text-align: center;
    padding: 2rem 1rem;
    margin: 1rem 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-size: 1.125rem;
    line-height: 1.5;
    grid-column: 1 / -1;
    /* Span all columns */
}