/* Основные настройки */
:root {
    --primary-color: #4a6bff;
    --primary-light: #6b86ff;
    --primary-dark: #354fc8;
    --secondary-color: #ff6b4a;
    --secondary-light: #ff8a6b;
    --secondary-dark: #e85a3b;
    --text-color: #333;
    --text-light: #666;
    --background-color: #f9f9f9;
    --background-alt: #f0f2f5;
    --white: #fff;
    --gray-100: #f5f5f5;
    --gray-200: #e9e9e9;
    --gray-300: #d9d9d9;
    --gray-400: #c4c4c4;
    --gray-500: #9e9e9e;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --header-height: 80px;
    --footer-bg: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

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

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

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

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

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

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

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

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

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

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

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0;
    position: relative;
}

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

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

/* Герой-секция */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--white);
}

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

/* Счетчик времени */
.countdown-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 20px;
    max-width: 600px;
    margin: 40px auto 0;
}

.countdown-container h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

#countdown {
    display: flex;
    justify-content: center;
}

.time-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 15px;
}

.time-segment span:first-child {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--white);
    border-radius: 5px;
    padding: 10px 15px;
    min-width: 70px;
    text-align: center;
}

.time-segment .label {
    font-size: 0.9rem;
    color: var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Секция с постами */
.latest-posts {
    padding: 50px 0;
}

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

.latest-posts h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

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

.post-card {
    background-color: var(--white);
    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.15);
}

.post-card a {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

.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: 20px;
}

.post-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

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

.post-content p {
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.post-card:hover .read-more::after {
    margin-left: 10px;
}

/* График трендов */
.tech-trends {
    padding: 50px 0;
    background-color: var(--background-alt);
    border-radius: var(--border-radius);
    margin-top: 50px;
}

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

.tech-trends h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.chart-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.chart-description {
    text-align: center;
    max-width: 700px;
    margin: 20px auto 0;
    color: var(--text-light);
    font-style: italic;
}

/* О нас */
.about-intro {
    padding: 50px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: center;
}

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

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Команда */
.team {
    padding: 50px 0;
    background-color: var(--background-alt);
    border-radius: var(--border-radius);
}

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

.team h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

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

.team-member {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    text-align: center;
    padding-bottom: 20px;
    transition: var(--transition);
}

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

.team-member img {
    width: 100%;
    height: auto;
    display: block;
}

.team-member h3 {
    margin: 15px 0 5px;
    font-size: 1.2rem;
}

.team-member p {
    margin-bottom: 10px;
    padding: 0 15px;
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--gray-100);
    color: var(--text-light);
    transition: var(--transition);
}

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

/* Ценности */
.values {
    padding: 50px 0;
}

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

.values h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

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

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

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

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

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

.value-card p {
    margin-bottom: 0;
    color: var(--text-light);
}

/* Контакты */
.contact-info {
    padding: 50px 0;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.contact-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

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

.contact-icon {
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

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

.contact-card a {
    color: var(--text-light);
}

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

.map-container {
    margin-bottom: 50px;
}

.map-container h3 {
    text-align: center;
    margin-bottom: 20px;
}

.map-placeholder {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: var(--gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.map-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-align: center;
}

/* Форма контактов */
.contact-form {
    padding: 50px 0;
    background-color: var(--background-alt);
    border-radius: var(--border-radius);
}

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

.contact-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

form {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
}

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

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

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

.btn-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Всплывающее окно благодарности */
.form-success {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.success-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.success-icon {
    color: var(--success-color);
    margin-bottom: 20px;
}

.success-content h3 {
    margin-bottom: 15px;
}

.success-content p {
    margin-bottom: 20px;
}

.btn-close {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Блог-пост */
.blog-post {
    padding: 50px 0;
}

.post-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 10px;
}

.blog-post .post-image {
    max-width: 800px;
    margin: 0 auto 40px;
    height: auto;
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.blog-post .post-content h2 {
    margin-top: 40px;
    font-size: 1.8rem;
}

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

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

.post-tags {
    max-width: 800px;
    margin: 0 auto 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: var(--gray-200);
    color: var(--text-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.post-navigation {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
}

.back-to-blog {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.back-to-blog:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.post-nav-links {
    display: flex;
    gap: 20px;
}

.prev-post, .next-post {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.prev-post:hover, .next-post:hover {
    color: var(--primary-color);
}

/* Похожие посты */
.related-posts {
    padding: 50px 0;
    background-color: var(--background-alt);
    border-radius: var(--border-radius);
    margin-top: 50px;
}

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

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

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

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

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

.related-post h4 {
    font-size: 1.1rem;
    padding: 15px;
    margin-bottom: 0;
}

/* Куки-баннер */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 1000;
}

.cookie-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cookie-content p {
    margin-bottom: 20px;
    max-width: 800px;
}

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

.cookie-buttons button {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

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

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

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

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

#decline-cookies:hover {
    background-color: #d32f2f;
}

/* Подвал */
footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 50px 0 0;
}

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

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
}

.footer-logo h2 {
    color: var(--white);
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.footer-logo p {
    color: var(--gray-400);
    margin-bottom: 0;
}

.footer-links h3, .footer-contact h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition);
}

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

.footer-contact address {
    font-style: normal;
    color: var(--gray-400);
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact .icon {
    margin-right: 10px;
    flex-shrink: 0;
}

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

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

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

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

.copyright {
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legal-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Адаптивная верстка */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    .posts-grid, .team-grid, .values-grid, .contact-details, .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    header {
        height: auto;
        padding: 15px 0;
    }

    header .container {
        flex-direction: column;
        padding: 0 15px;
    }

    .logo {
        margin-bottom: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 15px;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .countdown-container {
        padding: 15px;
    }

    #countdown {
        flex-wrap: wrap;
    }

    .time-segment {
        margin: 10px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .post-meta {
        flex-direction: column;
        gap: 5px;
    }

    .post-navigation {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .cookie-content {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .posts-grid, .team-grid, .values-grid, .contact-details, .related-grid {
        grid-template-columns: 1fr;
    }

    .time-segment span:first-child {
        font-size: 1.8rem;
        min-width: 50px;
        padding: 8px 10px;
    }

    .post-navigation .post-nav-links {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .social-icons {
        flex-wrap: wrap;
    }
}
