/* Основные переменные */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --accent-color: #60a5fa;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #f9fafb;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-accent: #eff6ff;
    --font-primary: 'Roboto', 'Open Sans', sans-serif;
    --font-heading: 'Montserrat', 'Roboto', sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

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

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

ul, ol {
    list-style-position: inside;
    margin-bottom: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-primary);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

/* Контейнер */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Прогресс-бар чтения */
.progress-container {
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 4px;
    background: transparent;
}

.progress-bar {
    height: 4px;
    background: var(--primary-color);
    width: 0%;
}

/* Шапка */
header {
    background-color: var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.logo img {
    max-height: 50px;
    display: block;
}

nav ul {
    display: flex;
    margin-bottom: 0;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

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

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition);
}

/* Главная секция героя */
.hero {
    background-color: var(--bg-accent);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

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

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

/* Секция блога */
.blog-posts {
    padding: 3rem 0;
}

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

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

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

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.post-content {
    padding: 1.5rem;
}

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

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

.category {
    color: var(--primary-color);
    font-weight: 500;
}

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

.read-more svg {
    margin-left: 0.25rem;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-color);
}

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

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.current-page {
    padding: 0.5rem 1rem;
    background-color: var(--bg-accent);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
}

/* Форма подписки */
.newsletter {
    background-color: var(--bg-accent);
    padding: 4rem 0;
    text-align: center;
}

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

.newsletter p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-weight: 500;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--secondary-color);
}

/* Подвал */
footer {
    background-color: #1f2937;
    color: var(--text-light);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

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

.footer-column h3 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column p {
    margin-bottom: 1.5rem;
    color: #d1d5db;
}

.footer-column ul {
    list-style: none;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: #d1d5db;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: white;
}

.footer-column address p {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-column address p svg {
    margin-right: 0.5rem;
    min-width: 16px;
}

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

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

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

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

/* Cookie consent */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    z-index: 1000;
    display: none;
}

.cookie-content {
    text-align: center;
}

.cookie-content p {
    margin-bottom: 1.5rem;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cookie-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-accept {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

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

.btn-customize {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid #ddd;
}

.btn-customize:hover {
    background-color: #e5e7eb;
}

.btn-reject {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid #ddd;
}

.btn-reject:hover {
    background-color: #f3f4f6;
}

/* Страница "О нас" */
.page-banner {
    background-color: var(--bg-accent);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.page-banner h1 {
    margin-bottom: 1rem;
}

.page-banner p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.about-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.about-intro h2 {
    margin-bottom: 1.5rem;
}

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

.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-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--bg-accent);
}

.team-member h3 {
    margin-bottom: 0.25rem;
}

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

.values-section {
    margin-bottom: 4rem;
}

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

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

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

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

.value-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.value-item h3 {
    margin-bottom: 1rem;
}

.cta-section {
    background-color: var(--bg-accent);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Страница контактов */
.contact-content {
    padding: 3rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-accent);
    color: var(--primary-color);
    border-radius: 50%;
    margin-right: 1rem;
}

.contact-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.contact-text p a {
    color: var(--text-primary);
}

.contact-text p a:hover {
    color: var(--primary-color);
}

.social-contact {
    margin-top: 3rem;
}

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

.contact-form-container h2 {
    margin-bottom: 2rem;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: span 2;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
}

.checkbox-container input {
    width: auto;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

.map-section {
    padding: 3rem 0;
}

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

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

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

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

.modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    text-align: center;
    position: relative;
}

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

.modal-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
}

/* Страница блога - детальная */
.blog-post {
    padding: 3rem 0;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post .post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

.blog-post .post-content h2 {
    margin-top: 2.5rem;
    font-size: 1.75rem;
}

.blog-post .post-content h3 {
    margin-top: 2rem;
    font-size: 1.5rem;
}

.blog-post .post-content h4 {
    margin-top: 1.5rem;
    font-size: 1.25rem;
}

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

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

.blog-post .post-content img {
    margin: 2rem auto;
    display: block;
    border-radius: var(--border-radius);
    max-width: 100%;
}

.blog-post .post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: var(--bg-accent);
    font-style: italic;
}

.post-tags {
    margin: 3rem auto;
    max-width: 800px;
}

.post-tags h3 {
    margin-bottom: 1rem;
}

.post-tags ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
}

.post-tags ul li a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--bg-accent);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

.post-share {
    margin: 3rem auto;
    max-width: 800px;
}

.post-share h3 {
    margin-bottom: 1rem;
}

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

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

.social-share a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem auto;
    max-width: 800px;
}

.prev-post a,
.next-post a {
    display: block;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    transition: var(--transition);
    height: 100%;
}

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

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

.prev-post a:hover,
.next-post a:hover {
    background-color: var(--bg-accent);
}

.prev-post a span,
.next-post a span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.prev-post a h4,
.next-post a h4 {
    margin-bottom: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

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

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

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-post {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.related-post a {
    display: block;
    color: var(--text-primary);
}

.related-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

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

.related-post h3 {
    padding: 1rem;
    font-size: 1.125rem;
    margin-bottom: 0;
}

/* Медиа-запросы */
@media (max-width: 992px) {
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    nav ul {
        position: absolute;
        flex-direction: column;
        background-color: var(--bg-primary);
        top: 100%;
        right: 0;
        left: 0;
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin-left: 0;
        margin-bottom: 1rem;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .newsletter-form button {
        width: 100%;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
}
