/* Основные переменные */
:root {
    --primary-color: #0056b3;
    --secondary-color: #003366;
    --accent-color: #ffa500;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f5f7fa;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 6px;
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --footer-bg: #162447;
    --footer-text: #ffffff;
}

/* Сброс стилей и основные настройки */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

/* Контейнер */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-accept {
    background-color: var(--success-color);
}

.btn-accept:hover {
    background-color: #218838;
}

.btn-settings {
    background-color: var(--info-color);
}

.btn-settings:hover {
    background-color: #138496;
}

.btn-decline {
    background-color: var(--text-light);
}

.btn-decline:hover {
    background-color: #555;
}

/* Хедер */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    max-height: 40px;
    margin-right: 0.5rem;
}

nav ul {
    display: flex;
}

nav li {
    margin-left: 1.5rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

/* Героическая секция */
.hero {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Заголовок страницы */
.page-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: white;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin: 0;
}

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

section {
    margin-bottom: 3rem;
}

/* Сетка постов */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.post-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    margin-bottom: 0.5rem;
}

.post-content h3 a {
    color: var(--secondary-color);
}

.post-content h3 a:hover {
    color: var(--primary-color);
}

.post-meta {
    display: flex;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.post-meta span {
    margin-right: 1rem;
}

.read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
}

.read-more .icon {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.read-more:hover .icon {
    transform: translateX(3px);
}

/* Подписка на рассылку */
.newsletter {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

/* Глоссарий */
.glossary {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.glossary h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.glossary-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.glossary-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.glossary-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

/* Секция "Задать вопрос" */
.ask-question-cta {
    text-align: center;
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.ask-question-cta h3 {
    margin-bottom: 1.5rem;
}

/* Страница О нас */
.about-intro {
    margin-bottom: 3rem;
}

.about-intro h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.team-section {
    margin-bottom: 3rem;
}

.team-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    text-align: center;
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 5px solid white;
    box-shadow: var(--shadow);
}

.team-member h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.team-member p:first-of-type {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.our-values {
    margin-bottom: 3rem;
}

.our-values h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.value-item {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.value-icon {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Страница контактов */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info h2, .contact-form h2 {
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.contact-icon {
    margin-right: 1rem;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.social-media h3 {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

.form-checkbox label {
    margin-bottom: 0;
}

.map-section {
    margin-bottom: 3rem;
}

.map-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.thank-you-message {
    text-align: center;
}

.success-icon {
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.thank-you-message h2 {
    margin-bottom: 1rem;
}

.thank-you-message p {
    margin-bottom: 1.5rem;
}

/* Футер */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.footer-col p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    color: var(--footer-text);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col ul a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-col address p {
    margin-bottom: 0.5rem;
}

.footer-col address a {
    color: var(--footer-text);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col address a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.legal-links {
    margin-bottom: 1rem;
}

.legal-links a {
    color: var(--footer-text);
    opacity: 0.8;
    margin: 0 0.75rem;
    transition: var(--transition);
}

.legal-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.copyright {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Cookie баннер */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1.5rem;
    z-index: 1000;
}

.cookie-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-content p {
    margin: 0;
}

.cookie-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cookie-buttons .btn {
    padding: 0.5rem 1rem;
}

/* Пост в полном размере */
.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.post-meta-full {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.post-meta-full .post-date {
    margin-right: 1rem;
}

.post-meta-full .post-category {
    background-color: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
}

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-content-full {
    margin-bottom: 3rem;
}

.post-content-full h2 {
    margin: 2.5rem 0 1rem;
    color: var(--secondary-color);
}

.post-content-full h3 {
    margin: 2rem 0 1rem;
    color: var(--secondary-color);
}

.post-content-full p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.post-content-full ul, .post-content-full ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content-full ul li, .post-content-full ol li {
    margin-bottom: 0.5rem;
}

.post-content-full blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.post-content-full img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.post-tags {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tags .tag {
    background-color: var(--bg-light);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.post-tags .tag:hover {
    background-color: var(--primary-color);
    color: white;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-navigation a {
    max-width: 45%;
}

.post-navigation .prev-post {
    text-align: left;
}

.post-navigation .next-post {
    text-align: right;
}

.post-navigation span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.related-posts {
    margin-top: 4rem;
}

.related-posts h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Медиа-запросы */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }
    
    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .contact-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    header .container {
        height: 70px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: var(--shadow);
        padding: 1rem 0;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
    }
    
    nav.active {
        height: auto;
    }
    
    nav ul {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    nav li {
        margin: 0;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    nav li:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-4px, 4px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(45deg) translate(-4px, -4px);
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
    }
    
    .post-meta-full {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-meta-full .post-date {
        margin-bottom: 0.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .post-navigation a {
        max-width: 100%;
    }
}
