/* ==========================================================================
   Services Card Widget — services-card-widget.css
   ========================================================================== */

/* ---- Grid ---- */
.sc-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.sc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* default; overridden by inline style */
    gap: var(--sc-row-gap, 20px) var(--sc-col-gap, 20px);
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

/* ---- Card Base ---- */
.sc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 28px;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
}

/* ---- Clickable overlay link ---- */
.sc-card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    text-decoration: none;
}

/* ---- Text Block ---- */
.sc-text-block {
    display: flex;
    flex-direction: column;
}

/* ---- Title ---- */
.sc-card-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #111111;
    margin: 0 0 14px 0;
    padding: 0;
    text-align: left;
    word-break: break-word;
}

/* ---- Description ---- */
.sc-card-desc {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: #444444;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* ---- Image Wrap (shared) ---- */
.sc-image-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    flex-shrink: 0;
    background-color: #e8e8e8;
}

.sc-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: inherit;
    transition: transform 0.4s ease;
}

.sc-card:hover .sc-image-wrap img {
    transform: scale(1.03);
}

/* ---- Text-Top / Image-Bottom layout ---- */
.sc-card.layout--text-top {
    flex-direction: column;
}

.sc-card.layout--text-top .sc-text-block {
    flex: 0 0 auto;
}

.sc-card.layout--text-top .sc-image-wrap--bottom {
    flex: 1 1 auto;
    min-height: 200px;
    height: 240px; /* overridden by Elementor control */
    margin-top: 16px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    width: 100%;
    border-radius: 14px;
}

/* ---- Image-Top / Text-Bottom layout ---- */
.sc-card.layout--image-top {
    flex-direction: column;
}

.sc-card.layout--image-top .sc-image-wrap--top {
    height: 240px; /* overridden by Elementor control */
    margin-bottom: 16px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    width: 100%;
    border-radius: 14px;
}

.sc-card.layout--image-top .sc-text-block {
    flex: 1 1 auto;
}

/* ---- Image-Only layout ---- */
.sc-card .sc-image-wrap--full {
    flex: 1 1 auto;
    min-height: 200px;
    height: 100%;
    border-radius: 14px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* ---- Tablet (≤ 1024px) ---- */
@media (max-width: 1024px) {
    .sc-card-title {
        font-size: 19px;
    }

    .sc-card.layout--text-top .sc-image-wrap--bottom,
    .sc-card.layout--image-top .sc-image-wrap--top {
        height: 220px;
    }
}

/* ---- Small Tablet (≤ 768px) ---- */
@media (max-width: 768px) {
    .sc-card {
        padding: 24px;
    }

    .sc-card.layout--text-top .sc-image-wrap--bottom {
        margin: 16px 0 0 0;
        width: 100%;
    }

    .sc-card.layout--image-top .sc-image-wrap--top {
        margin: 0 0 16px 0;
        width: 100%;
    }

    .sc-card-title {
        font-size: 18px;
    }
}

/* ---- Mobile (≤ 767px) ---- */
@media (max-width: 767px) {
    .sc-card {
        padding: 22px;
    }

    .sc-card.layout--text-top .sc-image-wrap--bottom {
        margin: 16px 0 0 0;
        width: 100%;
        height: 220px;
    }

    .sc-card.layout--image-top .sc-image-wrap--top {
        margin: 0 0 16px 0;
        width: 100%;
        height: 220px;
    }

    .sc-card-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .sc-card-desc {
        font-size: 14px;
    }
}

/* ---- Small Mobile (≤ 480px) ---- */
@media (max-width: 480px) {
    .sc-card {
        padding: 18px;
    }

    .sc-card.layout--text-top .sc-image-wrap--bottom {
        margin: 16px 0 0 0;
        width: 100%;
        height: 190px;
    }

    .sc-card.layout--image-top .sc-image-wrap--top {
        margin: 0 0 16px 0;
        width: 100%;
        height: 190px;
    }

    .sc-card-title {
        font-size: 17px;
    }
}