/* ====== SMOLYANVOTE FONT PALETTE ====== */
/* палитра за кирилица */

/* Google Fonts imports - оптимизирани за кирилица */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* Font Stack Variables */
:root {
    /* Primary Typography - За заглавия и важен текст */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;

    /* Secondary Typography - За подзаглавия и акценти */
    --font-secondary: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Body Typography - За основен текст */
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', Arial, sans-serif;

    /* UI Typography - За интерфейс елементи */
    --font-ui: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Monospace - За код и данни */
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* ====== BASE TYPOGRAPHY STYLES ====== */

/* Body и основни елементи */
body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: #2c3e50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Заглавия */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #1a202c;
    margin-bottom: 0.5em;
}

h1, .h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2, .h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3, .h3 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 600;
}

h4, .h4 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
}

h5, .h5 {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    font-weight: 500;
}

h6, .h6 {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Подзаглавия и акценти */
.subtitle, .lead {
    font-family: var(--font-secondary);
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: #4a5568;
}

/* Навигация и UI елементи */
.navbar-brand,
.nav-link,
.btn,
.form-label,
.form-control,
.badge,
.alert,
.card-title {
    font-family: var(--font-ui);
    font-weight: 500;
    letter-spacing: -0.005em;
}

/* Специфични стилове за компоненти */

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
}

/* Бутони */
.btn {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
}

.btn-lg {
    font-size: 1rem;
    font-weight: 600;
}

.btn-sm {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Form елементи */
.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.005em;
}

.form-control::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-weight: 400;
}

/* Cards и панели */
.card-title {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #1f2937;
}

.card-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
}

/* Badges и labels */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

/* Pagination */
.page-link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Tables */
.table th {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: #374151;
}

.table td {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: #4b5563;
}

/* Alerts */
.alert {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

.alert-heading {
    font-family: var(--font-ui);
    font-weight: 600;
}

/* ====== СПЕЦИАЛНИ КЛАСОВЕ ====== */

/* За важен текст */
.text-emphasis {
    font-family: var(--font-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* За цифри и статистики */
.text-numeric {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* За цитати */
.blockquote {
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* За caption текст */
.text-caption {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
    letter-spacing: 0.01em;
}

/* ====== RESPONSIVE TYPOGRAPHY ====== */

/* Mobile оптимизации */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.65;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .btn {
        font-size: 0.85rem;
    }

    .form-control,
    .form-select {
        font-size: 0.9rem;
    }

    .card-title {
        font-size: 1.125rem;
    }

    .card-text {
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        font-size: 14px;
        line-height: 1.7;
    }

    h1, .h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    h2, .h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .subtitle, .lead {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ====== ACCESSIBILITY ====== */

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode rules removed - using global light theme override */

/* ====== PRINT STYLES ====== */
@media print {
    body {
        font-family: 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }

    h1, h2, h3, h4, h5, h6 {
        font-family: 'Times New Roman', serif;
        font-weight: bold;
        page-break-after: avoid;
    }
}