/* ==========================================================================
   Base Styles — Reset, Typography, RTL Support
   ========================================================================== */

/* ── Modern Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-arabic);
    font-size: var(--text-base);
    line-height: var(--leading-loose);
    color: var(--color-slate-200);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── RTL Direction ── */
html[dir="rtl"] body {
    text-align: right;
}

/* ── Links ── */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

/* ── Images ── */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Lists ── */
ul,
ol {
    list-style: none;
}

/* ── Headings ── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-arabic);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-slate-50);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

/* English headings use display font */
[lang="en"] h1,
[lang="en"] h2,
[lang="en"] h3,
[lang="en"] h4,
[lang="en"] h5,
[lang="en"] h6,
.heading-en {
    font-family: var(--font-display);
}

/* ── Body Text ── */
p {
    margin-bottom: var(--space-4);
    line-height: var(--leading-loose);
}

[lang="en"] p,
.text-en {
    font-family: var(--font-body);
    line-height: var(--leading-normal);
}

/* ── Selection ── */
::selection {
    background-color: rgba(47, 183, 106, 0.3);
    color: var(--color-slate-50);
}

/* ── Focus Styles ── */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-slate-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-slate-600);
}

/* ── Utility Classes ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-accent {
    color: var(--color-accent);
}

.text-muted {
    color: var(--color-slate-400);
}

.text-center {
    text-align: center;
}

/* ── WordPress Core Alignment Classes ── */
.alignnone,
.aligncenter,
.alignleft,
.alignright {
    margin: var(--space-4) 0;
}

.aligncenter {
    display: block;
    margin-inline: auto;
}

.alignleft {
    float: left;
    margin-inline-end: var(--space-6);
}

.alignright {
    float: right;
    margin-inline-start: var(--space-6);
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    margin-top: var(--space-2);
}