/* ============================================
   Services Grid Widget — services-grid.css
   v3 — Mobile 1-column fix
   ============================================ */

.sgw-wrapper {
    width: 100%;
    padding: 20px 0;
    font-family: inherit;
    box-sizing: border-box;
}

.sgw-header {
    text-align: center;
    margin-bottom: 40px;
}

.sgw-star {
    display: inline-block;
    font-size: 20px;
    color: #3dc04a;
    line-height: 1;
    margin-bottom: 4px;
}

.sgw-star-line {
    width: 120px;
    height: 1px;
    background: #ccc;
    margin: 4px auto 10px;
}

.sgw-section-title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 900;
    color: #0d1b2a;
    margin: 0 0 4px;
    line-height: 1.1;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.sgw-section-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background: #3dc04a;
    border-radius: 2px;
    margin-top: 6px;
}

.sgw-section-subtitle {
    font-size: clamp(13px, 1.5vw, 17px);
    color: #555;
    margin: 12px auto 0;
    max-width: 600px;
    line-height: 1.6;
}

.sgw-highlight {
    color: #3dc04a;
    font-weight: 600;
}

/* Grid — Desktop: 3 col */
.sgw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Card */
.sgw-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.sgw-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.sgw-card-image {
    height: 240px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a3520;
    flex-shrink: 0;
}

.sgw-card-body {
    background: #0a2413;
    padding: 20px 18px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
}

.sgw-card-body::before {
    content: '';
    display: block;
    position: absolute;
    top: -28px;
    left: 0;
    right: 0;
    height: 36px;
    background: #2E2DDF;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.sgw-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #3dc04a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: -44px;
    margin-bottom: 14px;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(61,192,74,0.45);
}

.sgw-icon-wrap i,
.sgw-icon-wrap svg {
    font-size: 24px;
    color: #ffffff;
    fill: #ffffff;
    width: 24px;
    height: 24px;
}

.sgw-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.25;
}

.sgw-card-desc {
    font-size: 14px;
    color: #b8c8bb;
    line-height: 1.65;
    margin: 0;
}

/* ── Tablet: 2 col ── */
@media screen and (max-width: 1024px) {
    .sgw-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    .sgw-card-image { height: 200px; }
    .sgw-card-title { font-size: 18px; }
}

/* ── Tablet portrait / large phone: 2 col ── */
@media screen and (max-width: 768px) {
    .sgw-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
    }
    .sgw-section-title { font-size: 26px; }
    .sgw-header { margin-bottom: 24px; }
    .sgw-card-image { height: 160px; }
    .sgw-card-title { font-size: 15px; }
    .sgw-card-desc  { font-size: 12px; line-height: 1.5; }
    .sgw-icon-wrap  { width: 48px; height: 48px; margin-top: -34px; margin-bottom: 10px; }
    .sgw-icon-wrap i, .sgw-icon-wrap svg { font-size: 19px; width: 19px; height: 19px; }
    .sgw-card-body  { padding: 12px 10px 16px; }
    .sgw-card-body::before { top: -22px; height: 28px; }
}

/* ══════════════════════════════════════════
   MOBILE PORTRAIT — SINGLE COLUMN
   Uses !important + high specificity to beat
   Elementor inline styles on .sgw-grid
══════════════════════════════════════════ */
@media screen and (max-width: 480px) {

    /* Triple specificity to override Elementor inline style */
    .elementor-widget-sgw_services_grid .sgw-grid,
    .elementor .sgw-wrapper .sgw-grid,
    .sgw-wrapper .sgw-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .sgw-wrapper { padding: 8px 0; }

    .sgw-header {
        margin-bottom: 20px;
        padding: 0 4px;
    }

    .sgw-section-title    { font-size: 22px; }
    .sgw-section-subtitle { font-size: 13px; }

    .sgw-card {
        border-radius: 14px;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .sgw-card-image { height: 210px; }

    .sgw-card-body {
        padding: 18px 18px 22px;
    }

    .sgw-card-body::before { top: -26px; height: 32px; }

    /* Full-size icon — card is wide now */
    .sgw-icon-wrap {
        width: 62px;
        height: 62px;
        margin-top: -46px;
        margin-bottom: 14px;
    }

    .sgw-icon-wrap i,
    .sgw-icon-wrap svg {
        font-size: 26px;
        width: 26px;
        height: 26px;
    }

    .sgw-card-title { font-size: 20px; margin: 0 0 10px; }
    .sgw-card-desc  { font-size: 14px; line-height: 1.7; }
}

@media screen and (max-width: 360px) {
    .sgw-card-image { height: 180px; }
    .sgw-card-title { font-size: 18px; }
    .sgw-card-desc  { font-size: 13px; }
}
