/*!
 * Base Styles
 * Global reset, typography, and foundational styles
 * Version: 3.0
 * Note: variables.css is loaded before this file via functions.php
 */

/* ============================================
   Reset & Normalize
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    direction: rtl;
    text-align: right;
    font-family: var(--font-family-primary);
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family-primary);
    background: linear-gradient(135deg, var(--color-bg-black) 0%, var(--color-bg-darker) 50%, var(--color-bg-black) 100%);
    background-attachment: fixed;
    color: var(--color-text-gray-light);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
    direction: rtl;
    text-align: right;
    text-rendering: optimizeSpeed;
    overflow-x: hidden;
    min-height: 100vh;
}

@media (prefers-reduced-motion: no-preference) {
    body {
        text-rendering: optimizeLegibility;
    }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-white);
    margin-bottom: var(--spacing-4);
    letter-spacing: var(--letter-spacing-wide);
    text-rendering: optimizeLegibility;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-black);
    letter-spacing: var(--letter-spacing-wider);
    margin-bottom: var(--spacing-6);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--letter-spacing-wide);
    margin-bottom: var(--spacing-5);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-4);
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-3);
}

h5 {
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-3);
}

h6 {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-2);
}

p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-gray-light);
    margin-bottom: var(--spacing-5);
    letter-spacing: var(--letter-spacing-normal);
    word-spacing: var(--letter-spacing-normal);
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover,
a:focus {
    color: var(--color-gold-light);
    outline: none;
}

/* ============================================
   Images & Media
   ============================================ */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

img {
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Lists
   ============================================ */
ul,
ol {
    list-style: none;
}

/* ============================================
   Forms
   ============================================ */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

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

/* ============================================
   Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   Content Visibility
   ============================================ */
main,
section,
.container,
.about-content,
.about-text,
.about-description,
.page-header,
.page-title,
.page-subtitle,
.section-title,
.section-subtitle,
.fade-in-on-scroll {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.show {
    display: block !important;
}

.show-inline {
    display: inline-block !important;
}

.show-flex {
    display: flex !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;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
}
