@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #f8fafc; /* Теплый жемчужно-серый фон вместо больничного голубого */
    --card-bg: #ffffff;
    --primary-color: #1e40af; /* Глубокий, благородный синий */
    --accent-color: #ea580c; /* Энергичный оранжевый для акцентов */
    --text-color: #334155;
    --shadow-normal: 0 10px 25px rgba(30, 64, 175, 0.05);
    --shadow-glow: 0 15px 35px rgba(234, 88, 12, 0.15); /* Теплое свечение при наведении */
    --border-radius: 24px;
}


* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

/* Стили для Главной страницы (Дашборда) */
.hero-motto {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 50px;
    font-style: italic;
    padding: 0 20px;
}

.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Белая плашка (карточка) */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 35px 25px;
    box-shadow: var(--shadow-normal);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Убирает стандартное выделение на Android */
}

.card h3 { 
    color: var(--primary-color); 
    font-weight: 700; 
    font-size: 1.3rem;
    margin-bottom: 15px; 
}

.card p {
    font-size: 0.95rem;
    color: #64748b;
}

/* Эффект вспышки при наведении (ПК) и касании (Мобильные) */
.card:hover, .card:active {
    transform: translateY(-7px) scale(1.02);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.05); /* Легкое осветление самой плашки */
}

/* Подвал */
.site-footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Кнопка назад для внутренних страниц */
.nav-bar { margin-bottom: 40px; }
.btn-back {
    display: inline-block;
    padding: 12px 25px;
    background: var(--card-bg);
    color: var(--primary-color);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-normal);
    transition: all 0.3s ease;
}
.btn-back:hover, .btn-back:active {
    color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Логотип и Заголовки на Главной */
.hero-logo { width: 150px; height: auto; margin: 0 auto 20px; display: block; }
.hero-title { text-align: center; color: var(--primary-color); font-size: 2rem; margin-bottom: 5px; }
/* Алтайский шрифт прописью */
.hero-subtitle-altai { text-align: center; font-family: 'Brush Script MT', 'Segoe Print', cursive; font-size: 2.2rem; color: #0369a1; margin-bottom: 30px; font-weight: 400; }

/* Дизайн блока "Направления" (голубой фон, тень, по левому краю) */
.directions-block { 
    background: #e0f2fe; /* Нежно-голубой */
    padding: 30px; 
    border-radius: 20px; 
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.1); /* Легкая тень */
    margin-bottom: 40px; 
    text-align: left; 
}
.directions-block h2 { text-align: left; border-bottom: 2px solid #bae6fd; padding-bottom: 10px; margin-bottom: 20px; color: var(--primary-color); }
.directions-list { list-style: none; padding: 0; }
.directions-list li { margin-bottom: 15px; padding-left: 30px; position: relative; color: var(--text-color); font-size: 1.05rem; }
.directions-list li::before { content: '✓'; position: absolute; left: 0; top: 2px; color: #0284c7; font-weight: bold; font-size: 1.2rem; }

/* Модальное окно для PDF (глубокий голубой) */
.pdf-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.pdf-modal-content { background: #0c4a6e; /* Глубокий голубой */ width: 100%; max-width: 1000px; height: 90vh; border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); border: 2px solid #0284c7; }
.pdf-modal-header { padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; background: #082f49; color: white; }
.pdf-modal-title { font-weight: 600; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.pdf-modal-actions { display: flex; gap: 15px; align-items: center; }
.btn-modal-dl { color: white; text-decoration: none; background: #0284c7; padding: 8px 15px; border-radius: 8px; font-weight: 600; transition: 0.3s; font-size: 0.9rem; }
.btn-modal-dl:hover { background: #38bdf8; color: #0f172a; }
.btn-modal-close { background: none; border: none; color: white; font-size: 2rem; cursor: pointer; line-height: 1; transition: 0.3s; }
.btn-modal-close:hover { color: #f87171; }
.pdf-modal-body { flex: 1; width: 100%; background: #e2e8f0; }
.pdf-iframe { width: 100%; height: 100%; border: none; }