/* ==========================================================================
   Base: fonts, design tokens, element defaults, shared components.
   Loaded on every page, after Bootstrap.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "GE Dinar Two";
    src: url("../fonts/ge-dinar-two-medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Avenir";
    src: url("../fonts/avenir-heavy.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Avenir";
    src: url("../fonts/avenir-black.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    --color-white: #fff;
    --color-black: #0a0a0a;
    --color-Primary1: #8d1738;
    --color-Primary2: rgba(141, 23, 57, 0.2);
    --color-Primary3: #f6edf0;
    --color-gray: rgba(138, 138, 138, 1);
    --color-error: #c0392b;

    --scrollbarBG: #d3d0d05b;
    --thumbBG: var(--color-Primary1);

    /* Avenir has no Arabic glyphs, so Arabic text in the Latin stack falls through to GE Dinar Two. */
    --font-arabic: "GE Dinar Two", "Segoe UI", Tahoma, Arial, sans-serif;
    --font-latin: "Avenir", "GE Dinar Two", system-ui, sans-serif;

    --font-body: var(--font-arabic);
    --font-heading: var(--font-arabic);
    --font-heading-weight: 500;
    --font-ui: var(--font-arabic); /* buttons, footer links, company names: same face in both languages */
}

/* Avenir ships in two cuts here: Heavy (800) for text and headings, Black (900) for section titles. */
html[lang="en"] {
    --font-body: var(--font-latin);
    --font-heading: var(--font-latin);
    --font-heading-weight: 800;
}

/* ---------- Element defaults (no CSS framework is loaded) ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: smooth;
    }
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    position: relative;
    z-index: 1;
    color: var(--color-white);
    background-color: #fff;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: thin;
    scrollbar-color: var(--thumbBG) var(--scrollbarBG);
}

html[dir="rtl"] body {
    text-align: right;
}

body::-webkit-scrollbar {
    width: 11px;
}

body::-webkit-scrollbar-track {
    background: var(--scrollbarBG);
}

body::-webkit-scrollbar-thumb {
    background-color: var(--thumbBG);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight);
    line-height: 1.2;
    margin: 0;
}

h1 {
    font-size: 34px;
}

h2 {
    font-size: 20px;
    line-height: 30px;
}

h3 {
    font-size: 18px;
}

h4 {
    font-size: 16px;
    line-height: 30px;
}

p {
    font-size: 17px;
    margin: 0;
    line-height: 30px;
    color: var(--color-white);
}

strong {
    font-weight: bolder;
}

a {
    text-decoration: none;
    color: var(--color-white);
    font-size: 17px;
}

a,
button {
    transition: all 0.3s ease;
}

ul {
    margin: auto;
    padding: 0;
}

li {
    display: block;
}

img,
svg {
    vertical-align: middle;
}

img {
    max-width: 100%;
    user-select: none;
}

label {
    display: inline-block;
}

button,
input,
select {
    margin: 0;
    font-family: var(--font-ui);
    font-size: inherit;
    line-height: inherit;
}

button {
    border-radius: 0;
}

button:not(:disabled) {
    cursor: pointer;
}

select {
    appearance: none;
    color: var(--color-black);
}

fieldset {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

iframe {
    border: 0;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--color-Primary1);
    outline-offset: 2px;
}

::selection {
    color: #fff;
    background-color: var(--color-Primary1);
}

/* ---------- Grid: 12 columns, 24px gutters; md >= 768px, lg >= 992px, xl >= 1200px ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -12px;
}

.row > * {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    padding-inline: 12px;
}

.col-3 { width: 25%; }
.col-4 { width: 33.33333333%; }
.col-6 { width: 50%; }
.col-8 { width: 66.66666667%; }
.col-12 { width: 100%; }

@media (min-width: 768px) {
    .col-md-4 { width: 33.33333333%; }
    .col-md-6 { width: 50%; }
}

@media (min-width: 992px) {
    .col-lg-3 { width: 25%; }
    .col-lg-4 { width: 33.33333333%; }
    .col-lg-6 { width: 50%; }
}

@media (min-width: 1200px) {
    .col-xl-2 { width: 16.66666667%; }
}

/* Read by screen readers and search engines, not shown */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Layout helpers ---------- */
.main-container {
    width: 90%;
    margin: auto;
}

.sub-title {
    font-size: 32px;
    color: var(--color-Primary1);
    text-align: center;
}

html[lang="en"] .sub-title {
    font-weight: 900;
}

/* Latin digits / latin-only strings that must not be shaped by the Arabic face */
.latin {
    font-family: var(--font-latin);
}

/* ---------- Buttons ---------- */
.ctm-btn1 {
    height: 40px;
    border-radius: 10px;
    font-family: var(--font-ui);
    font-size: 16px;
    text-align: center;
    align-content: center;
    display: inline-block;
    padding: 10px;
    width: fit-content;
    cursor: pointer;
}

.ctm-btn1 {
    background-color: var(--color-Primary1);
    color: var(--color-white);
    border: 1px solid transparent;
}

.ctm-btn1:hover {
    background-color: transparent;
    color: var(--color-Primary1);
    border-color: var(--color-Primary1);
}

.lang-switch {
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid var(--color-Primary1);
    background: #fff;
    color: var(--color-Primary1);
    font-size: 14px;
    cursor: pointer;
}

.lang-switch:hover {
    background: var(--color-Primary1);
    color: #fff;
}

/* ---------- Scroll reveal (see site.js) ---------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .sub-title {
        font-size: 26px;
    }
}

@media (max-width: 576px) {
    .sub-title {
        font-size: 21px;
    }
}

@media (max-width: 450px) {
    .ctm-btn1 {
        font-size: 14px;
    }
}
