/* =========================================================
   FAYADH WEBSITE — BASE
   Design tokens, reset, layout helpers and accessibility.
   Loaded first; every other stylesheet uses these variables.
========================================================= */


/* =========================================================
   1. DESIGN TOKENS
========================================================= */

:root {
    /* Brand Colors (same as the app's AppColors) */
    --primary: #006045;
    --primary-dark: #004D38;
    --primary-light: #E8F4ED;

    --secondary: #14B8A6;
    --secondary-tint: rgba(20, 184, 166, 0.08);

    --highlight: #FFB703;   /* app's highlightedStateColor (rating stars) */

    /* Text Colors */
    --heading: #172B25;
    --text: #64748B;
    --text-dark: #334155;
    --text-nav: #52635B;
    --text-light: #94A3B8;

    /* Background Colors */
    --white: #FFFFFF;
    --background: #F5F8F6;
    --background-cool: #F5F8FA;
    --border: #E5EBE7;

    /* Typography */
    --font-en: 'Manrope', sans-serif;
    --font-ar: 'Tajawal', sans-serif;

    /* Layout */
    --container-width: 1240px;
    --header-height: 72px;   /* 76px ≥ 1440px, 64px ≤ 1100px (see header.css) */

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(20, 50, 35, 0.06);
    --shadow-md: 0 8px 24px rgba(20, 50, 35, 0.10);

    --focus-ring: rgba(0, 96, 69, 0.35);

    --transition: all 0.25s ease;
}


/* =========================================================
   2. RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 18px);   /* anchor links land below the sticky header */
}

body {
    width: 100%;
    min-height: 100vh;

    font-family: var(--font-en);
    font-size: 16px;
    line-height: 1.5;

    color: var(--heading);
    background: var(--white);

    overflow-x: hidden;
}

html[lang="ar"] body {
    font-family: var(--font-ar);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}


/* =========================================================
   3. LAYOUT HELPERS
========================================================= */

.container {
    width: min(100% - 48px, var(--container-width));
    margin-inline: auto;
}

.section-padding {
    padding-block: 48px;
}

@media (max-width: 860px) {

    .section-padding {
        padding-block: 40px;
    }

}


/* =========================================================
   4. SECTION HEADINGS, BADGE & TITLE BAND
   Shared by every page section:
   small label (eyebrow) → title → subtitle, centred.
   .badge: green pill label used above page/panel titles.
   .title-band: title area at the top of inner pages.
========================================================= */

.section-header {
    max-width: 680px;

    margin-inline: auto;
    margin-bottom: 32px;

    text-align: center;
}

.section-eyebrow {
    display: inline-block;

    color: var(--primary);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}

html[dir="rtl"] .section-eyebrow {
    letter-spacing: 0;
}

.section-title {
    margin-top: 8px;

    color: var(--heading);

    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: -0.01em;
}

html[dir="rtl"] .section-title {
    line-height: 1.4;
    letter-spacing: 0;
}

.section-subtitle {
    margin-top: 10px;

    color: var(--text);

    font-size: 15px;
    line-height: 1.65;
}

@media (max-width: 860px) {

    .section-header {
        margin-bottom: 24px;
    }

}


/* Pill badge: small green label above a heading. */

.badge {
    display: inline-block;

    padding: 7px 14px;

    background: var(--primary-light);
    color: var(--primary);

    border-radius: 999px;

    font-size: 13px;
    font-weight: 700;
}


/* Page title band: centred title at the top of inner pages
   (services, privacy, terms). */

.title-band {
    padding-block: 56px 48px;

    background:
        radial-gradient(circle at 10% 0%, var(--secondary-tint), transparent 45%),
        var(--background-cool);

    border-bottom: 1px solid var(--border);

    text-align: center;
}

.title-band-title {
    margin-top: 16px;

    color: var(--heading);

    font-size: clamp(32px, 4.4vw, 48px);
    font-weight: 800;
    line-height: 1.2;
}

html[dir="rtl"] .title-band-title {
    line-height: 1.4;
}

.title-band-text {
    max-width: 620px;

    margin: 14px auto 0;

    color: var(--text);

    font-size: 16px;
    line-height: 1.7;
}

@media (max-width: 600px) {

    .title-band {
        padding-block: 40px 36px;
    }

}


/* =========================================================
   5. BUTTONS
   .button + a style modifier:
   .button-primary (green) or .button-secondary (outlined).
========================================================= */

.button {
    min-height: 50px;

    padding: 0 26px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 1px solid transparent;
    border-radius: 10px;

    font-size: 15px;
    font-weight: 700;

    white-space: nowrap;

    transition: var(--transition);
}

.button-primary {
    background: var(--primary);
    color: var(--white);
}

.button-primary:hover {
    background: var(--primary-dark);

    box-shadow: var(--shadow-md);

    transform: translateY(-2px);
}

.button-secondary {
    background: var(--white);
    color: var(--primary);

    border-color: var(--border);
}

.button-secondary:hover {
    background: var(--primary-light);

    border-color: var(--primary-light);
}

/* Arrows point the reading direction. */

.button-arrow {
    display: inline-block;

    transition: var(--transition);
}

html[dir="rtl"] .button-arrow {
    transform: scaleX(-1);
}


/* =========================================================
   6. STORE BUTTONS
   Google Play / App Store buttons, used in several sections.
   Links come from the API (js/core/app-links.js).
   .store-button-light: white version for dark backgrounds.
========================================================= */

.store-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
}

.store-button {
    min-width: 180px;
    min-height: 58px;

    padding: 9px 20px;

    display: inline-flex;
    align-items: center;

    gap: 12px;

    background: var(--heading);
    color: var(--white);

    border-radius: 12px;

    transition: var(--transition);
}

.store-button:hover {
    background: var(--primary);

    box-shadow: var(--shadow-md);

    transform: translateY(-2px);
}

.store-icon {
    width: 26px;
    height: 26px;

    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;

    line-height: 1.15;

    text-align: start;
}

.store-text small {
    font-size: 11px;
    font-weight: 500;

    opacity: 0.8;
}

.store-text strong {
    font-family: var(--font-en);
    font-size: 17px;
    font-weight: 700;
}


/* Light version (on green / dark backgrounds) */

.store-button-light {
    background: var(--white);
    color: var(--heading);
}

.store-button-light:hover {
    background: var(--primary-light);
    color: var(--primary);
}


/* Small phones: full-width, stacked */

@media (max-width: 420px) {

    .store-buttons {
        width: 100%;

        flex-direction: column;
    }

    .store-button {
        justify-content: center;
    }

}


/* =========================================================
   7. LANGUAGE-SPECIFIC CONTENT
   Long texts (e.g. the legal pages) keep both versions in
   the HTML: data-lang-only="en" / "ar". Only the one for the
   current language is shown. Without JavaScript the page
   stays in English (<html lang="en">).
========================================================= */

html:not([lang="ar"]) [data-lang-only="ar"],
html[lang="ar"] [data-lang-only="en"] {
    display: none;
}


/* =========================================================
   8. ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}
