/* =============================================================
   AL KHAIR — تنسيقات صفحة كل الآراء (testimonials.html)
   خاصة بهذه الصفحة فقط. تعتمد على متغيّرات styles.css (الألوان
   والحواف والظلال) وعلى ذرّات مشتركة مثل .tm-card و .tm-star.
============================================================= */

.testimonials-page {
    padding-block: 2.5rem 4rem;
    padding-inline: 1.25rem;
}

.tmp-wrap {
    max-width: 1180px;
    margin-inline: auto;
}

/* رابط العودة */
.tmp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.75rem;
    padding: 8px 14px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--surface-card);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition-fast), border-color var(--transition-fast),
        background-color var(--transition-fast);
}

.tmp-back:hover {
    color: var(--primary);
    border-color: var(--border-accent);
    background: var(--overlay-gold);
}

.tmp-back svg {
    width: 16px;
    height: 16px;
}

[dir="ltr"] .tmp-back svg {
    transform: scaleX(-1);
}

/* ترويسة الصفحة */
.tmp-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.tmp-title {
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 12px 0;
}

.tmp-intro {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* شبكة البطاقات */
.tmp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* تعديل بطاقة الرأي لتناسب الشبكة (بدل عرضها الثابت في الشريط) */
.tmp-grid .tm-card {
    width: auto;
    /* تتبع اتجاه الصفحة (بدل rtl الثابت الخاص بشريط الصفحة الرئيسية)
       حتى ينتظم النص والصورة يميناً في العربية ويساراً في الإنكليزية */
    direction: inherit;
}

/* في هذه الصفحة نعرض نصّ الرأي كاملاً بلا اقتطاع */
.tmp-grid .tm-body {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    font-size: 14px;
}

/* ظهور تدريجي متدرّج للبطاقات */
.tmp-card {
    opacity: 0;
    transform: translateY(16px);
    animation: tmp-in 0.6s ease forwards;
}

.tmp-card:nth-child(1) { animation-delay: 0.04s; }
.tmp-card:nth-child(2) { animation-delay: 0.10s; }
.tmp-card:nth-child(3) { animation-delay: 0.16s; }
.tmp-card:nth-child(4) { animation-delay: 0.22s; }
.tmp-card:nth-child(5) { animation-delay: 0.28s; }
.tmp-card:nth-child(6) { animation-delay: 0.34s; }

@keyframes tmp-in {
    to {
        opacity: 1;
        transform: none;
    }
}

/* بانر مشاركة الرأي عبر واتساب */
.tmp-banner {
    position: relative;
    overflow: hidden;
    margin-top: 3.25rem;
    padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
    text-align: center;
    border-radius: var(--radius-xl);
    color: var(--champagne-light);
    background: var(--gradient-primary);
    box-shadow: 0 26px 54px var(--shadow-300);
}

/* توهّج ذهبي خفيف يعكس الهوية */
.tmp-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 130% at 50% 0%, var(--shadow-gold-200) 0%, transparent 55%),
        radial-gradient(90% 120% at 100% 100%, var(--overlay-gold) 0%, transparent 50%);
}

.tmp-banner > * {
    position: relative;
    z-index: 1;
}

.tmp-banner-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 1.1rem;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    box-shadow: 0 12px 26px rgba(37, 211, 102, 0.4);
}

.tmp-banner-ic svg {
    width: 32px;
    height: 32px;
}

.tmp-banner-title {
    font-size: clamp(22px, 3.4vw, 30px);
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
}

.tmp-banner-text {
    max-width: 620px;
    margin: 0 auto 1.75rem;
    font-size: 15.5px;
    line-height: 1.95;
    color: color-mix(in srgb, var(--champagne-light) 88%, transparent);
}

.tmp-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal),
        background-color var(--transition-normal);
}

.tmp-wa-btn svg {
    width: 22px;
    height: 22px;
}

.tmp-wa-btn:hover {
    background: #1ebe5b;
    transform: translateY(-3px);
}

/* استجابة */
@media (max-width: 620px) {
    .tmp-grid {
        grid-template-columns: 1fr;
    }
}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .tmp-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
