/* ================================================================
   الرقية – FAQ + Mobile Menu  |  Front-end Styles
   RTL / Arabic – Luxury Green & Gold Palette
   ================================================================ */

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ════════════════════════════════════════════════════════════════
   FAQ ACCORDION
   ════════════════════════════════════════════════════════════════ */

.rfm-faq-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: rtl;
    position: relative;
    font-family: 'Segoe UI', 'Noto Naskh Arabic', Tahoma, sans-serif;
}

/* ── Dots pattern (CSS only – matches screenshot background) ── */
.rfm-faq-wrap.rfm-has-pattern::before,
.rfm-faq-wrap.rfm-has-pattern::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, #d0c9be 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: .45;
}

.rfm-faq-wrap.rfm-has-pattern > * { position: relative; z-index: 1; }

/* ── Single Item ─────────────────────────────────────────────── */
.rfm-faq-item {
    background-color: #ffffff;
    border: 1.5px solid #e8e2d9;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.rfm-faq-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

.rfm-faq-item.is-open {
    border-color: #b8985a;
    box-shadow: 0 4px 24px rgba(184,152,90,.12);
}

/* ── Header (button) ─────────────────────────────────────────── */
.rfm-faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 22px 28px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    direction: rtl;
    gap: 16px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.rfm-faq-question {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    transition: color .2s;
}

/* ── Icon (chevron) ──────────────────────────────────────────── */
.rfm-faq-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid #b8985a;
    border-radius: 50%;
    color: #b8985a;
    transition: transform .35s cubic-bezier(.4,0,.2,1), background-color .2s;
    order: -1; /* appears on the left in RTL = visual right */
}

.rfm-faq-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    /* Pointing up by default (item closed = chevron up = show it collapsed) */
    transform: rotate(180deg);
}

/* When open: chevron rotates to point up (expanded) */
.rfm-faq-item.is-open .rfm-faq-icon svg {
    transform: rotate(0deg);
}

.rfm-faq-item.is-open .rfm-faq-icon {
    background-color: #b8985a;
    color: #fff;
    border-color: #b8985a;
}

/* ── Answer ──────────────────────────────────────────────────── */
.rfm-faq-answer {
    overflow: hidden;
}

.rfm-faq-answer-inner {
    padding: 0 28px 24px;
    border-top: 1.5px solid #e8e2d9;
    background-color: #fdfcf9;
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    direction: rtl;
    text-align: right;
}

.rfm-faq-answer-inner p {
    margin: 14px 0 0;
}

.rfm-faq-answer-inner p:first-child { margin-top: 20px; }

/* ── Slide animation ─────────────────────────────────────────── */
.rfm-faq-answer {
    transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}

/* ════════════════════════════════════════════════════════════════
   MOBILE MENU TRIGGER
   ════════════════════════════════════════════════════════════════ */

.rfm-menu-trigger-wrap {
    display: inline-flex;
    align-items: center;
}

.rfm-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background .2s;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.rfm-trigger-btn:hover { background: rgba(74,124,64,.08); }
.rfm-trigger-btn:focus-visible { outline: 2px solid #4a7c40; }

/* ── Hamburger Lines ─────────────────────────────────────────── */
.rfm-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 22px;
}

.rfm-hamburger-line {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: #4a7c40;
    border-radius: 2px;
    transition: transform .3s ease, opacity .2s ease, width .3s ease;
    transform-origin: center;
}

.rfm-hamburger-line.rfm-line-mid { width: 70%; }

/* Animated state */
.rfm-trigger-btn.is-open .rfm-hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    width: 100%;
}
.rfm-trigger-btn.is-open .rfm-hamburger-line.rfm-line-mid {
    opacity: 0;
    transform: scaleX(0);
}
.rfm-trigger-btn.is-open .rfm-hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ── Dots Grid ───────────────────────────────────────────────── */
.rfm-dots-grid {
    display: grid !important;
    grid-template-columns: repeat(3,1fr);
    gap: 4px;
    width: 26px;
    height: 26px;
}

.rfm-hamburger-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #4a7c40;
    transition: transform .3s ease, opacity .2s;
}

/* ── Label ───────────────────────────────────────────────────── */
.rfm-trigger-label {
    font-size: 14px;
    font-weight: 600;
    color: #4a7c40;
    font-family: inherit;
}

/* ════════════════════════════════════════════════════════════════
   SIDEBAR OVERLAY
   ════════════════════════════════════════════════════════════════ */

.rfm-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background-color: rgba(0,0,0,.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.rfm-sidebar-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

/* ════════════════════════════════════════════════════════════════
   SIDEBAR PANEL
   ════════════════════════════════════════════════════════════════ */

.rfm-sidebar-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 99999;
    width: 320px;
    background-color: #1a2e18;
    display: flex;
    flex-direction: column;
    padding: 30px 0px;
    overflow-y: auto;
    overflow-x: hidden;
    direction: rtl;
    font-family: 'Segoe UI', 'Noto Naskh Arabic', Tahoma, sans-serif;

    /* Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(184,152,90,.3) transparent;

    /* Transition */
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

.rfm-sidebar-panel::-webkit-scrollbar { width: 4px; }
.rfm-sidebar-panel::-webkit-scrollbar-track { background: transparent; }
.rfm-sidebar-panel::-webkit-scrollbar-thumb { background: rgba(184,152,90,.3); border-radius: 4px; }

/* Position variants */
.rfm-sidebar-panel.rfm-pos-right {
    right: 0;
    left: auto;
    transform: translateX(100%);
    border-left: 1px solid rgba(184,152,90,.2);
}

.rfm-sidebar-panel.rfm-pos-left {
    left: 0;
    right: auto;
    transform: translateX(-100%);
    border-right: 1px solid rgba(184,152,90,.2);
}

.rfm-sidebar-panel.is-open {
    transform: translateX(0);
}

/* ── Ornaments ─────────────────────────────────────────────── */
.rfm-sidebar-ornament {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.rfm-ornament-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -80px;
    background: radial-gradient(circle, rgba(184,152,90,.15) 0%, transparent 70%);
}

.rfm-ornament-2 {
    width: 200px;
    height: 200px;
    bottom: 60px;
    left: -60px;
    background: radial-gradient(circle, rgba(74,124,64,.2) 0%, transparent 70%);
}

.rfm-sidebar-panel > * { position: relative; z-index: 1; }

/* ── Header ──────────────────────────────────────────────────── */
.rfm-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
}

.rfm-sidebar-logo img {
    max-width: 120px;
    height: auto;
    display: block;
}

.rfm-sidebar-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #b8985a;
    letter-spacing: .5px;
}

.rfm-sidebar-close {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(240,235,224,.7);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
    flex-shrink: 0;
    padding: 0;
}

.rfm-sidebar-close svg { width: 16px; height: 16px; stroke: currentColor; }

.rfm-sidebar-close:hover {
    background: rgba(184,152,90,.2);
    color: #b8985a;
    transform: rotate(90deg);
}

/* ── Divider ─────────────────────────────────────────────────── */
.rfm-sidebar-divider {
    height: 1px;
    background-color: #b8985a;
    opacity: .25;
    margin: 0 24px;
    flex-shrink: 0;
}

.rfm-mt-auto { margin-top: auto; }

/* ── Nav ─────────────────────────────────────────────────────── */
.rfm-sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.rfm-sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rfm-nav-item { position: relative; }

.rfm-sidebar-nav a,
.rfm-blog-cat-link,
.rfm-sidebar-cta,
.rfm-social-link {
    pointer-events: auto;
}

.rfm-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 24px;
    color: #f0ebe0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color .2s, background .2s, padding-right .2s;
    border-left: 3px solid transparent;
    position: relative;
}

/* Hover / Active */
.rfm-sidebar-nav a:hover,
.rfm-sidebar-nav a.active {
    color: #b8985a;
    background: rgba(184,152,90,.08);
    border-left-color: #b8985a;
    padding-right: 28px;
}

.rfm-nav-link-icon {
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8985a;
    flex-shrink: 0;
}

.rfm-nav-link-icon i, .rfm-nav-link-icon svg { font-size: 14px; }

.rfm-nav-link-text { flex: 1; }

.rfm-badge {
    background-color: #b8985a;
    color: #1a2e18;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    white-space: nowrap;
}

/* Arrow (left pointing in RTL context) */
.rfm-nav-arrow {
    opacity: 0;
    color: #b8985a;
    transform: translateX(4px);
    transition: opacity .2s, transform .2s;
    flex-shrink: 0;
}

.rfm-nav-arrow svg { width: 14px; height: 14px; stroke: currentColor; }

.rfm-sidebar-nav a:hover .rfm-nav-arrow,
.rfm-sidebar-nav a.active .rfm-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Separator line between nav items ─────────────────────────── */
.rfm-nav-item::after {
    content: '';
    display: block;
    margin: 0 24px;
    height: 1px;
    background: rgba(255,255,255,.05);
}

.rfm-nav-item:last-child::after { display: none; }

/* ── CTA Button ──────────────────────────────────────────────── */
.rfm-sidebar-cta-wrap {
    padding: 20px 24px 16px;
}

.rfm-sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background-color: #b8985a;
    color: #1a2e18 !important;
    font-size: 15px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    border: 2px solid #b8985a;
    transition: background .25s, transform .15s, box-shadow .2s;
    text-align: center;
}

.rfm-sidebar-cta:hover {
    background-color: #a4844a;
    border-color: #a4844a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184,152,90,.35);
}

.rfm-cta-arrow {
    font-size: 18px;
    line-height: 1;
    transition: transform .2s;
}

.rfm-sidebar-cta:hover .rfm-cta-arrow { transform: translateX(-4px); }

/* ── Social Icons ────────────────────────────────────────────── */
.rfm-sidebar-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    flex-wrap: wrap;
}

.rfm-social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(240,235,224,.7);
    text-decoration: none;
    font-size: 15px;
    transition: color .2s, border-color .2s, background .2s, transform .15s;
}

.rfm-social-link:hover {
    color: #b8985a;
    border-color: #b8985a;
    background: rgba(184,152,90,.1);
    transform: translateY(-2px);
}

.rfm-social-link i, .rfm-social-link svg { font-size: 14px; }

/* ── Copyright ───────────────────────────────────────────────── */
.rfm-sidebar-copy {
    text-align: center;
    font-size: 11px;
    color: rgba(240,235,224,.35);
    padding: 8px 24px 24px;
    margin: 0;
    line-height: 1.5;
}

/* ── Body lock when sidebar open ─────────────────────────────── */
body.rfm-sidebar-open {
    overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .rfm-sidebar-panel { width: 88vw !important; }
    .rfm-faq-question  { font-size: 15px; }
    .rfm-faq-header    { padding: 18px 20px; }
    .rfm-faq-answer-inner { padding: 0 20px 20px; }
}


/* ════════════════════════════════════════════════════════════════
   SIDEBAR — المدونة / Blog Categories Section
   ════════════════════════════════════════════════════════════════ */

.rfm-blog-cats-section {
    flex-shrink: 0;
}

/* Gap above the divider that precedes this block */
.rfm-divider-cats {
    margin-top: 4px;
    margin-bottom: 0;
}

/* Section header */
.rfm-blog-cats-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px 10px;
}

/* Vertical accent bar before title */
.rfm-blog-cats-title-bar {
    display: block;
    width: 3px;
    height: 18px;
    border-radius: 3px;
    background: #b8985a;
    flex-shrink: 0;
}

.rfm-blog-cats-title {
    font-size: 13px;
    font-weight: 700;
    color: #b8985a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-family: 'Segoe UI', 'Noto Naskh Arabic', Tahoma, sans-serif;
}

/* List */
.rfm-blog-cats-list {
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
}

.rfm-blog-cat-item {
    position: relative;
}

.rfm-blog-cat-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: #f0ebe0;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 400;
    transition: color 0.18s, background 0.18s, padding-right 0.18s;
    border-left: 2px solid transparent;
    position: relative;
}

.rfm-blog-cat-link:hover {
    color: #b8985a;
    background: rgba(184, 152, 90, 0.07);
    border-left-color: #b8985a;
    padding-right: 28px;
}

/* Dot indicator */
.rfm-cat-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b8985a;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.18s, transform 0.18s, background 0.18s;
}

.rfm-blog-cat-link:hover .rfm-cat-dot {
    opacity: 1;
    transform: scale(1.3);
}

/* Custom icon (when set) */
.rfm-cat-icon {
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8985a;
    flex-shrink: 0;
}

.rfm-cat-icon i,
.rfm-cat-icon svg {
    font-size: 13px;
}

/* Label */
.rfm-cat-label {
    flex: 1;
    line-height: 1.35;
}

/* Post count badge */
.rfm-cat-count {
    font-size: 11px;
    color: rgba(240, 235, 224, 0.45);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1px 8px;
    flex-shrink: 0;
    transition: color 0.18s;
    font-variant-numeric: tabular-nums;
}

.rfm-blog-cat-link:hover .rfm-cat-count {
    color: rgba(184, 152, 90, 0.75);
}

/* Chevron arrow — reuses .rfm-nav-arrow */
.rfm-blog-cat-link .rfm-nav-arrow {
    opacity: 0;
    color: #b8985a;
    transform: translateX(4px);
    transition: opacity 0.18s, transform 0.18s;
}

.rfm-blog-cat-link:hover .rfm-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Subtle separator between cat items */
.rfm-blog-cat-item::after {
    content: '';
    display: block;
    margin: 0 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
}

.rfm-blog-cat-item:last-child::after {
    display: none;
}
