/* 
 * Стили для блога "ИИ и интеллектуальная собственность"
 * Современный дизайн с акцентом на удобство чтения и навигации
 * 2024
 */

/* ======= ОБЩИЕ СТИЛИ ======= */
:root {
    --primary-color: #4056a1;
    --primary-light: #6b7fd7;
    --primary-dark: #2c3e7a;
    --secondary-color: #f13c20;
    --accent-color: #c5cbe3;
    --light-color: #f5f5f5;
    --dark-color: #333;
    --text-color: #2d2d2d;
    --text-light: #6c6c6c;
    --border-color: #e0e0e0;
    --success-color: #5cb85c;
    --info-color: #5bc0de;
    --warning-color: #f0ad4e;
    --danger-color: #d9534f;
    
    --border-radius: 6px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    
    --font-main: 'Roboto', 'Arial', sans-serif;
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-mono: 'Roboto Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

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

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

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    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(--accent-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #b6bdd6;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--dark-color);
}

p {
    margin-bottom: 20px;
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    font-style: italic;
    margin: 20px 0;
}

blockquote cite {
    display: block;
    font-size: 0.9em;
    margin-top: 10px;
    opacity: 0.8;
    font-style: normal;
}

.section-title {
    position: relative;
    margin-bottom: 40px;
    text-align: center;
    font-size: 2.2rem;
}

.section-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 20px auto 0;
}

/* ======= ХЕДЕР ======= */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

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

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

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

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

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

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);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    color: var(--text-color);
}

/* ======= ГЛАВНАЯ СТРАНИЦА ======= */
.hero {
    background-color: var(--accent-color);
    padding: 80px 0;
    margin-bottom: 60px;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

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

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

main {
    padding: 60px 0;
    display: flex;
    flex-wrap: wrap;
}

.posts {
    flex: 1;
    min-width: 0; /* Fix for flexbox items not respecting their container's width */
}

.sidebar {
    width: 320px;
    margin-left: 40px;
}

.post-preview {
    display: flex;
    margin-bottom: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    background-color: white;
}

.post-image {
    flex: 0 0 300px;
}

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

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

.post-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

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

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

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

.post-meta .date {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.post-meta .author {
    display: flex;
    align-items: center;
}

.post-meta .date:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c6c6c'%3E%3Cpath d='M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z'/%3E%3C/svg%3E");
    background-size: cover;
}

.post-meta .author:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c6c6c'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-size: cover;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

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

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

.read-more:hover:after {
    margin-left: 8px;
}

/* ======= ВИДЖЕТЫ САЙДБАРА ======= */
.widget {
    background-color: white;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.widget h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.widget.tip-of-day {
    background-color: #f5f7ff;
    border-left: 4px solid var(--primary-color);
}

.widget.quote-from-future {
    background-color: #fff7f5;
    border-left: 4px solid var(--secondary-color);
}

.widget.quote-from-future blockquote {
    border-left: none;
    padding-left: 0;
    font-size: 1.1rem;
}

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

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
}

.subscribe-form input {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    font-family: var(--font-main);
    font-size: 1rem;
}

.subscribe-form button {
    width: 100%;
}

/* ======= ФУТЕР ======= */
footer {
    background-color: #2d2d2d;
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
}

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

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col p {
    opacity: 0.8;
    margin-bottom: 15px;
}

.registration {
    font-size: 0.9rem;
    opacity: 0.6;
}

footer address {
    font-style: normal;
    opacity: 0.8;
}

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

footer address svg {
    margin-right: 10px;
}

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

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

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

footer .social-links svg {
    width: 20px;
    height: 20px;
}

footer .subscribe-form input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-links a {
    color: white;
    opacity: 0.8;
    margin: 0 15px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* ======= УВЕДОМЛЕНИЕ О COOKIES ======= */
.cookie-consent {
    position: fixed;
    left: 20px;
    bottom: 20px;
    max-width: 400px;
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}

.cookie-consent p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

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

.cookie-buttons button {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* ======= СТРАНИЦА О НАС ======= */
.about-section {
    margin-bottom: 60px;
}

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

.about-image {
    flex: 0 0 400px;
}

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

.about-text {
    flex: 1;
}

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

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

.team-member {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

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

.team-member h3 {
    padding: 20px 20px 5px;
    margin-bottom: 5px;
    font-size: 1.3rem;
}

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

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

.team-member .social-links {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
}

.team-member .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: var(--accent-color);
    border-radius: 50%;
    color: var(--primary-color);
}

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

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

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

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

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

.value-icon {
    width: 70px;
    height: 70px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.value-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* ======= СТРАНИЦА КОНТАКТОВ ======= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    margin-bottom: 25px;
}

.contact-icon {
    flex: 0 0 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-right: 20px;
}

.contact-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-form-container {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
}

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

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

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

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

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

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

.checkbox-group label {
    font-weight: normal;
    font-size: 0.9rem;
}

.form-submit {
    margin-top: 10px;
}

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

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

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

.social-contact {
    margin-top: auto;
}

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

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

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

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

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

.modal h2 {
    margin-bottom: 10px;
}

.modal p {
    margin-bottom: 20px;
}

.modal-btn {
    min-width: 120px;
}

/* ======= СТРАНИЦА ОТДЕЛЬНОГО ПОСТА ======= */
.post-single {
    flex: 1;
    min-width: 0;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

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

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.featured-image {
    margin: 0 -30px 30px;
}

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

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

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

.post-content img {
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.post-content blockquote {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
}

.share-post {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.share-post h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.share-post .social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

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

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

.author-box {
    display: flex;
    margin-top: 40px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.author-image {
    flex: 0 0 100px;
    margin-right: 20px;
}

.author-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

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

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

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post img {
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    transition: var(--transition);
}

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

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

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

.nav-previous,
.nav-next {
    max-width: 45%;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.post-navigation span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.post-navigation h4 {
    font-size: 1.1rem;
    margin: 0;
}

.post-navigation a:hover h4 {
    color: var(--primary-color);
}

/* ======= АДАПТИВНЫЙ ДИЗАЙН ======= */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
}

@media (max-width: 992px) {
    main {
        flex-direction: column;
        padding: 40px 0;
    }
    
    .sidebar {
        width: 100%;
        margin-left: 0;
        margin-top: 40px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 15px;
    }
    
    nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .post-preview {
        flex-direction: column;
    }
    
    .post-image {
        flex: none;
        height: 200px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo img {
        width: 40px;
        height: 40px;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-previous,
    .nav-next {
        max-width: 100%;
    }
    
    .post-single {
        padding: 20px;
    }
    
    .featured-image {
        margin: 0 -20px 20px;
    }
    
    .cookie-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
}

/* ======= АНИМАЦИИ ======= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}
