/* ==========================================================================
   Тематический раздел: Антибиотикорезистентность (AMR)
   Национальный научный центр развития здравоохранения им. Салидат Каирбековой
   ========================================================================== */

:root {
    --amr-primary: #0C93F5;
    --amr-primary-dark: #0968b0;
    --amr-navy: #17385c;
    --amr-accent: #F5B40C;
    --amr-danger: #e63946;
    --amr-danger-bg: #fff1f2;
    --amr-success: #198754;
    --amr-success-bg: #e8f8f0;
    --amr-warning: #ffb703;
    --amr-warning-bg: #fff8e1;
    --amr-info: #0288d1;
    --amr-info-bg: #e1f5fe;
    --amr-card-bg: #ffffff;
    --amr-body-bg: #f4f8fc;
    --amr-border: #d2e4f3;
    --amr-text: #2c3e50;
    --amr-muted: #6c757d;
}

/* ================== Секция на Главной странице ================== */
.amr-home-section {
    padding: 70px 0 50px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f0f7fd 100%);
    position: relative;
    border-bottom: 1px solid var(--amr-border);
}

.amr-home-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e1f0fc;
    color: var(--amr-primary-dark);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(12, 147, 245, 0.12);
}

.amr-home-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--amr-navy);
    line-height: 1.2;
    margin-bottom: 14px;
}

.amr-home-lead {
    font-size: 18px;
    color: #4a5d6e;
    max-width: 860px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

.amr-home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.amr-home-card {
    background: #ffffff;
    border: 1px solid var(--amr-border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 14px rgba(12, 147, 245, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none !important;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.amr-home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--amr-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.amr-home-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(12, 147, 245, 0.18);
    border-color: var(--amr-primary);
}

.amr-home-card:hover::before {
    transform: scaleX(1);
}

.amr-home-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px auto;
    border-radius: 14px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: var(--amr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: all 0.3s ease;
}

.amr-home-card:hover .amr-home-card-icon {
    background: var(--amr-primary);
    color: #ffffff;
    transform: scale(1.08);
}

.amr-home-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--amr-navy);
    margin-bottom: 8px;
    line-height: 1.35;
}

.amr-home-card-desc {
    font-size: 13px;
    color: var(--amr-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.amr-home-card-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--amr-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.amr-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0C93F5 0%, #0968b0 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 17px;
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(12, 147, 245, 0.3);
}

.amr-btn-primary:hover {
    background: linear-gradient(135deg, #F5B40C 0%, #df9f02 100%);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 180, 12, 0.35);
}

/* ================== Внутренняя страница раздела ================== */
.amr-page {
    padding-top: 140px;
    background-color: var(--amr-body-bg);
    min-height: 100vh;
    padding-bottom: 80px;
    color: var(--amr-text);
}

.amr-hero {
    background: linear-gradient(135deg, #17385c 0%, #0d5c94 60%, #0C93F5 100%);
    color: #ffffff;
    border-radius: 24px;
    padding: 45px 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(23, 56, 92, 0.18);
    position: relative;
    overflow: hidden;
}

.amr-hero::after {
    content: '';
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.amr-org-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #e0f2fe;
    margin-bottom: 16px;
}

.amr-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #ffffff;
    line-height: 1.15;
}

.amr-hero p.amr-hero-lead {
    font-size: 18px;
    color: #e0f2fe;
    line-height: 1.6;
    max-width: 880px;
    margin-bottom: 25px;
}

/* Статистическая плашка в Hero */
.amr-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.amr-stat-box {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.amr-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #ffd166;
    line-height: 1;
    margin-bottom: 6px;
}

.amr-stat-label {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.35;
}

/* Опасность / Рецептурный отпуск (полоса со штриховкой) */
.amr-prescription-bar {
    background: #fff;
    border-left: 6px solid #e63946;
    border-radius: 12px;
    padding: 18px 24px;
    margin: 25px 0 35px 0;
    box-shadow: 0 4px 18px rgba(230, 57, 70, 0.08);
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.amr-stripes {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        #17385c,
        #17385c 12px,
        #F5B40C 12px,
        #F5B40C 24px
    );
}

.amr-prescription-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffe3e3;
    color: #e63946;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.amr-prescription-text {
    font-size: 16px;
    font-weight: 700;
    color: #17385c;
    margin: 0;
    line-height: 1.45;
}

.amr-prescription-text strong {
    color: #c92a2a;
}

/* ================== Навигация вкладками (Tabs) ================== */
.amr-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border: none;
    margin-bottom: 30px;
    background: #ffffff;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(12, 147, 245, 0.06);
    border: 1px solid var(--amr-border);
}

.amr-nav-tabs .nav-link {
    border: none !important;
    background: transparent;
    color: #4a5d6e;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.amr-nav-tabs .nav-link:hover {
    color: var(--amr-primary);
    background: #f0f7fd;
}

.amr-nav-tabs .nav-link.active {
    background: var(--amr-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(12, 147, 245, 0.35);
}

.amr-nav-tabs .nav-link i {
    font-size: 16px;
}

/* ================== Содержимое вкладок (Карточки и блоки) ================== */
.amr-content-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px 30px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--amr-border);
}

.amr-section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--amr-navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.amr-section-title i {
    color: var(--amr-primary);
}

.amr-section-subtitle {
    font-size: 16px;
    color: var(--amr-muted);
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Таб 1: Фармацевты */
.amr-pharma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.amr-pharma-card {
    background: #f8fbfe;
    border: 1px solid #d6e8f7;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.amr-pharma-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(12, 147, 245, 0.1);
    border-color: var(--amr-primary);
}

.amr-pharma-card-num {
    display: inline-block;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border-radius: 50%;
    background: var(--amr-primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 14px;
}

.amr-pharma-card h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--amr-navy);
    line-height: 1.45;
    margin: 0;
}

.amr-pharma-wide-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 2px dashed #0288d1;
    border-radius: 16px;
    padding: 24px 30px;
    margin-top: 15px;
}

.amr-pharma-wide-card h4 {
    color: #0288d1;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 8px;
}

/* Таб 2: 5 правил приема */
.amr-rules-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.amr-rule-item {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    background: #ffffff;
    border: 1px solid var(--amr-border);
    border-radius: 16px;
    padding: 26px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(12, 147, 245, 0.04);
}

.amr-rule-item:hover {
    transform: translateX(6px);
    border-color: var(--amr-primary);
    box-shadow: 0 8px 20px rgba(12, 147, 245, 0.12);
}

.amr-rule-badge-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #17385c 0%, #205488 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(23, 56, 92, 0.25);
}

.amr-rule-content h4 {
    font-size: 19px;
    font-weight: 800;
    color: var(--amr-navy);
    margin-bottom: 8px;
    line-height: 1.35;
}

.amr-rule-content p {
    font-size: 15px;
    color: #4a5d6e;
    line-height: 1.6;
    margin: 0;
}

/* Таб 3: Памятка для родителей (8 критериев) */
.amr-criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}

.amr-criteria-card {
    background: #ffffff;
    border: 1px solid var(--amr-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.amr-criteria-card:hover {
    transform: translateY(-4px);
    border-color: var(--amr-primary);
}

.amr-criteria-card.danger {
    border-color: #fca5a5;
    background: #fffafa;
}

.amr-criteria-card.danger:hover {
    border-color: #ef4444;
}

.amr-criteria-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.amr-criteria-num {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 12px;
    background: #6366f1;
    color: #ffffff;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.amr-criteria-card.danger .amr-criteria-num {
    background: #ef4444;
}

.amr-criteria-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--amr-navy);
    line-height: 1.3;
    margin: 0;
}

.amr-criteria-body {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    flex-grow: 1;
}

.amr-criteria-body ul {
    padding-left: 20px;
    margin: 0;
}

.amr-criteria-body li {
    margin-bottom: 6px;
}

/* Таб 4: Таймлайн и статистика */
.amr-timeline {
    position: relative;
    padding: 20px 0 20px 30px;
    border-left: 3px solid var(--amr-primary);
    margin: 20px 0 35px 20px;
}

.amr-timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.amr-timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--amr-primary);
}

.amr-timeline-item.warning::before {
    border-color: #ef4444;
    background: #ef4444;
}

.amr-timeline-year {
    display: inline-block;
    padding: 4px 12px;
    background: #e0f2fe;
    color: var(--amr-primary-dark);
    font-weight: 800;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.amr-timeline-item.warning .amr-timeline-year {
    background: #fee2e2;
    color: #b91c1c;
}

.amr-timeline-desc {
    font-size: 15px;
    color: #334155;
    line-height: 1.55;
    margin: 0;
}

/* Статистическая сетка */
.amr-numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 25px 0;
}

.amr-number-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 22px 20px;
    text-align: center;
}

.amr-big-number {
    font-size: 34px;
    font-weight: 900;
    color: var(--amr-primary);
    line-height: 1;
    margin-bottom: 10px;
}

.amr-big-number.danger {
    color: #ef4444;
}

.amr-number-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.45;
    margin: 0;
}

/* Таб 5: Пожилые люди */
.amr-elderly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.amr-vulnerability-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 16px;
    padding: 24px;
}

.amr-prevention-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 24px;
}

.amr-box-header {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.amr-vulnerability-box .amr-box-header {
    color: #991b1b;
}

.amr-prevention-box .amr-box-header {
    color: #166534;
}

/* Таб 6: Инфографика и печать */
.amr-posters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.amr-poster-card {
    background: #ffffff;
    border: 1px solid var(--amr-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.amr-poster-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 26px rgba(12, 147, 245, 0.15);
}

.amr-poster-img-wrap {
    height: 320px;
    overflow: hidden;
    background: #e2e8f0;
    position: relative;
    cursor: pointer;
}

.amr-poster-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.amr-poster-card:hover .amr-poster-img-wrap img {
    transform: scale(1.04);
}

.amr-poster-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 147, 245, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    transition: opacity 0.25s ease;
}

.amr-poster-card:hover .amr-poster-overlay {
    opacity: 1;
}

.amr-poster-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.amr-poster-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--amr-navy);
    line-height: 1.4;
    margin-bottom: 12px;
}

.amr-poster-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.amr-poster-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.amr-poster-btn.preview-btn {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.amr-poster-btn.preview-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.amr-poster-btn.download-btn {
    background: var(--amr-primary);
    color: #ffffff;
}

.amr-poster-btn.download-btn:hover {
    background: var(--amr-primary-dark);
}

/* Модальное окно просмотра постера */
.amr-modal-img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ================== Блок: Полезные материалы и документы ================== */
.amr-useful-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: #1b5e20;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #c8e6c9;
}

.amr-useful-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}

.amr-useful-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid var(--amr-border);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 4px 14px rgba(12, 147, 245, 0.05);
    transition: all 0.25s ease;
}

.amr-useful-card:hover {
    transform: translateY(-4px);
    border-color: var(--amr-primary);
    box-shadow: 0 10px 24px rgba(12, 147, 245, 0.14);
}

.amr-useful-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.amr-useful-thumb {
    width: 68px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.amr-useful-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.amr-useful-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: linear-gradient(135deg, #17385c 0%, #0C93F5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(12, 147, 245, 0.22);
}

.amr-useful-body {
    flex: 1;
}

.amr-useful-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--amr-navy);
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.amr-useful-desc {
    font-size: 13.5px;
    color: #526477;
    line-height: 1.5;
    margin: 0;
}

.amr-useful-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px dashed #d6e4f0;
}

.amr-useful-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 135px;
}

.amr-useful-btn.ru-btn {
    background: var(--amr-primary);
    color: #ffffff !important;
}

.amr-useful-btn.ru-btn:hover {
    background: var(--amr-primary-dark);
}

.amr-useful-btn.kk-btn {
    background: #17385c;
    color: #ffffff !important;
}

.amr-useful-btn.kk-btn:hover {
    background: #0f2640;
}

.amr-useful-btn.link-btn {
    background: #eef6ff;
    color: var(--amr-primary-dark) !important;
    border: 1px solid #b6d8f8;
}

.amr-useful-btn.link-btn:hover {
    background: var(--amr-primary);
    color: #ffffff !important;
}

/* Адаптивность */
@media (max-width: 991px) {
    .amr-hero {
        padding: 30px 20px;
    }
    .amr-hero h1 {
        font-size: 32px;
    }
    .amr-home-title {
        font-size: 28px;
    }
    .amr-content-card {
        padding: 24px 18px;
    }
    .amr-nav-tabs .nav-link {
        font-size: 14px;
        padding: 10px 14px;
    }
}

@media (max-width: 576px) {
    .amr-hero h1 {
        font-size: 24px;
    }
    .amr-hero p.amr-hero-lead {
        font-size: 15px;
    }
    .amr-rule-item {
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }
    .amr-criteria-grid {
        grid-template-columns: 1fr;
    }
}

