/* ==========================================
   1. Подключение шрифтов PF Din Text Pro (.woff2)
   ========================================== */
@font-face {
    font-family: 'PF Din Text Pro';
    src: url('fonts/PFDinTextPro-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PF Din Text Pro';
    src: url('fonts/PFDinTextPro-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PF Din Text Pro';
    src: url('fonts/PFDinTextPro-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================
   2. Переменные и базовые стили
   ========================================== */
:root {
    --primary-color: #003366;
    --accent-blue: #0c8ce9;
    --hover-bg-blue: #e9f4fd;
    --bg-light: #f4f6f8;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    
    /* Основной шрифт */
    --font-main: 'PF Din Text Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 0;
    font-family: var(--font-main);
}

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

/* ==========================================
   3. Шапка
   ========================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    width: 100%;
}

.header-container {
    width: 100%;
    padding: 0 2.5vw;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-self: start;
}

.header-logo {
    height: 76px;
    width: auto;
    display: block;
}

.header-divider {
    width: 1.5px;
    height: 72px;
    background-color: #d1d5db;
}

.header-tagline {
    display: flex;
    flex-direction: column;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #374151;
    font-weight: 400;
}

.header-title {
    font-size: 2.4rem;
    font-weight: 500;
    color: #000000;
    text-align: center;
    margin: 0;
    padding: 0 10px;
}

.header-right {
    justify-self: end;
    display: flex;
}

.btn-where-to-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 8px 18px;
    height: 44px;
    border: 1px solid var(--accent-blue);
    border-radius: 0.4rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    background-color: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    outline: none;
}

.btn-where-to-buy:hover {
    background-color: var(--hover-bg-blue);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-where-to-buy:active {
    background-color: #d0e7fb;
    border-color: #096cb5;
}

.buy-icon {
    width: 1.1rem;
    height: 1.1rem;
}

/* ==========================================
   3.1. Вводный информационный блок
   ========================================== */
.intro-info-block {
    background-color: var(--bg-light);
    text-align: center;
    margin-bottom: 24px;
    padding: 0 10px;
}

.intro-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 10px;
}

.intro-text {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* ==========================================
   4. Сетка карточек 3х3
   ========================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Upper Title Area */
.card-title-block {
    width: 100%;
    padding: 20px 20px;
    background-color: transparent;
    transition: background-color 0.25s ease;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.card-title-block h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
    transition: color 0.25s ease;
}

/* Hover Accent */
.service-card:hover .card-title-block {
    background-color: var(--accent-blue);
}

.service-card:hover .card-title-block h3 {
    color: #ffffff;
}

/* Card Description */
.card-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 16px 20px 0 20px;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Inline Links inside card descriptions */
.inline-link {
    color: var(--accent-blue);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.inline-link:hover {
    color: var(--primary-color);
}

/* Card Actions Container */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 12px;
    margin-top: auto;
    align-items: center;
    justify-content: center;
}

/* Two buttons side-by-side row layout */
.card-actions-row {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
}

/* ==========================================
   5. Карточные кнопки
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    text-align: center;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    background-color: transparent;
    white-space: nowrap;
}

.btn:hover {
    background-color: var(--hover-bg-blue);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Arrow Button Styling */
.btn-arrow {
    gap: 6px;
}

.btn-arrow-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ==========================================
   6. Разделитель
   ========================================== */
.section-divider {
    text-align: center;
    margin: 40px 0 30px;
    position: relative;
}

.section-divider h2 {
    font-size: 1.6rem;
    color: var(--primary-color);
    display: inline-block;
    background: var(--bg-light);
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 0;
}

/* ==========================================
   7. Нижний блок 1х3
   ========================================== */
.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ==========================================
   8. Подвал сайта
   ========================================== */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-copy {
    font-size: 1rem;
    color: #374151;
    font-weight: 400;
    text-align: center;
    margin: 0;
}

/* ==========================================
   9. Адаптивность и медиа-запросы
   ========================================== */
@media (max-width: 1200px) {
    .header-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 992px) {
    .header-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0 20px;
    }
    .header-title {
        order: 3;
        width: 100%;
        margin-top: 15px;
        font-size: 1.4rem;
        text-align: center;
    }
    .services-grid, .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-actions-row {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 15px 0;
        margin-bottom: 20px;
    }
    .header-container {
        padding: 0 15px;
    }
    .header-left {
        gap: 8px;
    }
    .header-logo {
        height: 32px;
    }
    .header-divider {
        height: 28px;
    }
    .header-tagline {
        font-size: 0.75rem;
    }
    .btn-where-to-buy {
        padding: 6px 12px;
        height: 36px;
        font-size: 0.85rem;
    }
    .buy-icon {
        width: 0.9rem;
        height: 0.9rem;
    }
    .header-title {
        font-size: 1.25rem;
        margin-top: 12px;
        line-height: 1.3;
    }
    .intro-title {
        font-size: 1.2rem;
    }
    .intro-text {
        font-size: 0.95rem;
    }
    .services-grid, .links-grid {
        grid-template-columns: 1fr;
    }
    .card-actions, .card-actions-row {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
    .site-footer {
        padding: 15px 0;
    }
    .footer-copy {
        font-size: 0.9rem;
    }
}