/* ============================================================
   Home Section Styles
   Covers: ayah card, smart resume card, progress strip,
           daily message, sections grid.
   All colors use design tokens — no hardcoded values.
   ============================================================ */

/* ── Daily Ayah Card ──────────────────────────────────────── */

.section--home .home-ayah-card {
    position: relative;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--primary) 8%, var(--card-bg)),
        var(--card-bg)
    );
    padding: 20px 18px 18px;
    margin-bottom: 12px;
}

.section--home .home-ayah-card__text {
    font-size: 1.25rem;
    line-height: 2.2;
    color: var(--text-main);
    margin: 0;
}

/* Skeleton pulse while loading */
.section--home .home-ayah-card__text:empty {
    min-height: 2.8em;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--primary) 9%, var(--card-bg));
    animation: home-skeleton-pulse 1.6s ease-in-out infinite;
}

/* Error state */
.section--home .home-ayah-card__text[data-load-error="true"] {
    font-family: "Tajawal", sans-serif;
    font-size: 0.9rem;
    color: var(--text-sub);
    font-style: italic;
    line-height: 1.6;
}

@keyframes home-skeleton-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
}

/* ── Smart Resume Card ────────────────────────────────────── */

.section--home .home-resume-card {
    margin-bottom: 12px;
    padding: 14px 16px;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.section--home .home-resume-card.is-hidden {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.section--home .home-resume-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.section--home .home-resume-card__info {
    min-width: 0;
    flex: 1;
}

.section--home .home-resume-card__eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section--home .home-resume-card__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 4px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section--home .home-resume-card__meta {
    font-size: 0.82rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section--home .home-resume-card__action {
    flex-shrink: 0;
    padding: 9px 16px;
    font-size: 0.9rem;
}

@media (max-width: 380px) {
    .section--home .home-resume-card__body {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .section--home .home-resume-card__action {
        width: 100%;
    }
}

/* ── Progress Strip ───────────────────────────────────────── */

.section--home .home-progress-strip {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--primary-light);
    border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    margin-bottom: 12px;
    gap: 4px;
}

.section--home .home-progress-strip__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
}

.section--home .home-progress-strip__value {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.section--home .home-progress-strip__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-sub);
    line-height: 1;
}

.section--home .home-progress-strip__sep {
    width: 1px;
    height: 28px;
    background: color-mix(in srgb, var(--primary) 20%, transparent);
    flex-shrink: 0;
}

/* ── Daily Message ────────────────────────────────────────── */

.section--home .home-message {
    margin-bottom: 16px;
    padding: 0 4px;
}

.section--home .home-message__text {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-sub);
    text-align: center;
    margin: 0;
}

/* ── Sections Grid ────────────────────────────────────────── */

.section--home .home-sections-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.section--home .home-section-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: right;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform 0.16s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.025);
}

.section--home .home-section-btn:active {
    transform: scale(0.97);
    box-shadow: none;
}

.section--home .home-section-btn:hover {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.05),
        0 2px 6px rgba(0, 0, 0, 0.03);
}

.section--home .home-section-btn__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.15rem;
}

.section--home .home-section-btn__label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

@media (max-width: 480px) {
    .section--home .home-sections-grid {
        gap: 8px;
    }

    .section--home .home-section-btn {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 8px;
        padding: 14px 10px;
        min-height: 96px;
    }

    .section--home .home-section-btn__icon {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }

    .section--home .home-section-btn__label {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .section--home .home-section-btn {
        min-height: 88px;
        padding: 12px 8px;
    }

    .section--home .home-section-btn__label {
        font-size: 0.8rem;
    }
}
