/*
Theme Name: Thiqa
Theme URI: https://thiqa.com
Author: Thiqa Financial Technologies
Author URI: https://thiqa.com
Description: منصة ثقة — بوابتك للخدمات المصرفية الذكية في مصر. RTL-first financial platform theme.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://thiqa.com/license
Text Domain: thiqa
Tags: rtl-language, finance, arabic, custom-menu, featured-images, threaded-comments
*/

/* ==========================================================================
   DESIGN TOKENS — CSS Custom Properties
   ========================================================================== */
:root {
    /* Brand Colors */
    --color-navy:        #002E6D;
    --color-navy-light:  #0a3d7a;
    --color-navy-dark:   #001a40;
    --color-navy-glass:  rgba(0, 46, 109, 0.85);
    --color-gold:        #BFA163;
    --color-gold-light:  #d4b97a;
    --color-gold-dark:   #9e7e42;
    --color-gold-glass:  rgba(191, 161, 99, 0.15);

    /* Neutrals */
    --color-white:       #FFFFFF;
    --color-off-white:   #f8f9fc;
    --color-bg:          #f4f6fb;
    --color-bg-dark:     #eef1f8;
    --color-text:        #1a1a2e;
    --color-text-muted:  #5a6480;
    --color-text-light:  #8a94b0;
    --color-border:      rgba(0, 46, 109, 0.12);
    --color-border-gold: rgba(191, 161, 99, 0.3);

    /* Semantic */
    --color-success:     #10b981;
    --color-success-bg:  rgba(16, 185, 129, 0.1);
    --color-danger:      #ef4444;
    --color-danger-bg:   rgba(239, 68, 68, 0.1);
    --color-warning:     #f59e0b;
    --color-info:        #3b82f6;

    /* Typography */
    --font-en:  'Montserrat', sans-serif;
    --font-ar-text:    'Thmanyah Serif Text', 'Cairo', sans-serif;
    --font-ar-display: 'Thmanyah Serif Display', 'Cairo', sans-serif;
    --font-size-xs:   0.75rem;   /* 12px */
    --font-size-sm:   0.875rem;  /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-md:   1.125rem;  /* 18px */
    --font-size-lg:   1.25rem;   /* 20px */
    --font-size-xl:   1.5rem;    /* 24px */
    --font-size-2xl:  1.875rem;  /* 30px */
    --font-size-3xl:  2.25rem;   /* 36px */
    --font-size-4xl:  3rem;      /* 48px */
    --font-size-5xl:  3.75rem;   /* 60px */
    --line-height-tight:  1.25;
    --line-height-snug:   1.4;
    --line-height-normal: 1.6;
    --line-height-loose:  1.8;

    /* Spacing */
    --space-1:   0.25rem;
    --space-2:   0.5rem;
    --space-3:   0.75rem;
    --space-4:   1rem;
    --space-5:   1.25rem;
    --space-6:   1.5rem;
    --space-8:   2rem;
    --space-10:  2.5rem;
    --space-12:  3rem;
    --space-16:  4rem;
    --space-20:  5rem;
    --space-24:  6rem;
    --space-32:  8rem;

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs:   0 1px 3px rgba(0,46,109,0.06);
    --shadow-sm:   0 2px 8px rgba(0,46,109,0.08);
    --shadow-md:   0 4px 16px rgba(0,46,109,0.10);
    --shadow-card: 0 4px 24px rgba(0,46,109,0.10);
    --shadow-lg:   0 8px 40px rgba(0,46,109,0.14);
    --shadow-xl:   0 16px 64px rgba(0,46,109,0.18);
    --shadow-gold: 0 4px 24px rgba(191,161,99,0.25);
    --shadow-glow: 0 0 40px rgba(191,161,99,0.15);

    /* Transitions */
    --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast:  all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:  all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --container-max: 1280px;
    --container-pad: var(--space-8);
    --header-height: 120px;
    --ticker-height: 48px;
    --z-ticker:  10;
    --z-header:  100;
    --z-overlay: 200;
    --z-modal:   300;
    --z-toast:   400;
}

/* ==========================================================================
   GLOBAL RESETS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-ar-text);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* English content override */
:lang(en), .lang-en {
    font-family: var(--font-en);
    direction: ltr;
    text-align: left;
}

/* ==========================================================================
   TYPOGRAPHY RESETS
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ar-display);
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: var(--color-navy);
}

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover { color: var(--color-gold-dark); }

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol { list-style: none; }

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button { cursor: pointer; border: none; background: none; }

table { border-collapse: collapse; width: 100%; }

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.section {
    padding-block: var(--space-20);
}

.section--sm  { padding-block: var(--space-12); }
.section--lg  { padding-block: var(--space-32); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }

.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-center { text-align: center; }
.text-gold   { color: var(--color-gold); }
.text-navy   { color: var(--color-navy); }
.text-muted  { color: var(--color-text-muted); }

/* ==========================================================================
   SECTION HEADINGS
   ========================================================================== */
.section-label {
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--color-navy);
    margin-bottom: var(--space-4);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
    border-radius: var(--radius-full);
    margin-top: var(--space-3);
}

.section-title.centered::after {
    margin-inline: auto;
}

.section-desc {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    max-width: 560px;
    line-height: var(--line-height-loose);
}

/* ==========================================================================
   PRICE CHANGE INDICATORS
   ========================================================================== */
.price-up   { color: var(--color-success); }
.price-down { color: var(--color-danger); }
.price-up::before   { content: '▲ '; font-size: 0.7em; }
.price-down::before { content: '▼ '; font-size: 0.7em; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (mobile-first)
   ========================================================================== */
@media (max-width: 1280px) {
    :root { --container-pad: var(--space-6); }
}
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    :root {
        --container-pad: var(--space-4);
        --font-size-base: 1.0625rem; /* ~17px minimum for readability */
        --font-size-sm: 1rem; /* 16px */
        --font-size-xs: 0.875rem; /* 14px */
        --font-size-3xl: 2rem; /* 32px */
        --font-size-4xl: 2.25rem; /* 36px */
    }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .section { padding-block: var(--space-12); }
    .section--lg { padding-block: var(--space-20); }
}
@media (max-width: 480px) {
    :root {
        --container-pad: var(--space-4);
        --font-size-3xl: 1.5rem;
    }
}
