/* Базовые настройки */
:root {
    --primary-color: #4a6baf;
    --primary-color-dark: #365288;
    --primary-color-light: #6989c8;
    --secondary-color: #53c287;
    --accent-color: #f6c844;
    --text-color: #333333;
    --text-color-light: #666666;
    --background-color: #ffffff;
    --background-color-alt: #f7f9fc;
    --border-color: #e1e4e8;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-secondary: 'Georgia', 'Times New Roman', serif;
    --container-width: 1200px;
    --header-height: 80px;
    --footer-bg: #1a2236;
    --footer-text: #c9d1d9;
}

/* Тёмная тема */
[data-theme="dark"] {
    --primary-color: #5d80cc;
    --primary-color-dark: #4a6baf;
    --primary-color-light: #7a98dc;
    --secondary-color: #53c287;
    --accent-color: #f6c844;
    --text-color: #e1e4e8;
    --text-color-light: #a0a8b0;
    --background-color: #121212;
    --background-color-alt: #1e1e1e;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.3);
    --footer-bg: #0a0c10;
    --footer-text: #c9d1d9;
}

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

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

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

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn:hover, .btn:focus {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    color: white;
}

.btn:active {
    transform: translateY(0);
}

/* Хедер и навигация */
header {
    background-color: var(--background-color);
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

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

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

.logo img {
    height: 50px;
    width: auto;
    border-radius: 50%;
    object-fit: cover;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    white-space: nowrap;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

nav a:hover, nav a.active {
    background-color: rgba(74, 107, 175, 0.1);
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color var(--transition-speed);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sun-icon, .moon-icon {
    transition: opacity var(--transition-speed), transform var(--transition-speed);
}

.sun-icon {
    opacity: 0;
    position: absolute;
    transform: rotate(-90deg);
}

.moon-icon {
    opacity: 1;
    transform: rotate(0);
}

[data-theme="dark"] .sun-icon {
    opacity: 1;
    transform: rotate(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

/* Главная секция */
.hero {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px 0;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-color-light);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    min-width: 300px;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    width: 100%;
    object-fit: cover;
    aspect-ratio: 16/9;
}

/* Секция последних постов */
.latest-posts {
    padding: 60px 0;
}

.latest-posts h2 {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.latest-posts h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.post-card {
    display: flex;
    margin-bottom: 40px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    flex-direction: column;
}

@media (min-width: 768px) {
    .post-card {
        flex-direction: row;
    }
}

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

.post-image {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    overflow: hidden;
}

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

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

.post-content {
    flex: 2;
    padding: 25px;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

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

/* Обзор статьи */
.post-overview {
    background-color: var(--background-color-alt);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.post-overview h3, .post-overview h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.post-overview ul {
    margin-left: 20px;
    list-style-type: disc;
    color: var(--text-color-light);
}

.post-overview li {
    margin-bottom: 5px;
}

/* Страница блога */
.blog-post {
    padding: 60px 0;
}

.post-header {
    margin-bottom: 30px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

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

.post-content {
    line-height: 1.8;
}

.post-content h3, .post-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content ul, .post-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    background-color: var(--background-color-alt);
    margin: 20px 0;
    font-style: italic;
    color: var(--text-color-light);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags h4 {
    margin: 0 15px 10px 0;
}

.post-tags ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.post-tags li {
    margin: 0;
}

.post-tags a {
    display: inline-block;
    background-color: var(--background-color-alt);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color-light);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

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

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

.post-navigation .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-arrow-left, .icon-arrow-right {
    width: 16px;
    height: 16px;
}

.post-nav-next {
    margin-left: auto;
}

.related-posts {
    margin-top: 60px;
}

.related-posts h3 {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.related-posts h3:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

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

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

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

.related-post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.related-post-card h4 {
    padding: 15px 20px 20px;
    font-size: 1.1rem;
}

/* Страница About */
.about-intro {
    padding: 60px 0 40px;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.team {
    padding: 40px 0 60px;
    background-color: var(--background-color-alt);
    border-radius: var(--border-radius);
    margin-bottom: 60px;
}

.team h2 {
    text-align: center;
    margin-bottom: 40px;
}

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

.team-card {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform var(--transition-speed);
}

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

.team-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.team-card h3 {
    margin: 20px 0 5px;
    font-size: 1.3rem;
}

.team-card p {
    padding: 0 20px;
    margin-bottom: 15px;
}

.team-card p:first-of-type {
    color: var(--primary-color);
    font-weight: 600;
}

.team-card .social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 0 0 20px;
}

.team-card .social-links a {
    color: var(--text-color-light);
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.team-card .social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.mission, .values {
    padding: 60px 0;
}

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

.mission-content ul, .mission-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.mission-content li {
    margin-bottom: 10px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.value-card {
    background-color: var(--background-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform var(--transition-speed);
}

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

.value-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: rgba(74, 107, 175, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
}

.value-card h3 {
    margin-bottom: 15px;
}

/* Страница контактов */
.contact-intro {
    padding: 60px 0 40px;
    text-align: center;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 20px;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.info-icon {
    color: var(--primary-color);
    margin-top: 5px;
}

.info-item h4 {
    margin-bottom: 5px;
}

.social-media {
    margin-top: 30px;
}

.social-media h4 {
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

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

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

.contact-form-container {
    flex: 2;
    min-width: 400px;
}

.contact-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-group {
    flex: 1 0 calc(50% - 10px);
}

.full-width {
    flex: 1 0 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: border-color var(--transition-speed);
    font-family: var(--font-primary);
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-direction: row;
}

.checkbox-group input {
    width: auto;
    margin-top: 5px;
}

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

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    margin-top: 10px;
}

.map-section {
    margin-bottom: 60px;
}

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

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

.map-placeholder img {
    max-height: 300px;
    object-fit: cover;
    width: 100%;
    opacity: 0.7;
}

.map-placeholder p {
    color: var(--text-color-light);
    padding: 20px;
}

.faq-section {
    margin-bottom: 60px;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

.modal-content {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color-light);
}

.modal-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: rgba(40, 167, 69, 0.1);
    border-radius: 50%;
    color: var(--success-color);
}

.btn-close-modal {
    margin-top: 20px;
}

/* Cookie Banner */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    padding: 20px;
}

.cookie-content {
    max-width: 1000px;
    margin: 0 auto;
}

.cookie-content p {
    margin: 10px 0 20px;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.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-reject {
    background-color: var(--text-color-light);
}

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

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

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

.footer-column h3 {
    color: white;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

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

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

.footer-column li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-column i {
    color: var(--primary-color-light);
}

.footer-column a {
    color: var(--footer-text);
    transition: color var(--transition-speed);
}

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

.subscribe-form {
    display: flex;
    margin-top: 15px;
}

.subscribe-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.subscribe-form button {
    padding: 0 15px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header .container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero {
        padding: 40px 0;
        flex-direction: column;
        gap: 30px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .post-card {
        flex-direction: column;
    }
    
    .post-image {
        max-width: none;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-form-container {
        min-width: 100%;
    }
    
    .form-group {
        flex: 1 0 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Иконки */
.icon-address, .icon-phone, .icon-email {
    display: inline-flex;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-address::before {
    content: "\f3c5"; /* Font Awesome map marker icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.icon-phone::before {
    content: "\f095"; /* Font Awesome phone icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.icon-email::before {
    content: "\f0e0"; /* Font Awesome envelope icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.icon-arrow-left::before {
    content: "\f104"; /* Font Awesome left arrow icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.icon-arrow-right::before {
    content: "\f105"; /* Font Awesome right arrow icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}
