/* ========================================
   TYPOGRAPHY & FONT DECLARATIONS
   ======================================== */

/* ========================================
   GCBargain Font (Default for EN, AR, RU)
   ======================================== */

@font-face {
    font-family: 'GCBargain';
    src: url('../../Font/3/GCBargainDemo-Regular.woff2') format('woff2'),
         url('../../Font/3/GCBargainDemo-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   Noto Sans Arabic Font (For Farsi/Persian)
   ======================================== */
/* Note: Noto Sans Arabic is loaded from Google Fonts via HTML link tags */
/* It's a variable font supporting weights 100-900 */

/* ========================================
   DEFAULT FONT APPLICATION
   (English, Arabic, Russian - GCBargain)
   ======================================== */

/* Force font usage on all elements - Default to GCBargain */
* {
    font-family: 'GCBargain', var(--font-primary), sans-serif !important;
}

/* ========================================
   FARSI LANGUAGE FONT OVERRIDE
   (Persian - Noto Sans Arabic)
   ======================================== */

/* Apply Noto Sans Arabic font ONLY when language is Farsi */
html[lang="fa"] * {
    font-family: "Noto Sans Arabic", var(--font-primary), sans-serif !important;
    font-optical-sizing: auto;
    font-variation-settings: "wdth" 100;
}

/* Basic typography styles */
html {
    /* Explicit base so rem calculations are predictable across browsers */
    font-size: 16px;
    line-height: 1.5;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--text-color);
    background-color: var(--color-off-white); /* Add safe fallback */
    font-size: 1rem; /* Tie body text to rem scale */
}

/* Heading font family */
h1, h2, h3 {
    font-family: 'Altamis', var(--font-heading), sans-serif !important;
    font-weight: 700;
}

/* Headings also use Noto Sans Arabic when Farsi is selected */
html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3 {
    font-family: "Noto Sans Arabic", var(--font-heading), sans-serif !important;
    font-optical-sizing: auto;
    font-variation-settings: "wdth" 100;
}

/* ----------------------------------------
   Global responsive type scale (rem-based)
   ---------------------------------------- */

/* Desktop / base scale */
h1 {
    font-size: 2.5rem;  /* 40px at 16px base */
    line-height: 1.2;
}

h2 {
    font-size: 2rem;    /* 32px */
    line-height: 1.25;
}

h3 {
    font-size: 1.5rem;  /* 24px */
    line-height: 1.3;
}

/* Body size helpers */
.text-lg {
    font-size: 1.125rem; /* 18px */
}

.text-sm {
    font-size: 0.875rem; /* 14px */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.1rem;  /* ~34px */
    }
    h2 {
        font-size: 1.75rem; /* 28px */
    }
    h3 {
        font-size: 1.375rem; /* 22px */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.9rem;  /* ~30px */
    }
    h2 {
        font-size: 1.6rem;  /* ~26px */
    }
    h3 {
        font-size: 1.3rem;  /* ~21px */
    }
}
