/**
 * Custom Fonts - AlHalees Theme
 * 
 * Arabic fonts for the law firm website
 * Fonts loaded locally from /font directory
 * 
 * @package TeeqCore
 * @since 1.0.0
 */

/* ==========================================================================
   @font-face Declarations - Local Font Files
   ========================================================================== */

/* 
 * Font paths are relative to theme root: /wp-content/themes/AlHalees-2026/
 * Using absolute paths from theme root to ensure correct resolution
 */

/* SST Arabic Roman - Primary font */
@font-face {
    font-family: 'SST Arabic Roman';
    src: url('../../font/sst-arabic-roman.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* SST Arabic Font Family - Fallback for different weights */
@font-face {
    font-family: 'SST Arabic';
    src: url('../../font/sst-arabic-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SST Arabic';
    src: url('../../font/sst-arabic-roman.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SST Arabic';
    src: url('../../font/sst-arabic-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SST Arabic';
    src: url('../../font/sst-arabic-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* STV Font Family */
@font-face {
    font-family: 'STV';
    src: url('../../font/stv-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Bein Arabic Font Family */
@font-face {
    font-family: 'Bein Arabic';
    src: url('../../font/bein-ar-normal.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Global Font Stack Enforcement
   ========================================================================== */

/* CSS Custom Property for font family */
:root {
    --teeqcore-font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    --font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Global font enforcement - HTML and Body */
html,
html[dir="rtl"],
html[dir="ltr"],
body,
body[dir="rtl"],
body[dir="ltr"] {
    font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Universal selector - applies to ALL elements */
*,
*::before,
*::after {
    font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Typography elements - explicit enforcement */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
button,
input,
textarea,
select,
label,
li,
ul,
ol,
dl,
dt,
dd,
blockquote,
cite,
em,
strong,
b,
i,
u,
s,
table,
thead,
tbody,
tfoot,
tr,
td,
th,
pre,
code,
kbd,
samp,
small,
sub,
sup,
mark,
del,
ins {
    font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Language-specific enforcement */
[lang="ar"],
[lang="ar"] *,
[lang="en"],
[lang="en"] *,
[dir="rtl"],
[dir="rtl"] *,
[dir="ltr"],
[dir="ltr"] * {
    font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Override any Tailwind font utilities using @layer base for highest priority */
@layer base {

    html,
    body,
    * {
        font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    }

    .font-sans,
    .font-serif,
    .font-mono {
        font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    }
}

/* Utility classes for custom fonts (optional, for explicit use) */
.font-sst-arabic-roman {
    font-family: 'SST Arabic Roman', 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.font-sst-arabic {
    font-family: 'SST Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.font-bein-arabic {
    font-family: 'Bein Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.font-stv {
    font-family: 'STV', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}