/**
 * Skeleton system — reutilizável em qualquer página
 *
 * Uso:
 *   <div class="sk-wrap" data-sk="images">
 *     <div class="sk-ui" aria-hidden="true">...</div>
 *     <div class="sk-body">conteúdo real</div>
 *   </div>
 *
 * data-sk:
 *   images  — some quando as <img> dentro de .sk-body carregarem
 *   load    — some no window.load
 *   idle    — some no requestIdleCallback / timeout curto
 */
@keyframes sk-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.sk {
    display: block;
    background: linear-gradient(
        90deg,
        #ebebeb 0%,
        #f5f5f5 40%,
        #ebebeb 80%
    );
    background-size: 200% 100%;
    animation: sk-shimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
}

.sk--purple {
    background: linear-gradient(
        90deg,
        #8586e8 0%,
        #a0a1f4 40%,
        #8586e8 80%
    );
    background-size: 200% 100%;
}

.sk--round {
    border-radius: 999px;
}

.sk--circle {
    border-radius: 50%;
    flex-shrink: 0;
}

.sk-line {
    height: 14px;
    width: 100%;
}

.sk-line--sm { height: 10px; width: 40%; }
.sk-line--md { height: 14px; width: 65%; }
.sk-line--lg { height: 22px; width: 80%; }
.sk-line--xl { height: 36px; width: 70%; max-width: 420px; }

.sk-btn {
    height: 48px;
    width: 180px;
    border-radius: 999px;
}

.sk-icon {
    width: 50px;
    height: 50px;
}

.sk-media {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.sk-wrap {
    position: relative;
}

.sk-ui {
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Antes do ready: skeleton no fluxo (define a altura) */
.sk-wrap:not(.is-ready) > .sk-ui {
    position: relative;
}

.sk-wrap:not(.is-ready) > .sk-body {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    pointer-events: none;
}

/* Depois do ready: conteúdo no fluxo, skeleton some */
.sk-wrap.is-ready > .sk-ui {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
}

.sk-wrap.is-ready > .sk-body {
    opacity: 1;
    position: relative;
    inset: auto;
    pointer-events: auto;
    transition: opacity 0.35s ease;
}

.sk-body {
    z-index: 1;
}

/* ---- Composições prontas ---- */

.sk-banner {
    width: 100%;
    height: 100%;
    background: #e8e8e8;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.sk-banner__inner {
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sk-banner .sk {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.35) 40%,
        rgba(255, 255, 255, 0.18) 80%
    );
    background-size: 200% 100%;
}

.sk-benefits {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 24px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
    min-height: 90px;
    background: #9293F8;
}

.sk-benefits__item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 280px;
}

.sk-benefits__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sk-card {
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.sk-card__media {
    height: 212px;
    border-radius: 0;
}

.sk-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media only screen and (max-width: 768px) {
    .sk-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .sk-card__media {
        height: 140px;
    }

    .sk-card__body {
        padding: 12px;
        gap: 8px;
    }
}

@media only screen and (max-width: 650px) {
    .sk-banner {
        align-items: flex-end;
        padding-bottom: 24px;
    }

    .sk-banner__inner {
        padding: 0 20px;
    }

    .sk-line--xl {
        height: 28px;
        width: 85%;
    }

    .sk-btn {
        width: 100%;
        max-width: 220px;
        min-height: 44px;
        height: 44px;
    }

    .sk-benefits {
        justify-content: center;
        padding: 16px 20px;
        min-height: 76px;
    }

    .sk-benefits__item:not(:first-child) {
        display: none;
    }

    .sk-benefits__item {
        max-width: none;
        justify-content: center;
    }
}
