/* ============================================
   ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ
   ============================================ */

/* --- ОСНОВНЫЕ БЛОКИ СТРАНИЦ --- */
.page-content {
    padding: 40px 20px;
    background: #f0f2f5;
    min-height: 400px;
    max-width: 100vw;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* --- БЛОК КОНТЕНТА (общий для всех страниц) --- */
.content-block {
    background: #ffffff;
    border-radius: 16px;
    padding: 50px 60px;
    margin-bottom: 40px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
}

/* --- ЗАГОЛОВКИ --- */
.page-title {
    font-size: 38px;
    font-weight: 700;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    color: #1951A0;
    text-align: left;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.page-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: #1951A0;
    margin-top: 35px;
    margin-bottom: 15px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    border-left: 4px solid #E4003A;
    padding-left: 15px;
}

/* --- ТЕКСТ --- */
.page-text {
    font-size: 19px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    color: #1a1a1a;
    line-height: 1.9;
    text-align: left;
}

.page-text p {
    margin-bottom: 20px;
}

.page-text p:last-child {
    margin-bottom: 0;
}

/* --- ВЫДЕЛЕНИЯ --- */
.page-text strong {
    color: #1951A0;
    font-weight: 700;
}

.page-text em {
    font-style: italic;
    color: #555;
}

/* --- СПИСКИ --- */
.page-text ul,
.page-text ol {
    margin: 15px 0 20px 25px;
    padding-left: 10px;
}

.page-text li {
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 19px;
}

/* --- РАЗДЕЛИТЕЛЬНАЯ ЛИНИЯ --- */
.page-text hr {
    border: none;
    border-top: 2px solid #e8eaed;
    margin: 35px 0;
}

/* --- БЛОК С КОНТАКТАМИ В КОНЦЕ СТРАНИЦЫ --- */
.contact-block {
    margin-top: 40px;
    padding: 30px 35px;
    background: #f8f9fa;
    border-radius: 7px;
    border-left: 5px solid #E4003A;
}

.contact-block h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1951A0;
    margin-bottom: 15px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
}

.contact-block p {
    margin-bottom: 8px;
    font-size: 18px;
    color: #1a1a1a;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
}

.contact-block p:last-child {
    margin-bottom: 0;
}

.contact-block a {
    color: #1951A0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.contact-block a:hover {
    color: #E4003A;
    text-decoration: underline;
}

/* ============================================
   БЛОК "ОСНОВНЫЕ НАПРАВЛЕНИЯ"
   ============================================ */

.directions-block {
    background: #ffffff;
    border-radius: 16px;
    padding: 50px 60px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
}

/* Заголовок "Основные направления" */
.directions-title {
    font-size: 34px;
    font-weight: 700;
    color: #1951A0;
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
}

.directions-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #E4003A;
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Сетка карточек (Flexbox) */
.directions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    margin-top: 20px;
}

/* Карточка направления */
.direction-item {
    flex: 0 0 calc(33.333% - 17px);
    min-width: 200px;
    background: #ffffff;
    border-radius: 7px;
    padding: 30px 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    border-top: 3px solid transparent;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.direction-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.10);
    border-top-color: #E4003A;
}

/* Иконка */
.direction-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

/* Название направления (H3) */
.direction-item h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1951A0;
    margin: 10px 0;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
}

/* Описание */
.direction-item p {
    font-size: 15px;
    color: #555555;
    line-height: 1.7;
    margin-bottom: 12px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
}

/* Ссылка "Подробнее →" */
.direction-link {
    font-weight: 600;
    color: #1951A0 !important;
    text-decoration: none;
    font-size: 15px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

.direction-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #E4003A;
    transition: width 0.3s ease;
}

.direction-link:hover {
    color: #1951A0 !important;
    text-decoration: none;
}

.direction-link:hover::after {
    width: 100%;
}

.direction-link:visited {
    color: #1951A0 !important;
}

.direction-link:active {
    color: #1951A0 !important;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* --- ПЛАНШЕТЫ (до 1024px) --- */
@media (max-width: 1024px) {
    .content-block,
    .directions-block {
        padding: 35px 40px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-text {
        font-size: 17px;
    }
    
    .page-text li {
        font-size: 17px;
    }
    
    .contact-block {
        padding: 25px 30px;
    }
    
    .contact-block p {
        font-size: 16px;
    }
    
    .directions-title {
        font-size: 30px;
    }
    
    .directions-grid {
        gap: 20px;
    }
    
    .direction-item {
        flex: 0 0 calc(33.333% - 14px);
        padding: 25px 20px;
    }
}

/* --- ТЕЛЕФОНЫ (до 768px) --- */
@media (max-width: 768px) {
    .page-content {
        padding: 20px 15px;
    }
    
    .content-block,
    .directions-block {
        padding: 25px 20px;
        border-radius: 10px;
        margin-bottom: 25px;
    }
    
    .page-title {
        font-size: 26px;
        text-align: left;
    }
    
    .page-subtitle {
        font-size: 19px;
        padding-left: 12px;
    }
    
    .page-text {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .page-text li {
        font-size: 16px;
    }
    
    .contact-block {
        padding: 20px 20px;
        margin-top: 30px;
    }
    
    .contact-block h3 {
        font-size: 17px;
    }
    
    .contact-block p {
        font-size: 15px;
    }
    
    .page-text ul,
    .page-text ol {
        margin: 10px 0 15px 18px;
    }
    
    .directions-title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .directions-grid {
        gap: 15px;
    }
    
    .direction-item {
        flex: 0 0 calc(50% - 8px);
        min-width: 140px;
        padding: 20px 15px;
    }
    
    .direction-icon {
        font-size: 32px;
    }
    
    .direction-item h3 {
        font-size: 16px;
    }
    
    .direction-item p {
        font-size: 15px;
        color: #555555;
        line-height: 1.7;
        margin-bottom: 12px;
        font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    }
}

/* --- МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px) --- */
@media (max-width: 480px) {
    .content-block,
    .directions-block {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-subtitle {
        font-size: 17px;
    }
    
    .page-text {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .page-text li {
        font-size: 15px;
    }
    
    .contact-block {
        padding: 15px 15px;
    }
    
    .contact-block p {
        font-size: 14px;
    }
    
    .directions-title {
        font-size: 22px;
    }
    
    .directions-grid {
        gap: 12px;
    }
    
    .direction-item {
        flex: 0 0 100%;
        min-width: 0;
        padding: 15px 12px;
    }
    
    .direction-icon {
        font-size: 28px;
    }
    
    .direction-item h3 {
        font-size: 15px;
    }
    
    .direction-item p {
        font-size: 13px;
    }
}