/*
Theme Name: UDO Calculator
Theme URI: https://urist-udo.ru
Author: Antigravity AI
Description: Премиум тема для Калькулятора УДО и базы контактов ФСИН, с встроенным блогом для публикации новостей и статей.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: udo-calculator
*/

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

:root {
    --bg: #f0f2f7;
    --bg-white: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: #f5f6fa;
    --border: rgba(0, 0, 0, 0.08);
    --border-active: rgba(99, 102, 241, 0.4);
    --text: #1e1e2e;
    --text-dim: #555770;
    --text-muted: #8e91a8;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #6366f1;
    --accent2: #a855f7;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
    --glow: 0 0 30px rgba(99, 102, 241, 0.1);
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }

/* === Background Animation === */
.bg-animation { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orb {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.12;
    animation: orbFloat 20s ease-in-out infinite;
}
.bg-orb-1 { width: 600px; height: 600px; background: #818cf8; top: -15%; left: -15%; }
.bg-orb-2 { width: 500px; height: 500px; background: #c084fc; bottom: -15%; right: -15%; animation-delay: -7s; }
.bg-orb-3 { width: 400px; height: 400px; background: #38bdf8; top: 40%; left: 40%; animation-delay: -14s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* === Header === */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; }
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon svg { width: 36px; height: 36px; }
.logo-title { font-weight: 700; font-size: 1.1rem; display: block; color: var(--text); }
.logo-subtitle { font-size: 0.7rem; color: var(--text-muted); display: block; }
.nav { display: flex; gap: 0.25rem; }
.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 1rem; border-radius: var(--radius-xs); font-size: 0.85rem;
    color: var(--text-dim); text-decoration: none; transition: all 0.3s;
    font-weight: 500;
}
.nav-link:hover { color: var(--text); background: rgba(99, 102, 241, 0.08); }
.nav-link.active { color: var(--primary); background: rgba(99, 102, 241, 0.1); font-weight: 600; }

/* === Hero === */
.hero { text-align: center; padding: 3rem 0 2rem; position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 1rem; border-radius: 999px; font-size: 0.75rem;
    background: rgba(99, 102, 241, 0.08); border: 1px solid rgba(99, 102, 241, 0.18);
    color: var(--primary); font-weight: 600; margin-bottom: 1.25rem;
}
.hero-badge-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-title { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; margin-bottom: 1rem; color: var(--text); }
.gradient-text { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: 1rem; color: var(--text-dim); max-width: 600px; margin: 0 auto; }

/* === Form Cards === */
.form-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.25rem;
    backdrop-filter: blur(10px); transition: all 0.3s;
    position: relative; z-index: 1;
    box-shadow: var(--shadow-sm);
}
.form-card:hover { border-color: var(--border-active); box-shadow: var(--shadow); }
.form-card-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.step-number {
    width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.form-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--text); }
.form-card-desc { font-size: 0.8rem; color: var(--text-muted); }

/* === Form Elements === */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-group { display: flex; flex-direction: column; }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); margin-bottom: 0.4rem; }
.input-wrapper { position: relative; }
.form-input {
    width: 100%; padding: 0.7rem 1rem; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border); background: var(--bg-input);
    color: var(--text); font-size: 0.95rem; font-family: inherit;
    transition: all 0.3s; outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); background: #fff; }

/* Fix number input spinners overlapping text */
.form-input[type="number"] {
    padding-right: 2.8rem;
    -moz-appearance: textfield;
}
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.input-suffix {
    position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
    font-size: 0.78rem; color: var(--text-muted); pointer-events: none; font-weight: 500;
}

/* Custom number stepper buttons */
.input-wrapper--number {
    position: relative;
}
.input-wrapper--number .form-input {
    padding-right: 5.5rem;
}
.number-controls {
    position: absolute; right: 2.5rem; top: 50%; transform: translateY(-50%);
    display: flex; gap: 2px;
}
.number-btn {
    width: 28px; height: 28px; border: 1.5px solid var(--border); border-radius: 6px;
    background: #fff; color: var(--text-dim); cursor: pointer; display: flex;
    align-items: center; justify-content: center; font-size: 1rem; font-weight: 600;
    transition: all 0.2s; line-height: 1; padding: 0;
    font-family: inherit;
}
.number-btn:hover { background: rgba(99, 102, 241, 0.08); border-color: var(--primary); color: var(--primary); }
.number-btn:active { transform: scale(0.92); }

.form-input[type="date"] { color-scheme: light; }
.form-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.35rem; }

/* === Category Cards === */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.category-card { cursor: pointer; }
.category-card input { display: none; }
.category-card-inner {
    padding: 1rem; border-radius: var(--radius-sm); text-align: center;
    border: 1.5px solid var(--border); background: var(--bg-input);
    transition: all 0.3s;
}
.category-card input:checked + .category-card-inner {
    border-color: var(--primary); background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.category-card:hover .category-card-inner { border-color: rgba(99, 102, 241, 0.25); }
.category-icon { width: 40px; height: 40px; margin: 0 auto 0.5rem; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.category-icon svg { width: 22px; height: 22px; }
.category-icon-small { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.category-icon-medium { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.category-icon-heavy { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.category-icon-especially-heavy { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.category-name { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.category-udo { font-size: 0.72rem; color: var(--text-muted); }

/* === Checkbox Cards === */
.extra-options { display: flex; flex-direction: column; gap: 0.6rem; }
.checkbox-card { cursor: pointer; }
.checkbox-card input { display: none; }
.checkbox-card-inner {
    display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.9rem 1rem;
    border-radius: var(--radius-sm); border: 1.5px solid var(--border);
    background: var(--bg-input); transition: all 0.3s;
}
.checkbox-card:hover .checkbox-card-inner { border-color: rgba(99, 102, 241, 0.25); }
.checkbox-card input:checked + .checkbox-card-inner { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }
.checkbox-indicator {
    width: 20px; height: 20px; border-radius: 5px; border: 2px solid #ccc;
    flex-shrink: 0; margin-top: 1px; transition: all 0.3s; position: relative;
}
.checkbox-card input:checked + .checkbox-card-inner .checkbox-indicator {
    background: var(--primary); border-color: var(--primary);
}
.checkbox-card input:checked + .checkbox-card-inner .checkbox-indicator::after {
    content: '✓'; position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; color: #fff; font-size: 0.7rem; font-weight: 700;
}
.checkbox-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.15rem; color: var(--text); }
.checkbox-desc { font-size: 0.72rem; color: var(--text-muted); }

/* === Toggle === */
.toggle-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.toggle-switch { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
.toggle-switch input { display: none; }
.toggle-slider {
    position: absolute; inset: 0; border-radius: 999px; background: #d1d5db;
    cursor: pointer; transition: all 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-label { font-size: 0.9rem; font-weight: 500; color: var(--text); }

/* === Coefficient Cards === */
.coeff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.coeff-card { cursor: pointer; }
.coeff-card input { display: none; }
.coeff-inner {
    padding: 0.75rem; text-align: center; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border); background: var(--bg-input); transition: all 0.3s;
}
.coeff-card input:checked + .coeff-inner {
    border-color: var(--primary); background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.coeff-card:hover .coeff-inner { border-color: rgba(99, 102, 241, 0.25); }
.coeff-value { font-size: 1.1rem; font-weight: 700; display: block; color: var(--text); }
.coeff-desc { font-size: 0.68rem; color: var(--text-muted); display: block; margin-top: 0.15rem; }

/* === Calculate Button === */
.btn-calculate {
    width: 100%; padding: 1rem; border: none; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; font-size: 1.05rem; font-weight: 700; font-family: inherit;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    transition: all 0.3s; position: relative; overflow: hidden; z-index: 1;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
    margin-bottom: 2rem;
}
.btn-calculate:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35); }
.btn-calculate:active { transform: translateY(0); }
.btn-icon svg { width: 20px; height: 20px; }
.btn-shine {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(transparent, rgba(255,255,255,0.12), transparent);
    transform: rotate(45deg); transition: all 0.6s;
}
.btn-calculate:hover .btn-shine { left: 100%; }

/* === Results === */
.results-section { padding-bottom: 3rem; position: relative; z-index: 1; animation: fadeUp 0.6s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.results-header { margin-bottom: 1.5rem; }
.results-title { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 0.6rem; color: var(--text); }
.results-icon { width: 28px; height: 28px; color: var(--success); }

/* Summary Grid */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.summary-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem; backdrop-filter: blur(10px); transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.summary-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: var(--shadow); }
.summary-card-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.summary-card-value { font-size: 1.4rem; font-weight: 800; margin: 0.4rem 0 0.2rem; }
.summary-card-sub { font-size: 0.8rem; color: var(--text-dim); }
.summary-card.release .summary-card-value { color: var(--success); }
.summary-card.udo .summary-card-value { color: var(--primary); }
.summary-card.art80 .summary-card-value { color: var(--warning); }
.summary-card.served .summary-card-value { color: var(--info); }

/* Timeline */
.timeline-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; margin-bottom: 1.5rem; backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}
.timeline-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; color: var(--text); }
.timeline-title svg { width: 20px; height: 20px; color: var(--primary); }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent2), var(--success));
    border-radius: 2px;
}
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -2rem; top: 4px; width: 16px; height: 16px;
    border-radius: 50%; border: 2.5px solid; background: var(--bg);
}
.timeline-dot.past { border-color: var(--success); }
.timeline-dot.future { border-color: var(--primary); }
.timeline-dot.release { border-color: var(--success); background: var(--success); }
.timeline-date { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.15rem; color: var(--text); }
.timeline-label { font-size: 0.82rem; color: var(--text-dim); }

/* Progress */
.progress-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; margin-bottom: 1.5rem; backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}
.progress-title { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--text); }
.progress-bar-wrapper { margin-bottom: 1rem; }
.progress-bar { height: 24px; background: #e8eaf0; border-radius: 12px; position: relative; overflow: hidden; }
.progress-fill {
    height: 100%; border-radius: 12px; transition: width 1.5s ease;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--success));
    position: relative;
}
.progress-fill::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.progress-markers { position: absolute; inset: 0; }
.progress-marker {
    position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px;
    background: rgba(0,0,0,0.25); transform: translateX(-50%);
}
.progress-marker-label {
    position: absolute; top: 32px; font-size: 0.6rem; white-space: nowrap;
    color: var(--text-muted); transform: translateX(-50%); font-weight: 600;
}
.progress-labels { display: flex; justify-content: space-between; margin-top: 0.5rem; }
.progress-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.stat-item { text-align: center; padding: 0.6rem; background: var(--bg-input); border-radius: var(--radius-sm); }
.stat-value { font-size: 1.1rem; font-weight: 700; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); }

/* Detail */
.detail-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; margin-bottom: 1.5rem; backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}
.detail-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; color: var(--text); }
.detail-title svg { width: 20px; height: 20px; color: var(--primary); }
.detail-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.detail-row:last-child { border-bottom: none; }
.detail-row-label { color: var(--text-dim); }
.detail-row-value { font-weight: 600; text-align: right; color: var(--text); }

/* Disclaimer */
.disclaimer {
    display: flex; gap: 0.75rem; padding: 1rem 1.25rem; border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 0.78rem; color: var(--text-dim); align-items: flex-start;
}
.disclaimer svg { width: 20px; height: 20px; color: var(--warning); flex-shrink: 0; margin-top: 2px; }

/* === Info Section === */
.section-title { font-size: 1.5rem; font-weight: 800; text-align: center; margin: 3rem 0 1.5rem; position: relative; z-index: 1; color: var(--text); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; position: relative; z-index: 1; }
.info-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; backdrop-filter: blur(10px); transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.info-card:hover { border-color: var(--border-active); transform: translateY(-3px); box-shadow: var(--shadow); }
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.info-card p { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.info-card-icon {
    width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center;
    justify-content: center; margin-bottom: 0.75rem;
}
.info-card-icon svg { width: 22px; height: 22px; }
.info-icon-1 { background: rgba(99, 102, 241, 0.1); color: var(--accent); }
.info-icon-2 { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.info-icon-3 { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.info-icon-4 { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.info-list { list-style: none; font-size: 0.8rem; }
.info-list li { padding: 0.3rem 0; padding-left: 1.2rem; position: relative; color: var(--text-dim); }
.info-list li::before { content: '→'; position: absolute; left: 0; color: var(--primary); }
.info-list li strong { color: var(--text); }

/* === Footer === */
.footer {
    border-top: 1px solid var(--border); padding: 1.5rem 0;
    position: relative; z-index: 1;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.footer-text { font-size: 0.8rem; color: var(--text-dim); }
.footer-disclaimer { font-size: 0.75rem; color: var(--text-muted); }

/* === Responsive === */
@media (max-width: 640px) {
    .header-inner { flex-direction: column; gap: 0.75rem; padding: 0.75rem 0; }
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem 0.25rem;
        width: 100%;
    }
    .nav-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
        text-align: center;
    }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .coeff-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}

/* === News Section === */
.news-section { padding-bottom: 3rem; position: relative; z-index: 1; }
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}
.news-card:hover {
    border-color: var(--border-active);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.news-card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}
.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.news-card:hover .news-card-image img {
    transform: scale(1.08);
}
.news-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.news-card-category {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}
.news-card-date {
    font-weight: 500;
}
.news-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
    line-height: 1.3;
    transition: color 0.3s ease;
}
.news-card:hover .news-card-title {
    color: var(--primary);
}
.news-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}
.news-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    transition: gap 0.2s ease;
}
.news-card:hover .news-card-link {
    gap: 0.6rem;
}

/* === News Pagination === */
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.news-pagination .page-numbers {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.news-pagination .page-numbers:hover,
.news-pagination .page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* === Single Post Details === */
.single-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}
.post-header {
    margin-bottom: 2rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease;
}
.back-link:hover {
    transform: translateX(-4px);
}
.post-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1rem;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.post-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.post-category a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.post-thumbnail {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 2rem;
    max-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}
.post-thumbnail img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dim);
}
.post-content h2, .post-content h3 {
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }
.post-content p {
    margin-bottom: 1.5rem;
}
.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.post-content li {
    margin-bottom: 0.5rem;
}
.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    background: rgba(99, 102, 241, 0.04);
    font-style: italic;
    color: var(--text);
}
@media (max-width: 640px) {
    .single-post { padding: 1.5rem; }
    .post-title { font-size: 1.6rem; }
    .news-grid { grid-template-columns: 1fr; }
}

/* === Services Page === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.service-card:hover {
    border-color: var(--border-active);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.service-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent2));
    color: #fff;
}
.service-card-icon svg {
    width: 26px;
    height: 26px;
}
.service-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}
.service-card-list {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.service-card-list li {
    font-size: 0.85rem;
    color: var(--text-dim);
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.4;
}
.service-card-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1rem;
}

/* === Contact & Lead Form Section === */
.contact-section {
    max-width: 700px;
    margin: 4rem auto 2rem;
    position: relative;
    z-index: 1;
}
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    text-align: center;
}
.contact-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.contact-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}
.messenger-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.messenger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.messenger-btn.tg {
    background: #0088cc;
}
.messenger-btn.tg:hover {
    background: #0077b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}
.messenger-btn.wa {
    background: #25d366;
}
.messenger-btn.wa:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.messenger-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* === Phone Link in Nav === */
.nav-phone {
    background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm) !important;
    white-space: nowrap;
    padding: 0.5rem 1rem !important;
}
.nav-phone:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* === Call Button === */
.messenger-btn.call-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    width: 100%;
    justify-content: center;
}
.messenger-btn.call-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.messenger-btn.call-btn svg {
    fill: none;
    stroke: currentColor;
    width: 20px;
    height: 20px;
}

/* === Footer Phone === */
.footer-phone {
    margin-top: 0.5rem;
}
.footer-phone a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}
.footer-phone a:hover {
    color: var(--primary);
}

/* === Responsive === */
@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
    }
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .coeff-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .nav-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }
    .nav-phone {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.5rem !important;
    }
    .hero-title {
        font-size: 1.4rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}
