/* Hub & navigation — Flutterwave-inspired layout */
.terms-body {
    background: #f6f8fb;
}

.terms-top-header {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.terms-top-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
}

.terms-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.terms-logo {
    height: 36px;
}

.terms-brand-title {
    display: block;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.05rem;
}

.terms-brand-sub {
    display: block;
    font-size: .8rem;
    color: #6c757d;
    font-weight: 500;
}

.terms-top-nav {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.terms-top-nav a {
    color: #2c3e50;
    text-decoration: none;
    padding: .45rem .75rem;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 600;
    transition: background .2s, color .2s;
    display: inline-flex;
    align-items: center;
    min-height: auto;
}

.terms-top-nav a:hover {
    background: rgba(246,143,51,.1);
    color: #e67e22;
}

.terms-btn-primary {
    background: #f68f33 !important;
    color: #fff !important;
}

.terms-btn-primary:hover {
    background: #e67e22 !important;
}

.terms-mobile-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #2c3e50;
    padding: .5rem;
}

.terms-main {
    padding: 2rem 0 3rem;
    min-height: 60vh;
}

.terms-breadcrumb {
    font-size: .88rem;
    color: #6c757d;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

.terms-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.terms-breadcrumb a:hover {
    text-decoration: underline;
}

.terms-breadcrumb-sep {
    color: #adb5bd;
}

.terms-page-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 .5rem;
}

.terms-page-desc {
    color: #6c757d;
    font-size: 1.05rem;
    margin: 0 0 1.5rem;
    max-width: 720px;
    font-weight: 500;
}

.terms-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.terms-hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: .5rem;
}

.terms-hero-desc {
    color: #6c757d;
    font-weight: 500;
}

.terms-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.terms-role-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.terms-role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    border-color: #f68f33;
}

.terms-role-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(246,143,51,.12);
    color: #f68f33;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.terms-role-card h3 {
    font-size: 1.15rem;
    margin: 0;
}

.terms-role-card p {
    color: #6c757d;
    font-size: .92rem;
    margin: 0;
    flex: 1;
    font-weight: 500;
}

.terms-role-cta {
    color: #f68f33;
    font-size: .88rem;
    font-weight: 700;
}

.terms-section-block {
    margin-bottom: 2.5rem;
}

.terms-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: .35rem;
}

.terms-section-desc {
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 500;
}

.terms-rent-types {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.terms-rent-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.15rem;
    background: #fff;
    border: 2px solid #e8ecf1;
    border-radius: 50px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 700;
    font-size: .95rem;
    transition: all .2s;
}

.terms-rent-pill:hover {
    border-color: #f68f33;
    background: rgba(246,143,51,.08);
    color: #e67e22;
}

.terms-rent-pill--primary {
    border-color: #f68f33;
    background: rgba(246,143,51,.1);
}

.terms-rent-banner {
    background: linear-gradient(135deg, rgba(246,143,51,.12), rgba(52,152,219,.08));
    border: 1px solid #fdebd0;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.terms-rent-banner h2 {
    font-size: 1.1rem;
    margin: 0 0 .35rem;
}

.terms-rent-banner p {
    margin: 0 0 1rem;
    color: #6c757d;
    font-weight: 500;
}

.terms-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.terms-card-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.terms-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

a.terms-card.terms-card--compact {
    padding: 1.5rem 1.4rem;
    min-height: 148px;
    border-radius: 14px;
    gap: 0.45rem;
    box-shadow: 0 2px 10px rgba(44, 62, 80, 0.06);
    border-color: #dde3ea;
}

a.terms-card.terms-card--compact:hover {
    transform: translateY(-3px);
    border-color: #f68f33;
    box-shadow: 0 10px 28px rgba(246, 143, 51, 0.14);
}

.terms-card--compact .terms-card-cat {
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.35rem 0.7rem;
    margin-bottom: 0.65rem;
    border-radius: 6px;
}

/* ألوان التصنيفات */
.terms-card-cat--tenant {
    color: #1a6fa8;
    background: rgba(41, 128, 185, 0.16);
    border: 1px solid rgba(41, 128, 185, 0.25);
}

.terms-card-cat--owner {
    color: #c0650a;
    background: rgba(230, 126, 34, 0.16);
    border: 1px solid rgba(230, 126, 34, 0.28);
}

.terms-card-cat--buyer {
    color: #1e8449;
    background: rgba(39, 174, 96, 0.16);
    border: 1px solid rgba(39, 174, 96, 0.28);
}

.terms-card-cat--general {
    color: #7d3c98;
    background: rgba(142, 68, 173, 0.16);
    border: 1px solid rgba(142, 68, 173, 0.28);
}

.terms-topics-group {
    margin-bottom: 2.25rem;
    padding: 1.25rem 1.35rem 1.35rem;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 16px;
    border-inline-start: 5px solid #dde3ea;
}

.terms-topics-group.terms-card-cat--tenant { border-inline-start-color: #2980b9; }
.terms-topics-group.terms-card-cat--owner { border-inline-start-color: #e67e22; }
.terms-topics-group.terms-card-cat--buyer { border-inline-start-color: #27ae60; }
.terms-topics-group.terms-card-cat--general { border-inline-start-color: #8e44ad; }

.terms-topics-group-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 1.15rem;
}

.terms-topics-group-header .terms-card-cat {
    font-size: 0.95rem;
    padding: 0.45rem 0.85rem;
    margin: 0;
}

.terms-topics-group-header .terms-card-cat i {
    margin-left: 0.35rem;
}

.terms-topics-group-desc {
    flex: 1 1 200px;
    margin: 0;
    color: #4a5f73;
    font-size: 0.95rem;
    font-weight: 600;
}

.terms-topics-group-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    min-height: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
}

.terms-topics-group-link:hover {
    color: #f68f33;
}

a.terms-card--compact.terms-card--tenant:hover {
    border-color: #2980b9;
    box-shadow: 0 10px 28px rgba(41, 128, 185, 0.14);
}

a.terms-card--compact.terms-card--owner:hover {
    border-color: #e67e22;
    box-shadow: 0 10px 28px rgba(230, 126, 34, 0.14);
}

a.terms-card--compact.terms-card--buyer:hover {
    border-color: #27ae60;
    box-shadow: 0 10px 28px rgba(39, 174, 96, 0.14);
}

a.terms-card--compact.terms-card--general:hover {
    border-color: #8e44ad;
    box-shadow: 0 10px 28px rgba(142, 68, 173, 0.14);
}

.terms-card--compact .terms-card-title {
    font-size: 1.2rem !important;
    line-height: 1.5;
    color: #1a2634;
    margin: 0 0 0.55rem;
    font-weight: 800;
}

.terms-card--compact .terms-card-desc {
    font-size: 1rem !important;
    color: #2c3e50;
    opacity: 1;
    margin: 0;
    line-height: 1.65;
    font-weight: 600;
}

a.terms-card .terms-card-title,
a.terms-card .terms-card-desc,
a.terms-card .terms-card-link,
a.terms-card .terms-card-cat {
    display: block;
    width: 100%;
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
}

.terms-card:hover {
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52,152,219,.12);
}

.terms-card-cat {
    display: inline-block;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .02em;
    padding: .35rem .7rem;
    border-radius: 6px;
    margin-bottom: .5rem;
}

.terms-related-card .terms-card-cat {
    margin-bottom: 0.45rem;
}

.terms-card-title {
    font-size: 1.05rem;
    margin: 0 0 .4rem;
    font-weight: 800;
}

.terms-card-desc {
    font-size: .88rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.terms-card-link {
    display: inline-block;
    margin-top: .75rem;
    font-size: .85rem;
    color: #3498db;
    font-weight: 700;
}

.terms-article {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

.terms-article-body {
    line-height: 1.75;
}

.terms-article-body .section {
    padding: 0;
    margin: 0;
    box-shadow: none;
    background: transparent;
}

.terms-related {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e8ecf1;
}

.terms-related-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.terms-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* Override legacy terms.css: all <a> were display:flex row */
a.terms-related-card,
a.terms-card,
a.terms-role-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: auto;
    gap: 0.35rem;
    text-align: right;
    width: 100%;
    min-width: 0;
}

.terms-related-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    padding: 1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s;
}

.terms-related-card:hover {
    border-color: #f68f33;
}

.terms-related-card h3 {
    display: block;
    width: 100%;
    font-size: 1rem;
    line-height: 1.45;
    margin: 0;
    font-weight: 800;
    color: #2c3e50;
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
}

.terms-related-card p {
    display: block;
    width: 100%;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
}

.terms-related-back {
    margin-top: 1.25rem;
    text-align: center;
}

.terms-related-back a {
    color: #3498db;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: auto;
}

.terms-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2.5rem 0 1.5rem;
    margin-top: 2rem;
}

.terms-footer h3 {
    font-size: 1rem;
    margin-bottom: .75rem;
}

.terms-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-footer li {
    margin-bottom: .4rem;
    font-size: .9rem;
    font-weight: 500;
}

.terms-footer a {
    color: #bdc3c7;
    text-decoration: none;
}

.terms-footer a:hover {
    color: #f68f33;
}

.terms-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.terms-footer-copy {
    text-align: center;
    font-size: .85rem;
    color: #95a5a6;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1rem;
    margin: 0;
    font-weight: 500;
}

@media (max-width: 1100px) {
    .terms-card-grid--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .terms-mobile-toggle {
        display: block;
    }

    .terms-card-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .terms-card--compact .terms-card-title {
        font-size: 1.05rem !important;
    }

    .terms-card--compact .terms-card-desc {
        font-size: 0.92rem !important;
    }

    a.terms-card.terms-card--compact {
        padding: 1.15rem 1rem;
        min-height: 130px;
    }

    .terms-top-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid #e8ecf1;
        box-shadow: 0 8px 20px rgba(0,0,0,.08);
    }

    .terms-top-nav.is-open {
        display: flex;
    }

    .terms-top-header-inner {
        position: relative;
        flex-wrap: wrap;
    }

    .terms-article {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .terms-card-grid--compact {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   تحديث الهوية البصرية لتطابق تصميم أمرتيل الجديد (دافئ/برتقالي)
   ملاحظة: مُلحق في نهاية الملف ليتجاوز القواعد السابقة بأمان
   ========================================================= */
:root{
    --amartil-orange:#ff7800;
    --amartil-orange-dark:#e85d04;
}

.terms-body{ background:#f6f7f9; }

/* الترويسة العلوية */
.terms-top-header{ box-shadow:0 1px 0 #ececf0, 0 6px 18px rgba(20,30,60,.05); }
.terms-top-nav a:hover{ background:#fff4ea; color:var(--amartil-orange-dark); }
.terms-btn-primary{ background:var(--amartil-orange) !important; border-radius:999px; }
.terms-btn-primary:hover{ background:var(--amartil-orange-dark) !important; }

/* هيرو الصفحة الرئيسية للشروط */
.terms-hub-header{
    background:linear-gradient(135deg,#fff3e6 0%, #ffe9d6 100%);
    border:1px solid #ffe0c2;
    border-radius:22px;
    padding:40px 28px;
    text-align:center;
    margin-bottom:2.25rem;
    box-shadow:0 10px 30px rgba(232,93,4,.06);
}
.terms-hub-header .terms-page-title{
    font-size:clamp(1.8rem,4.2vw,2.6rem);
    margin-bottom:.6rem;
}
.terms-hub-header .terms-page-desc{
    margin-inline:auto;
    color:#8a5a2b;
}

/* قسم "من أنت؟" */
.terms-hero-title{ color:#1f2a37; }

/* بطاقات الفئات */
.terms-role-icon{
    background:linear-gradient(135deg, var(--amartil-orange), #ff9a3c);
    color:#fff;
}
.terms-role-card:hover{
    border-color:var(--amartil-orange);
    box-shadow:0 14px 30px rgba(232,93,4,.12);
}
.terms-role-cta{ color:var(--amartil-orange-dark); }

/* عناوين الأقسام: شريط برتقالي جانبي */
.terms-section-title{
    position:relative;
    padding-inline-start:15px;
}
.terms-section-title::before{
    content:"";
    position:absolute;
    inset-inline-start:0;
    top:.18em;
    bottom:.18em;
    width:5px;
    border-radius:4px;
    background:var(--amartil-orange);
}

/* روابط "عرض الكل" والحبوب */
.terms-topics-group-link{ color:var(--amartil-orange-dark); }
.terms-topics-group-link:hover{ color:var(--amartil-orange); }
.terms-rent-pill:hover{
    border-color:var(--amartil-orange);
    background:#fff4ea;
    color:var(--amartil-orange-dark);
}

/* التذييل: لمسة أنعم */
.terms-footer{ background:#1f2a37; }
.terms-footer a:hover{ color:var(--amartil-orange); }
