/* Base Styles that shouldn't be overridden normally */
.editing-services-widget-container {
    font-family: 'Playfair Display', serif;
}

.editing-services-widget-container .services-grid {
    display: grid;
}

.editing-services-widget-container .service-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    /* For images */
}

.editing-services-widget-container .service-card:hover {
    transform: translateY(-5px);
}

.editing-services-widget-container .services-header {
    text-align: center;
    margin-bottom: 40px;
}

.editing-services-widget-container .service-image-container {
    width: 100%;
    /* Portrait aspect ratio based on reference image */
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
}

.editing-services-widget-container .service-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
}

.editing-services-widget-container .service-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Bottom gradient by default using CSS variable if set */
    background: linear-gradient(to bottom, transparent 60%, var(--default-overlay-color, rgba(0, 0, 0, 0.9)) 100%);
    opacity: 1;
    transition: background 0.4s ease, opacity 0.4s ease;
    z-index: 1;
}

/* Service title on top of image bottom */
.editing-services-widget-container .service-image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 30px;
    box-sizing: border-box;
    color: #fff;
    margin: 0;
    z-index: 2;
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 700;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.editing-services-widget-container .service-card:hover .service-image-title {
    opacity: 0;
    transform: translateY(-10px);
}

.editing-services-widget-container .service-card:hover .service-image-container::before {
    /* Full overlay on hover using CSS variable if set */
    background: var(--hover-overlay-color, rgba(0, 0, 0, 0.75));
}

.editing-services-widget-container .service-card:hover .service-overlay {
    opacity: 1;
}

.editing-services-widget-container .service-card:hover .service-image-container img {
    transform: scale(1.05);
}

.editing-services-widget-container .service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    box-sizing: border-box;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
    color: #fff;
}

.editing-services-widget-container .service-overlay p {
    margin-bottom: 20px;
    color: #fff;
}

.editing-services-widget-container .service-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.editing-services-widget-container .service-btn:hover {
    background-color: #005177;
    color: #fff;
}

.editing-services-widget-container .service-content {
    display: none; /* Hide since title is now in image container */
}

.editing-services-widget-container .service-card h3 {
    margin-top: 0;
}

/* Sub-heading */
.editing-services-widget-container .services-subheading {
    font-size: 1.1rem;
    font-weight: 400;
    color: #666;
    margin: 8px 0 16px;
    text-align: center;
}

/* Divider */
.editing-services-widget-container .services-divider {
    border-top-style: solid;
    border-top-width: 2px;
    border-top-color: #0a66c2;
    width: 50%;
    margin: 15px auto;
}
