/* =====================================================================
   30-Day Money-Back Guarantee page: summary first (the promise, four steps,
   covered / not covered), then the full terms folded. English and Arabic.
   ===================================================================== */

.guarantee-container {
    --g-line: #e6e9f2;
    --g-ok-bg: #eef1ff;
    --g-ok-line: #c9d2ff;
    max-width: 960px;
    margin: 100px auto 4rem;
    padding: 0 2rem;
}

/* ---------- language switch ---------- */
.lang-switch {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 2rem;
}

.lang-switch button {
    padding: .45rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: var(--white);
    font: inherit;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: var(--transition);
}

.lang-switch button[aria-pressed="true"] {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

.lang-switch button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ---------- the promise ---------- */
.g-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 26px;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 34px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 22px 50px rgba(67, 97, 238, .28);
    color: var(--white);
}

.g-hero-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .15);
    font-size: 2.4rem;
}

.g-hero h1 {
    margin-bottom: .5rem;
    font-size: 2.2rem;
    color: var(--white);
}

.g-hero .lead {
    margin: 0;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .92);
}

.g-hero .updated {
    margin: .6rem 0 0;
    font-size: .95rem;
    color: rgba(255, 255, 255, .75);
}

.g-title {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

/* ---------- four steps ---------- */
.g-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 0 0 2.5rem;
    padding: 0;
    list-style: none;
}

.g-steps li {
    position: relative;
    padding: 20px 18px;
    border: 1px solid var(--g-line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
}

.g-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-end: -11px;
    z-index: 1;
    width: 9px;
    height: 9px;
    border-top: 2.5px solid var(--g-ok-line);
    border-right: 2.5px solid var(--g-ok-line);
    transform: translateY(-50%) rotate(45deg);
}

[dir="rtl"] .g-steps li:not(:last-child)::after {
    transform: translateY(-50%) rotate(-135deg);
}

.g-when {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 99px;
    background: var(--g-ok-bg);
    font-size: .78rem;
    font-weight: 800;
    color: var(--primary-color);
}

.g-steps h3 {
    margin-bottom: 4px;
    font-size: 1.02rem;
    color: var(--text-color);
}

.g-steps p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
    color: var(--text-light);
}

/* ---------- covered / not covered ---------- */
.g-cover {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 2.5rem;
}

.g-cover > div {
    padding: 22px;
    border-radius: 16px;
}

.g-cover .yes {
    border: 1.5px solid #cdebd6;
    background: #f3fbf5;
}

.g-cover .no {
    border: 1.5px solid var(--g-line);
    background: #f8f9fc;
}

.g-cover h3 {
    margin-bottom: 10px;
    font-size: 1.08rem;
    color: var(--text-color);
}

.g-cover ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.g-cover li {
    position: relative;
    padding-block: 5px;
    padding-inline-start: 26px;
    font-size: .95rem;
    line-height: 1.5;
    color: #4a5568;
}

.g-cover li::before {
    position: absolute;
    top: 5px;
    inset-inline-start: 0;
    font-weight: 800;
}

.g-cover .yes li::before {
    content: "\2713";
    color: #2b8a3e;
}

.g-cover .no li::before {
    content: "\2715";
    color: #98a2b3;
}

/* ---------- the full terms, folded ---------- */
.g-terms details {
    margin-bottom: 10px;
    border: 1px solid var(--g-line);
    border-radius: 12px;
    background: var(--white);
}

.g-terms summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    font-weight: 700;
    color: var(--text-color);
    cursor: pointer;
    list-style: none;
}

.g-terms summary::-webkit-details-marker {
    display: none;
}

.g-terms summary::after {
    content: "+";
    font-weight: 800;
    color: var(--primary-color);
}

.g-terms details[open] summary::after {
    content: "\2013";
}

.g-terms summary:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 12px;
}

.g-terms .policy-section {
    padding: 0 18px 6px;
}

.policy-section p,
.policy-section ul,
.policy-section ol {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #4a5568;
}

.policy-section ul,
.policy-section ol {
    padding-inline-start: 1.6rem;
}

.policy-section ul {
    list-style: disc;
}

.policy-section ol {
    list-style: decimal;
}

.policy-section li {
    margin-bottom: .45rem;
}

.policy-section a {
    color: var(--primary-color);
}

.policy-note {
    padding: .9rem 1.1rem;
    border-inline-start: 4px solid var(--primary-color);
    border-radius: 8px;
    background: #f5f7ff;
}

/* ---------- questions box + last updated ---------- */
.guarantee-cta {
    margin-top: 2.5rem;
    padding: 2rem 1.5rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    color: var(--white);
}

.guarantee-cta h2 {
    margin-bottom: .5rem;
    font-size: 1.5rem;
    color: var(--white);
}

.guarantee-cta p {
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, .88);
}

.guarantee-cta .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}

.btn-whatsapp {
    background: #25d366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #1ebe5a;
    color: var(--white);
}

.last-updated {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-style: italic;
    text-align: end;
    color: #718096;
}

/* ---------- Arabic ---------- */
[data-lang-panel][hidden] {
    display: none;
}

[data-lang-panel="ar"] {
    font-family: 'Tajawal', var(--font-primary);
    text-align: right;
}

[data-lang-panel="ar"] .policy-section p,
[data-lang-panel="ar"] .policy-section li,
[data-lang-panel="ar"] .g-steps p,
[data-lang-panel="ar"] .g-cover li {
    font-size: 1.05rem;
}

[data-lang-panel="ar"] .guarantee-cta {
    text-align: center;
}

.ltr {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ---------- phones and tablets ---------- */
@media (max-width: 900px) {
    .g-steps {
        grid-template-columns: 1fr 1fr;
    }

    .g-steps li:nth-child(2)::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .guarantee-container {
        padding: 0 1.25rem;
    }

    .g-hero {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 24px;
    }

    .g-hero-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .g-hero h1 {
        font-size: 1.75rem;
    }

    .g-steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .g-steps li:not(:last-child)::after,
    [dir="rtl"] .g-steps li:not(:last-child)::after {
        display: block;
        top: auto;
        bottom: -10px;
        inset-inline-end: auto;
        left: 50%;
        transform: translateX(-50%) rotate(135deg);
    }

    .g-cover {
        grid-template-columns: 1fr;
    }
}
