/* Основные стили для сайта методички */
:root {
    --cherry: #8B0000;
    --cherry-light: #B22222;
    --cherry-dark: #5A0000;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --gray: #F5F5F5;
    --gray-dark: #333333;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    min-height: 100vh;
}

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

/* Шапка */
.header {
    background: linear-gradient(90deg, var(--cherry-dark) 0%, var(--cherry) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.logo span {
    background: var(--white);
    color: var(--cherry);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 5px;
}

/* Навигация */
.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--white);
    color: var(--cherry);
    font-weight: 600;
}

/* Кнопка связи */
.contact-btn {
    background: var(--white);
    color: var(--cherry);
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-btn:hover {
    background: var(--gray);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Мобильное меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Основной контент */
.main {
    padding: 2rem 0 4rem;
}

/* Герой секция */
.hero {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.05) 0%, rgba(178, 34, 34, 0.1) 100%);
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    text-align: center;
    border: 1px solid rgba(139, 0, 0, 0.1);
}

.hero h1 {
    color: var(--cherry-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray-dark);
    max-width: 800px;
    margin: 0 auto;
}

/* Карточки разделов */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.section-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-card:hover {
    transform: translateY(-5px);
    border-color: var(--cherry);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
    color: var(--cherry);
    margin-bottom: 1rem;
}

.section-card h3 {
    color: var(--cherry-dark);
    margin-bottom: 0.5rem;
}

/* Контент страниц */
.content {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 0, 0, 0.08);
}

.page-title {
    color: var(--cherry-dark);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--cherry);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Правила и списки */
.rules-list {
    list-style: none;
    padding-left: 0;
}

.rules-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(139, 0, 0, 0.03);
    border-left: 4px solid var(--cherry);
    border-radius: 0 8px 8px 0;
    transition: var(--transition);
}

.rules-list li:hover {
    background: rgba(139, 0, 0, 0.08);
    transform: translateX(5px);
}

.rules-list h3 {
    color: var(--cherry);
    margin-bottom: 0.5rem;
}

/* Блоки для отыгровок */
.rp-block {
    background: var(--gray);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    border-left: 4px solid var(--cherry);
    position: relative;
    overflow: hidden;
}

.rp-block::before {
    content: 'RP';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--cherry);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Медицинские инструкции */
.medical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.medical-card {
    background: linear-gradient(135deg, #fff0f0 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(139, 0, 0, 0.1);
}

.medical-card h4 {
    color: var(--cherry);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Подвал */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info p {
    color: #aaa;
    font-size: 0.9rem;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cherry-dark);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .nav.active {
        display: flex;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content, .section-card {
    animation: fadeIn 0.6s ease-out;
}

/* Дополнительные элементы */
.warning {
    background: linear-gradient(135deg, #fff8f8 0%, #fff0f0 100%);
    border: 2px solid var(--cherry);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    position: relative;
}

.warning::before {
    content: '⚠️';
    position: absolute;
    top: -15px;
    left: 20px;
    background: white;
    padding: 0 10px;
    font-size: 1.2rem;
}

/* Иконки для разделов */
.icon {
    font-size: 2rem;
    margin-right: 10px;
    vertical-align: middle;
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.breadcrumbs a {
    color: var(--cherry);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Кнопка "Наверх" */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--cherry);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--cherry-dark);
    transform: translateY(-3px);
}