/* =================================== */
/* DARouz - Main Stylesheet */
/* Pure CSS - No Frameworks */
/* =================================== */

/* --- Font Faces from assets/woff2 --- */
@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 100;
    src: url('../assets/woff2/IRANSansX-Thin.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 200;
    src: url('../assets/woff2/IRANSansX-UltraLight.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 300;
    src: url('../assets/woff2/IRANSansX-Light.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 400;
    src: url('../assets/woff2/IRANSansX-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 500;
    src: url('../assets/woff2/IRANSansX-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 600;
    src: url('../assets/woff2/IRANSansX-DemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 700;
    src: url('../assets/woff2/IRANSansX-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 800;
    src: url('../assets/woff2/IRANSansX-ExtraBold.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 900;
    src: url('../assets/woff2/IRANSansX-Black.woff2') format('woff2');
}

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Brand Colors - Blue */
    --color-primary: #1A73E8;
    --color-primary-dark: #1557B0;
    --color-primary-light: #E8F0FE;
    --color-primary-hover: #1967D2;

    /* Status Colors */
    --color-success: #0F9D58;
    --color-success-light: #E6F4EA;
    --color-error: #DB4437;
    --color-error-light: #FCE8E6;
    --color-warning: #F4B400;
    --color-warning-light: #FEF7E0;

    /* Neutral Colors */
    --color-text: #202124;
    --color-text-secondary: #5F6368;
    --color-text-light: #80868B;
    --color-background: #FFFFFF;
    --color-background-alt: #F8F9FA;
    --color-border: #DADCE0;
    --color-border-light: #E8EAED;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-shadow-lg: rgba(0, 0, 0, 0.15);

    /* Typography - IRANSansX */
    --font-family: 'IRANSansX', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 40px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-sm: 1.4;
    --line-height-base: 1.6;
    --line-height-lg: 1.8;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px var(--color-shadow);
    --shadow-md: 0 4px 6px var(--color-shadow);
    --shadow-lg: 0 10px 25px var(--color-shadow-lg);
    --shadow-xl: 0 15px 35px var(--color-shadow-lg);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout */
    --max-width: 1200px;
    --header-height: 70px;
}

/* --- Reset & Base Styles --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'IRANSansX', sans-serif !important;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-background-alt);
    direction: rtl;
    min-height: 100vh;
}

* {
    font-family: inherit !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
    background: none;
}

/* --- Utility Classes --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.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-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-success {
    color: var(--color-success);
}

.text-error {
    color: var(--color-error);
}

.text-warning {
    color: var(--color-warning);
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* --- Flexbox Utilities --- */
.d-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;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* --- Grid System --- */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* --- Responsive Breakpoints --- */
@media (max-width: 767px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .grid-2.mobile-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3.mobile-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-background-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}
