/* Services Section Widget Styles */

.cew-services-section {
    padding: 60px 0;
}

.cew-services-header {
    text-align: left;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.cew-services-heading {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #1a1a1a;
    flex: 0 0 50%;
    position: relative;
    padding-left: 20px;
}

.cew-services-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #4db5bd;
}

.cew-services-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    flex: 0 0 40%;
    padding-top: 10px;
}

.cew-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.cew-service-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cew-service-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    display: block;
    background-color: transparent; /* Fix for some browsers ignoring clicks on empty elements */
}

.cew-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.cew-service-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cew-service-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 50%;
    transition: background 0.3s ease;
}

.cew-service-card:hover .cew-service-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
}

.cew-service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #4db5bd;
    color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.cew-service-card:hover .cew-service-icon {
    transform: scale(1.1);
}

.cew-service-card-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.cew-service-card-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.cew-services-button-wrapper {
    text-align: center;
    margin-top: 40px;
}

.cew-services-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background-color: #4db5bd;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cew-services-button .cew-button-icon-before,
.cew-services-button .cew-button-icon-after {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.cew-services-button:hover {
    background-color: #3a9aa1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 181, 189, 0.3);
}

.cew-services-button:hover .cew-button-icon-after {
    transform: translateX(4px);
}

.cew-services-button:hover .cew-button-icon-before {
    transform: translateX(-4px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .cew-services-header {
        flex-direction: column;
        gap: 20px;
    }

    .cew-services-heading,
    .cew-services-description {
        flex: 1 1 100%;
    }

    .cew-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cew-services-section {
        padding: 40px 20px;
    }

    .cew-services-heading {
        font-size: 32px;
    }

    .cew-services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cew-service-card-overlay {
        padding: 20px;
    }

    .cew-service-card-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .cew-services-heading {
        font-size: 28px;
    }

    .cew-services-description {
        font-size: 14px;
    }

    .cew-service-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}