/* =========================================================
   Inge Sanitaria — Service Card Widget  v1.1.0
   ========================================================= */

/* ── Card container ──────────────────────────────────── */
.inge-sc {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    display: block;
    cursor: default;
}

.inge-sc--clickable {
    cursor: pointer;
}

/* ── Background photo ────────────────────────────────── */
.inge-sc__photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.7s ease;
    will-change: transform;
}

.inge-sc:hover .inge-sc__photo {
    transform: scale(1.06);
}

/* ── Gradient overlay ──────────────────────────────── */
.inge-sc__overlay {
    position: absolute;
    inset: 0;
    --sc-overlay: #0B0E2D;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--sc-overlay) 97%, transparent) 0%,
        color-mix(in srgb, var(--sc-overlay) 52%, transparent) 45%,
        color-mix(in srgb, var(--sc-overlay)  8%, transparent) 100%
    );
    transition: background 0.3s ease;
}

.inge-sc:hover .inge-sc__overlay {
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--sc-overlay) 100%, transparent)  0%,
        color-mix(in srgb, var(--sc-overlay)  75%, transparent) 50%,
        color-mix(in srgb, var(--sc-overlay)  25%, transparent) 100%
    );
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .inge-sc__overlay {
        background: linear-gradient(
            to top,
            rgba(11, 14, 45, 0.97) 0%,
            rgba(11, 14, 45, 0.52) 45%,
            rgba(11, 14, 45, 0.08) 100%
        );
    }
    .inge-sc:hover .inge-sc__overlay {
        background: linear-gradient(
            to top,
            rgba(11, 14, 45, 1.00)  0%,
            rgba(11, 14, 45, 0.75) 50%,
            rgba(11, 14, 45, 0.25) 100%
        );
    }
}

/* ── Content body ────────────────────────────────────── */
.inge-sc__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 26px 24px;
    z-index: 2;
}

/* ── Subtitle ───────────────────────────────────────── */
.inge-sc__subtitle {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #F5B800;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* ── Title ──────────────────────────────────────────── */
.inge-sc__title {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    letter-spacing: 0.3px;
    line-height: 1.1;
    margin: 0 0 10px;
    padding: 0;
}

/* ── Hover content ──────────────────────────────────── */
.inge-sc__hover-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.4s ease;
}

.inge-sc:hover .inge-sc__hover-content {
    max-height: 400px;
    opacity: 1;
}

/* ── Description ─────────────────────────────────────── */
.inge-sc__desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.65;
    margin: 0 0 10px;
    padding: 0;
}

/* ── List ────────────────────────────────────────────── */
.inge-sc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inge-sc__list-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.inge-sc__list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #F5B800;
    font-size: 11px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 14px;
}

.inge-sc__list-icon i {
    font-size: 11px;
    line-height: 1;
}

.inge-sc__list-icon svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.inge-sc__list-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}

/* ── Editor preview ──────────────────────────────────── */
.elementor-editor-active .inge-sc__hover-content {
    max-height: 400px;
    opacity: 0.55;
}

/* =========================================================
   POPUP LIGHTBOX
   ========================================================= */
.inge-sc-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.inge-sc-popup--active {
    opacity: 1;
    visibility: visible;
}

.inge-sc-popup__close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.inge-sc-popup__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.inge-sc-popup__content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.inge-sc-popup__content img {
    max-width: 90vw;
    max-height: 85vh;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.inge-sc-popup__content iframe {
    width: 90vw;
    height: 85vh;
    max-width: 1100px;
    border: none;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Spinner mientras carga */
.inge-sc-popup__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #F5B800;
    border-radius: 50%;
    animation: inge-sc-spin 0.8s linear infinite;
}

@keyframes inge-sc-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
