/* ====== Основные настройки ====== */
:root {
    /* Основная цветовая схема (светлая тема) */
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-primary-light: #60a5fa;
    --color-secondary: #6366f1;
    --color-secondary-dark: #4338ca;
    --color-text: #333333;
    --color-text-light: #6b7280;
    --color-background: #ffffff;
    --color-background-alt: #f9fafb;
    --color-border: #e5e7eb;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-card-shadow: rgba(0, 0, 0, 0.08);
    
    /* Шрифты */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Размеры */
    --header-height: 80px;
    --container-max-width: 1280px;
    --container-padding: 2rem;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

/* Темная тема */
[data-theme="dark"] {
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-primary-light: #93c5fd;
    --color-secondary: #8b5cf6;
    --color-secondary-dark: #6d28d9;
    --color-text: #f9fafb;
    --color-text-light: #d1d5db;
    --color-background: #1f2937;
    --color-background-alt: #111827;
    --color-border: #374151;
    --color-card-shadow: rgba(0, 0, 0, 0.25);
}

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

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

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

a:hover {
    color: var(--color-primary-dark);
}

ul, ol {
    list-style-position: inside;
}

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

button {
    cursor: pointer;
    font-family: var(--font-body);
}

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

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1.5rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

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

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

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

/* ====== Переключатель темы ====== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#theme-switch {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#theme-switch:hover {
    background-color: var(--color-primary-dark);
}

/* ====== Шапка сайта ====== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: background-color var(--transition-speed);
}

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

.logo img {
    height: 50px;
    width: auto;
}

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

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--color-text);
    font-weight: 600;
    position: relative;
}

nav a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-speed);
}

nav a:hover:after,
nav a.active:after {
    width: 100%;
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--color-text);
    transition: all var(--transition-speed);
}

/* ====== Секция Hero ====== */
.hero {
    background-color: var(--color-background-alt);
    padding: 6rem 0;
    text-align: center;
    background-image: linear-gradient(to right, rgba(37, 99, 235, 0.1), rgba(99, 102, 241, 0.1));
}

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

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

/* ====== Блог ====== */
.blog-posts {
    padding: 5rem 0;
}

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

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

.post-card {
    background-color: var(--color-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px var(--color-card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px var(--color-card-shadow);
}

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

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

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

.post-content {
    padding: 1.5rem;
}

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

.post-content p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.read-more {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    transition: gap var(--transition-speed);
}

.read-more:after {
    content: '→';
    transition: transform var(--transition-speed);
}

.read-more:hover {
    gap: 0.75rem;
}

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

/* ====== Подписка на рассылку ====== */
.newsletter {
    background-color: var(--color-background-alt);
    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: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    background-color: var(--color-background);
    color: var(--color-text);
    font-size: 1rem;
}

.newsletter-form button {
    padding: 0 1.5rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-weight: 600;
    transition: background-color var(--transition-speed);
}

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

/* ====== Футер ====== */
footer {
    background-color: var(--color-background-alt);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-border);
}

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

.footer-column h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.contact-info {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-info i {
    color: var(--color-primary);
    font-size: 1.25rem;
}

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

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

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

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a {
    color: var(--color-text-light);
    font-size: 0.875rem;
    transition: color var(--transition-speed);
}

.legal-links a:hover {
    color: var(--color-primary);
}

/* ====== Cookie Consent ====== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-background);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 1000;
    display: none;
}

.cookie-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-content p {
    flex: 1;
    margin-bottom: 0;
    font-size: 0.875rem;
    min-width: 280px;
}

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

.cookie-buttons button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

#accept-cookies {
    background-color: var(--color-primary);
    color: white;
    border: none;
}

#accept-cookies:hover {
    background-color: var(--color-primary-dark);
}

#customize-cookies {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

#customize-cookies:hover {
    background-color: var(--color-background-alt);
}

#decline-cookies {
    background-color: transparent;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
}

#decline-cookies:hover {
    background-color: var(--color-danger);
    color: white;
}

/* ====== Страница О нас ====== */
.page-header {
    background-color: var(--color-background-alt);
    padding: 4rem 0;
    text-align: center;
}

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

.page-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text-light);
}

.about-us {
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

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

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

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

.value-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--color-background);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--color-card-shadow);
    transition: transform var(--transition-speed);
}

.value-item:hover {
    transform: translateY(-5px);
}

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

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

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

.team-member {
    background-color: var(--color-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px var(--color-card-shadow);
    transition: transform var(--transition-speed);
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.team-member h3 {
    padding: 1rem 1.5rem 0.5rem;
    margin-bottom: 0;
}

.team-member p {
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

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

.social-links {
    display: flex;
    padding: 0 1.5rem 1.5rem;
    gap: 0.75rem;
}

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

.social-links a:hover {
    background-color: var(--color-primary);
    color: white;
}

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

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

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

.cta-section .btn {
    background-color: white;
    color: var(--color-primary);
}

.cta-section .btn:hover {
    background-color: var(--color-background-alt);
}

/* ====== Страница Контакты ====== */
.contact-section {
    padding: 5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info {
    margin-bottom: 3rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-card {
    padding: 1.5rem;
    background-color: var(--color-background-alt);
    border-radius: var(--border-radius);
    display: flex;
    gap: 1rem;
}

.contact-icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-details p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

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

.contact-form-container {
    background-color: var(--color-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px var(--color-card-shadow);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
}

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

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input {
    width: 16px;
    height: 16px;
}

.map-section {
    padding-bottom: 5rem;
}

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

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--color-background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
}

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

/* Всплывающее окно благодарности */
.thank-you-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.thank-you-popup.active {
    display: flex;
    opacity: 1;
}

.thank-you-content {
    background-color: var(--color-background);
    padding: 3rem;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.thank-you-icon {
    margin: 0 auto 1.5rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.thank-you-content p {
    margin-bottom: 2rem;
}

/* ====== Страница поста ====== */
.blog-post {
    padding: 5rem 0;
}

.post-header {
    margin-bottom: 3rem;
}

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

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.post-content-full p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.post-content-full h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

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

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

.post-tag {
    padding: 0.5rem 1rem;
    background-color: var(--color-background-alt);
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: all var(--transition-speed);
}

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

.share-post {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

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

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.related-posts {
    padding: 4rem 0;
    background-color: var(--color-background-alt);
}

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

.post-navigation {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-navigation-item {
    padding: 1.5rem;
    background-color: var(--color-background-alt);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.post-navigation-item:hover {
    background-color: var(--color-primary);
    color: white;
}

.post-navigation-item:hover a {
    color: white;
}

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

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

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

.post-navigation-title {
    font-weight: 600;
}

/* ====== Адаптивный дизайн ====== */
@media (max-width: 992px) {
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-background);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left var(--transition-speed);
        z-index: 99;
        padding: 2rem;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .blog-posts,
    .about-us,
    .contact-section {
        padding: 3rem 0;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: var(--border-radius);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
    }
    
    .cookie-buttons {
        width: 100%;
    }
}
