/**
 * ============================================
 * Base Styles - HTML Element Defaults
 * ============================================
 * 
 * This file contains base styles for HTML elements
 * using CSS variables for consistency.
 * 
 * Last Updated: 2024
 * Version: 2.0.0
 */

/* ============================================
   HTML & Body
   ============================================ */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-size-5xl);
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin: 0;
    padding: 0;
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--hover-text);
}

/* ============================================
   Lists
   ============================================ */
ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ============================================
   Images
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-style: none;
}

/* ============================================
   Forms
   ============================================ */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* ============================================
   Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    img {
        page-break-inside: avoid;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
}


