/* ============================================================
   Geo Solutions Grid Widget
   All critical properties use !important to prevent any
   theme, Bootstrap, or plugin CSS from overriding the layout.
   ============================================================ */

/* ---- Outer box ---- */
.geo-sg-box {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ---- CSS Grid container ---- */
/* grid-template-columns and gap are injected per-instance */
.geo-sg-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;  /* default fallback */
    gap: 28px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ---- Card ---- */
.geo-sg-card {
    background: #fff;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e8dfd8 !important;
    height: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
    position: relative !important;
    display: block !important;
    float: none !important;
}

.geo-sg-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

/* ---- Inner row (content left + image right) ---- */
.geo-sg-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    height: 100% !important;
    min-height: 280px !important;   /* overridden per-instance */
    align-items: stretch !important;
    overflow: hidden !important;
}

/* ---- Content side (left) ---- */
/* flex-basis injected per-instance */
.geo-sg-content {
    flex-shrink: 0 !important;
    padding: 35px 28px !important;
    position: relative !important;
    background: #fff;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* ---- Number badge ---- */
.geo-sg-number {
    font-size: 14px;
    color: #7a6d65;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    display: block !important;
    font-style: normal !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* ---- Title ---- */
.geo-sg-title {
    font-size: 34px;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    color: #231815;
    text-transform: none !important;
    letter-spacing: normal !important;
    border: none !important;
    background: none !important;
}

/* ---- Description ---- */
.geo-sg-desc {
    font-size: 16px;
    line-height: 1.9 !important;
    color: #655b55;
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
    max-width: 300px;
    text-transform: none !important;
    font-weight: 400 !important;
}

/* ---- Button ---- */
.geo-sg-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 13px;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    color: #2a1f1b;
    text-decoration: none !important;
    text-transform: uppercase !important;
    transition: color 0.3s ease !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: auto !important;
    box-shadow: none !important;
}

.geo-sg-btn:hover,
.geo-sg-btn:focus {
    color: #7c3f24 !important;
    text-decoration: none !important;
    background: transparent !important;
}

/* ---- Button icon circle ---- */
.geo-sg-btn-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border-radius: 50% !important;
    border: 1px solid #c7b8ae;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    line-height: 1 !important;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
    flex-shrink: 0 !important;
    color: #2a1f1b;
    box-sizing: border-box !important;
}

.geo-sg-btn-icon i {
    color: currentColor !important;
    font-size: 1em !important;
    line-height: 1 !important;
    display: inline-block !important;
}

.geo-sg-btn-icon svg {
    fill: currentColor !important;
    width: 1em !important;
    height: 1em !important;
    display: inline-block !important;
}

.geo-sg-btn:hover .geo-sg-btn-icon {
    background: #7c3f24 !important;
    color: #fff !important;
    border-color: #7c3f24 !important;
}

/* ---- Image side (right) ---- */
.geo-sg-image {
    flex: 1 1 0% !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 0 !important;
    display: block !important;
}

/* ---- Diagonal white slant between content and image ---- */
/* Color matches card background via Elementor selector on hover */
.geo-sg-image::before {
    content: "" !important;
    position: absolute !important;
    left: -55px !important;
    top: 0 !important;
    width: 110px !important;
    height: 100% !important;
    background: #fff;
    transform: skewX(15deg) !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

/* ---- Image ---- */
/* position: absolute so the img never affects the container's layout height.
   The parent .geo-sg-image is position:relative + overflow:hidden, which clips
   any large image cleanly without breaking the card dimensions. */
.geo-sg-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.5s ease !important;
    max-width: none !important;
    border-radius: 0 !important;
}

.geo-sg-card:hover .geo-sg-image img {
    transform: scale(1.05) !important;
}

/* ============================================================
   TABLET  (≤991px)
   grid columns and gap overridden per-instance
   ============================================================ */
@media (max-width: 991px) {

    .geo-sg-title   { font-size: 28px; }
    .geo-sg-desc    { font-size: 15px; }
    .geo-sg-content { padding: 28px 22px !important; }

}

/* ============================================================
   MOBILE  (≤767px)
   card stacks: image top, content bottom
   image height overridden per-instance
   ============================================================ */
@media (max-width: 767px) {

    .geo-sg-grid {
        grid-template-columns: 1fr !important;
    }

    .geo-sg-inner {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }

    .geo-sg-content {
        width: 100% !important;
        flex: 0 0 auto !important;
        padding: 28px 22px !important;
        order: 2 !important;
    }

    .geo-sg-image {
        width: 100% !important;
        flex: 0 0 auto !important;
        height: 260px !important;   /* overridden per-instance */
        order: 1 !important;
    }

    /* hide slant on mobile — it doesn't make sense vertically */
    .geo-sg-image::before {
        display: none !important;
    }

    .geo-sg-title {
        font-size: 24px;
    }

    .geo-sg-desc {
        font-size: 14px;
        line-height: 1.8 !important;
        margin-bottom: 22px !important;
        max-width: 100% !important;
    }

}
