/* Основные переменные */
:root {
    --primary-color: #3f51b5;
    --primary-dark: #303f9f;
    --primary-light: #c5cae9;
    --secondary-color: #ff4081;
    --secondary-dark: #c60055;
    --text-color: #333333;
    --text-light: #666666;
    --text-dark: #222222;
    --bg-color: #ffffff;
    --bg-light: #f5f7fa;
    --bg-dark: #e0e0e0;
    --border-color: #dddddd;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Roboto Slab', Georgia, 'Times New Roman', Times, serif;
    --shadow-small: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 10px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 6px;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

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

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

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

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

ul, ol {
    list-style: none;
    padding: 0;
}

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

h1 {
    font-size: 3.6rem;
}

h2 {
    font-size: 2.8rem;
}

h3 {
    font-size: 2.2rem;
}

h4 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1.5rem;
}

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

/* Шапка */
header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow-small);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    flex: 0 0 auto;
}

.logo img {
    max-height: 5rem;
    border-radius: var(--border-radius);
}

nav ul {
    display: flex;
}

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

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

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

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

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

/* Секция героя */
.hero {
    background-color: var(--primary-color);
    color: white;
    padding: 8rem 0;
    text-align: center;
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.hero h1 {
    font-size: 4.2rem;
    margin-bottom: 2rem;
    color: white;
}

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

/* Основное содержимое */
main {
    padding: 4rem 0;
    min-height: 50vh;
}

/* Секция блога */
.blog-posts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.post-preview {
    display: flex;
    margin-bottom: 3.5rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-small);
    overflow: hidden;
    transition: var(--transition);
}

.post-preview:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.post-image {
    flex: 0 0 35%;
}

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

.post-content {
    flex: 1;
    padding: 2rem;
}

.post-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem;
    position: relative;
    padding-right: 25px;
}

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

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
}

.read-more:hover::after {
    right: -5px;
}

/* Боковая панель */
.sidebar {
    padding-left: 2rem;
}

.sidebar-widget {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-small);
}

.sidebar-widget h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tags li a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 30px;
    font-size: 1.4rem;
    transition: var(--transition);
}

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

/* Секция поста */
.post {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-small);
    overflow: hidden;
    margin-bottom: 4rem;
}

.post-header {
    position: relative;
}

.post-header .post-image {
    width: 100%;
    height: 400px;
}

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

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.4rem;
    color: var(--text-light);
}

.post-content {
    padding: 2.5rem;
}

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

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content ul, 
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 2rem;
}

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

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

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

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

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

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

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

.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.post-tags span {
    font-weight: 600;
    color: var(--text-dark);
}

.post-tags a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 30px;
    font-size: 1.4rem;
    transition: var(--transition);
}

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

.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-share span {
    font-weight: 600;
    color: var(--text-dark);
}

.post-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    background: var(--bg-light);
    color: var(--text-color);
    border-radius: 50%;
    transition: var(--transition);
}

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

/* Похожие посты */
.related-posts {
    margin-top: 4rem;
}

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

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

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

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.related-post img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.related-post h3 {
    padding: 1.5rem;
    font-size: 1.7rem;
}

.related-post h3 a {
    color: var(--text-color);
}

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

/* Страница О нас */
.about-section {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-small);
}

.about-intro {
    margin-bottom: 4rem;
    text-align: center;
}

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

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

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

.team-member {
    text-align: center;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-small);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

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

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

.team-member p {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.team-member .social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.team-member .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    color: var(--text-light);
    background: var(--bg-color);
    border-radius: 50%;
    transition: var(--transition);
}

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

.values-section {
    margin-top: 5rem;
    text-align: center;
}

.values-section h2 {
    margin-bottom: 3rem;
}

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

.value-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-small);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.value-card svg {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

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

.contact-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-small);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.contact-card .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 6rem;
    height: 6rem;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

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

.contact-card p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.contact-card a {
    color: var(--text-color);
    font-weight: 500;
}

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

.contact-form-container {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-small);
}

.contact-form-container h2 {
    margin-bottom: 2.5rem;
    text-align: center;
}

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

.contact-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-light);
    font-family: var(--font-primary);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.map-section {
    margin-top: 4rem;
}

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

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

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

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    margin: 15% auto;
    padding: 3rem;
    width: 80%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    text-align: center;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
}

.close:hover {
    color: var(--text-dark);
}

.modal-ok-btn {
    margin-top: 2rem;
    min-width: 120px;
}

/* Куки-баннер */
.cookie-consent {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--bg-color);
    padding: 2rem;
    box-shadow: var(--shadow-large);
    z-index: 999;
    transition: bottom 0.5s ease-in-out;
}

.cookie-consent.show {
    bottom: 0;
}

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

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

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

/* Кнопки */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-secondary {
    background-color: var(--bg-dark);
    color: var(--text-color);
}

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

.btn-tertiary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-tertiary:hover {
    background-color: var(--bg-light);
}

/* Подсказки */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    background: var(--text-dark);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    font-size: 1.4rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-dark) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Футер */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 5rem 0;
}

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

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

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

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

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

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-column .social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

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

/* Адаптивность */
@media (max-width: 992px) {
    html {
        font-size: 60%;
    }
    
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        padding-left: 0;
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 58%;
    }
    
    .post-preview {
        flex-direction: column;
    }
    
    .post-image {
        flex: 0 0 200px;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .post-share {
        align-self: flex-start;
    }
    
    .team-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    header .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 1.2rem;
    }
    
    .hero h1 {
        font-size: 3.4rem;
    }
    
    .hero p {
        font-size: 1.6rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .post-header .post-image {
        height: 250px;
    }
}

/* Эффект печатной машинки для заголовков */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    50% { border-color: transparent }
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: currentColor;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

/* Улучшенная доступность для фокусируемых элементов */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
