/* ===== טיפוגרפיה מתקדמת ===== */
:root {
    /* משתני פונטים */
    --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-secondary: 'Noto Sans Hebrew', 'Arial Hebrew', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* משתני גודל פונט */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */
    
    /* משתני גובה שורה */
    --leading-tight: 1.25;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;
    
    /* משתני ריווח אותיות */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
}

/* ייבוא פונטים מ-Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Hebrew:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* סגנונות בסיסיים */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
    font-weight: 400;
    color: #2c2c2c;
}

/* היררכיית כותרות */
h1, .h1 {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-bottom: 1.5rem;
}

h2, .h2 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 600;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-bottom: 1.25rem;
}

h3, .h3 {
    font-family: var(--font-primary);
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: var(--leading-tight);
    margin-bottom: 1rem;
}

h4, .h4 {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: var(--leading-tight);
    margin-bottom: 0.75rem;
}

/* כותרת סקציה מיוחדת */
.section-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    line-height: 1.2;
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #b85a3a, #d46b4a);
    border-radius: 2px;
}

/* טקסטים מיוחדים */
.lead-text {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: #4a4a4a;
    margin-bottom: 1.5rem;
}

.small-text {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: #6b6b6b;
}

/* קישורים */
a {
    color: #b85a3a;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: #8f3e23;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* רשימות */
ul, ol {
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: var(--leading-normal);
}

/* טקסט מודגש */
strong, b {
    font-weight: 600;
    color: #3a3a3a;
}

em, i {
    font-style: italic;
}

/* קוד */
code {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ציטוטים */
blockquote {
    border-right: 4px solid #b85a3a;
    padding-right: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4a4a4a;
    background: #faf7f5;
    padding: 1.5rem;
    border-radius: 8px;
}

/* טקסט עם קונטרסט גבוה */
.high-contrast-text {
    color: #1a1a1a;
    background: #fff;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* אנימציה לטקסט */
.text-fade-in {
    animation: textFadeIn 0.8s ease-out;
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* תגובתיות */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
        --text-2xl: 1.375rem;
        --text-xl: 1.125rem;
        --text-lg: 1rem;
    }
    
    .section-title::after {
        width: 40px;
    }
}

/* מצב כהה */
body.dark-mode {
    color: #f0f0f0;
}

body.dark-mode .section-title::after {
    background: linear-gradient(90deg, #d46b4a, #e87d5c);
}

body.dark-mode blockquote {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode code {
    background: #3a3a3a;
    color: #f0f0f0;
}