/* ========================================
   قوانین و مقررات - استایل کامل
   ======================================== */

:root {
    --terms-primary: #2563eb;
    --terms-primary-dark: #1d4ed8;
    --terms-primary-light: #3b82f6;
    --terms-dark: #1e293b;
    --terms-gray: #64748b;
    --terms-light: #f8fafc;
    --terms-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.terms-page { direction: rtl; }

.terms-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== هیرو ========== */
.terms-hero {
    background: linear-gradient(135deg, #0a2540, #2563eb, #3b82f6);
    padding: 60px 0;
}
.terms-hero__content {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}
.terms-hero__text { flex: 1; }
.terms-hero__text h1 { font-size: 42px; color: white; margin-bottom: 15px; }
.terms-hero__text h1 span { color: #fbbf24; }
.terms-hero__text p { font-size: 18px; color: rgba(255,255,255,0.9); }
.terms-hero__image { flex: 1; text-align: center; }
.terms-hero__image img { max-width: 100%; }

/* ========== اطلاعیه ========== */
.terms-notice {
    padding: 20px 0;
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
}
.terms-notice__content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.terms-notice__icon { font-size: 32px; }
.terms-notice__content p { flex: 1; color: #92400e; font-size: 14px; line-height: 1.6; }

/* ========== قوانین ========== */
.terms-content { padding: 60px 0; background: var(--terms-light); }
.terms-content__grid { display: flex; flex-direction: column; gap: 16px; }

.terms-card {
    background: var(--terms-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}
.terms-card:hover { box-shadow: var(--shadow-md); }

.terms-card__header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 24px;
    cursor: pointer;
    background: var(--terms-white);
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s;
}
.terms-card__header:hover { background: var(--terms-light); }

.terms-card__icon { font-size: 28px; }
.terms-card__header h2 { font-size: 18px; color: var(--terms-dark); margin: 0; flex: 1; }

.terms-card__toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--terms-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.terms-card__toggle svg { stroke: var(--terms-gray); transition: transform 0.3s; }
.terms-card__toggle.active svg { transform: rotate(180deg); }
.terms-card__toggle:hover { background: #e2e8f0; }

.terms-card__content {
    display: none;
    padding: 0 24px;
    background: var(--terms-white);
}
.terms-card__content.active { display: block; }

.terms-card__list {
    list-style: none;
    padding: 20px 0;
}
.terms-card__list li {
    padding: 10px 0;
    padding-right: 24px;
    position: relative;
    color: var(--terms-gray);
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px solid #f1f5f9;
}
.terms-card__list li:last-child { border-bottom: none; }
.terms-card__list li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: var(--terms-primary);
    font-weight: bold;
    font-size: 16px;
}

/* ========== اسکلتون ========== */
.skeleton-term {
    background: var(--terms-white);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    animation: pulse 1.2s ease infinite;
}
.skeleton-header {
    width: 40%;
    height: 24px;
    background: #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}
.skeleton-line {
    height: 16px;
    background: #e2e8f0;
    border-radius: 6px;
    margin: 12px 0;
}
.skeleton-line:nth-child(2) { width: 95%; }
.skeleton-line:nth-child(3) { width: 85%; }
.skeleton-line:nth-child(4) { width: 75%; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .terms-container { padding: 0 16px; }
    .terms-hero__content { flex-direction: column; text-align: center; }
    .terms-hero__text h1 { font-size: 32px; }
    .terms-notice__content { flex-direction: column; text-align: center; }
    .terms-card__header { flex-wrap: wrap; }
    .terms-card__header h2 { width: calc(100% - 50px); font-size: 16px; }
    .terms-card__list li { font-size: 13px; }
}

/* ========== هشدار تغییرات قوانین ========== */
.terms-alert {
    padding: 15px 0;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
}
.terms-alert__content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.terms-alert__icon { font-size: 24px; }
.terms-alert__text { color: #991b1b; font-size: 14px; line-height: 1.5; }
.terms-alert__text strong { color: #dc2626; }

/* ========== جستجو ========== */
.terms-search { padding: 30px 0; background: var(--terms-light); }
.terms-search__box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}
.terms-search__input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 15px;
    background: white;
    transition: 0.3s;
}
.terms-search__input:focus {
    outline: none;
    border-color: var(--terms-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.terms-search__clear {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #94a3b8;
    padding: 0 5px;
}
.terms-search__clear:hover { color: #ef4444; }
.terms-search__result {
    margin-top: 20px;
    display: none;
}
.search-results, .search-no-result {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.search-results h4 { margin-bottom: 15px; color: var(--terms-dark); }
.search-results ul { list-style: none; }
.search-results li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: var(--terms-gray);
}
.search-results li:last-child { border-bottom: none; }
.search-results li strong { color: var(--terms-primary); }
.search-results mark { background: #fef3c7; color: #92400e; padding: 2px 4px; border-radius: 4px; }
.search-no-result { text-align: center; color: var(--terms-gray); }

/* ========== کارت بازگشت وجه ویژه ========== */
.refund-card {
    border-right: 4px solid #f59e0b;
    background: #fffbeb;
}
.refund-card .terms-card__header { background: #fffbeb; }
.refund-card .terms-card__icon { color: #f59e0b; }

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .terms-alert__content { text-align: center; justify-content: center; }
}


/* ========== قوانین سرویس دهی چیست ========== */
.terms-about { padding: 50px 0; background: white; }
.terms-about__card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 24px;
    padding: 35px;
    text-align: center;
    border: 1px solid #bae6fd;
}
.terms-about__icon { font-size: 48px; margin-bottom: 15px; }
.terms-about__card h2 { font-size: 24px; color: #0c4a6e; margin-bottom: 20px; }
.terms-about__card p { color: #075985; line-height: 1.8; margin-bottom: 20px; text-align: justify; }
.terms-about__note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fef9c3;
    padding: 15px;
    border-radius: 16px;
    margin-top: 20px;
}
.terms-about__note span { font-size: 24px; }
.terms-about__note p { margin: 0; color: #854d0e; }

/* ========== جستجو (بهبود یافته) ========== */
.terms-search { padding: 40px 0; background: var(--terms-light); }
.terms-search__wrapper {
    max-width: 700px;
    margin: 0 auto;
}
.terms-search__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--terms-dark);
}
.terms-search__label span:first-child { font-size: 20px; }
.terms-search__box {
    position: relative;
    width: 100%;
}
.terms-search__input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 60px;
    font-size: 15px;
    background: white;
    transition: 0.3s;
    padding-left: 50px;
}
.terms-search__input:focus {
    outline: none;
    border-color: var(--terms-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.terms-search__clear {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #94a3b8;
    padding: 5px;
}
.terms-search__clear:hover { color: #ef4444; }
.terms-search__result { margin-top: 25px; display: none; }

/* ========== سوالات متداول درباره قوانین ========== */
.terms-faq { padding: 60px 0; background: white; }
.terms-faq__header { text-align: center; margin-bottom: 40px; }
.terms-faq__header h2 { font-size: 28px; color: var(--terms-dark); margin-bottom: 8px; }
.terms-faq__header p { color: var(--terms-gray); }
.terms-faq__grid { max-width: 800px; margin: 0 auto; }
.terms-faq-item {
    background: var(--terms-light);
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
}
.terms-faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    cursor: pointer;
    transition: 0.3s;
}
.terms-faq__question:hover { background: #e2e8f0; }
.terms-faq__question span { font-weight: 600; color: var(--terms-dark); font-size: 15px; }
.terms-faq__toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: var(--terms-primary);
}
.terms-faq__answer {
    display: none;
    padding: 0 24px 20px;
    color: var(--terms-gray);
    line-height: 1.7;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
}

/* ========== هدر بخش قوانین ========== */
.terms-content__header {
    text-align: center;
    margin-bottom: 30px;
}
.terms-content__header h2 { font-size: 26px; color: var(--terms-dark); margin-bottom: 6px; }
.terms-content__header p { color: var(--terms-gray); font-size: 14px; }