/* ==========================================================================
   MGURUSI SOFTWARE — Image Components
   Loaded after styles.css and pages.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero image (home page)
   -------------------------------------------------------------------------- */

.hero__visual-img {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    aspect-ratio: 5 / 4;
    background: var(--surface-soft);
}

.hero__visual-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero__visual-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 55%,
        rgba(15, 23, 42, 0.28) 100%
    );
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   2. Solution card image (home page)
   -------------------------------------------------------------------------- */

.solution--with-image {
    padding: 0;
    grid-template-rows: auto auto auto 1fr auto;
}

.solution__img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-soft);
}

.solution__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms var(--ease);
}

.solution--with-image:hover .solution__img img {
    transform: scale(1.04);
}

.solution__img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 60%,
        rgba(15, 23, 42, 0.16) 100%
    );
    pointer-events: none;
}

.solution--with-image .solution__body {
    padding: 26px 28px 30px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 14px;
}

/* --------------------------------------------------------------------------
   3. Featured image (home page SMS section)
   -------------------------------------------------------------------------- */

.featured__img {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
}

.featured__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------------------------
   4. Full-width banner image (top of interior pages)
   -------------------------------------------------------------------------- */

.banner-img {
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    background: var(--surface-soft);
}

.banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 720px) {
    .banner-img {
        aspect-ratio: 16 / 10;
    }
}

/* --------------------------------------------------------------------------
   5. Split image (about, product pages)
   -------------------------------------------------------------------------- */

.split-image {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
}

.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------------------------
   6. Image grid (mosaic)
   -------------------------------------------------------------------------- */

.img-grid {
    display: grid;
    gap: 16px;
}

.img-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.img-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.img-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.img-grid__item {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
    transition: transform var(--t-med) var(--ease),
                box-shadow var(--t-med) var(--ease);
}

.img-grid__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.img-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms var(--ease);
}

.img-grid__item:hover img {
    transform: scale(1.05);
}

.img-grid__item--wide {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

@media (max-width: 860px) {
    .img-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .img-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .img-grid--2,
    .img-grid--3,
    .img-grid--4 {
        grid-template-columns: 1fr;
    }
    .img-grid__item--wide {
        grid-column: span 1;
        aspect-ratio: 4 / 3;
    }
}

/* --------------------------------------------------------------------------
   7. Product card image (products.html)
   -------------------------------------------------------------------------- */

.product-card--with-image {
    padding: 0;
    grid-template-rows: auto auto auto 1fr auto;
    overflow: hidden;
}

.product-card__img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
}

.product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms var(--ease);
}

.product-card--with-image:hover .product-card__img img {
    transform: scale(1.04);
}

.product-card--with-image .product-card__body {
    padding: 28px 32px 32px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 14px;
}

/* --------------------------------------------------------------------------
   8. Overlay caption image
   -------------------------------------------------------------------------- */

.img-overlay {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 16 / 10;
    background: var(--surface-soft);
}

.img-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-overlay__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 0%,
        rgba(15, 23, 42, 0.75) 100%
    );
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   9. Small square image card
   -------------------------------------------------------------------------- */

.img-card {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 1 / 1;
    background: var(--surface-soft);
}

.img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------------------------
   10. Gallery strip (horizontal scroll of small images)
   -------------------------------------------------------------------------- */

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.gallery-strip__item {
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
    transition: transform var(--t-med) var(--ease);
}

.gallery-strip__item:hover {
    transform: translateY(-3px);
}

.gallery-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 720px) {
    .gallery-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}