/* 
 * Основные стили для блога о Краудфандинге и ICO для ИИ проектов 
 * 2024
 */

/* ========= ОБЩИЕ СТИЛИ ========= */
:root {
    --primary-color: #3a7bd5;
    --primary-dark: #2c5aa0;
    --secondary-color: #8e44ad;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --light-gray: #f5f7fa;
    --border-color: #e1e4e8;
    --white: #fff;
    --black: #000;
    --success: #2ecc71;
    --warning: #f39c12;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --container-max-width: 1200px;
}

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

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

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

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

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

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

button, .btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

section {
    padding: 80px 0;
}

/* ========= ХЕДЕР ========= */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

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;
    position: relative;
}

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

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

.font-size-control {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.font-size-control button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-control button:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.font-size-control svg {
    width: 20px;
    height: 20px;
}

/* ========= ГЕРОЙ-СЕКЦИЯ ========= */
.hero {
    background-color: #2c3e50;
    background-image: linear-gradient(135deg, #3a7bd5, #8e44ad);
    color: var(--white);
    text-align: center;
    padding: 120px 0;
    position: relative;
}

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

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

.hero .btn {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 12px 30px;
    font-size: 1.1rem;
}

.hero .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
}

/* ========= СЕКЦИЯ ИЗБРАННЫХ ПОСТОВ ========= */
.featured-posts {
    padding: 80px 0;
    background-color: var(--light-gray);
}

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

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

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

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

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

.post-content {
    padding: 20px;
}

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

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

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    padding-right: 20px;
}

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

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

.center-btn {
    text-align: center;
}

/* ========= ВЕСЁЛЫЙ ФАКТ ========= */
.fun-fact {
    background-color: var(--white);
    padding: 60px 0;
}

.fun-fact h2 {
    text-align: center;
    margin-bottom: 30px;
}

.fact-box {
    background-color: #8e44ad;
    background-image: linear-gradient(135deg, #9b59b6, #3498db);
    border-radius: var(--radius-lg);
    padding: 30px;
    color: var(--white);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.fact-box p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* ========= РАССЫЛКА ========= */
.newsletter {
    background-color: var(--light-gray);
    padding: 80px 0;
    text-align: center;
}

.newsletter h2 {
    margin-bottom: 15px;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--text-light);
}

.newsletter form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 1rem;
    outline: none;
}

.newsletter button {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ========= ФУТЕР ========= */
footer {
    background-color: #2c3e50;
    color: var(--white);
    padding: 60px 0 30px;
}

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

.footer-about .footer-logo {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    border-radius: var(--radius-sm);
}

.footer-about p {
    opacity: 0.8;
}

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

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

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

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

.footer-links ul li a:hover {
    color: var(--white);
    margin-left: 5px;
}

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

.footer-contact p {
    opacity: 0.8;
    margin-bottom: 10px;
}

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

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

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

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

.footer-bottom p {
    opacity: 0.7;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ========= COOKIE BANNER ========= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(44, 62, 80, 0.95);
    color: var(--white);
    padding: 15px 0;
    z-index: 1000;
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-content p {
    margin-bottom: 0;
    padding-right: 20px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.cookie-content a {
    color: #3498db;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    align-items: center;
}

.cookie-buttons button {
    margin-left: 10px;
}

/* ========= БЛОГ ========= */
.blog-header {
    background-color: #34495e;
    background-image: linear-gradient(135deg, #3a7bd5, #8e44ad);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.blog-header h1 {
    color: var(--white);
    margin-bottom: 15px;
}

.blog-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.blog-content {
    padding: 80px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

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

.blog-card-image {
    width: 100%;
}

@media (min-width: 768px) {
    .blog-card-image {
        width: 35%;
    }
}

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

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

.blog-card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-card-meta .date {
    margin-right: 15px;
    position: relative;
}

.blog-card-meta .date::after {
    content: '•';
    position: absolute;
    right: -10px;
}

.blog-card-meta .category {
    color: var(--primary-color);
}

.blog-card h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

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

/* ========= О НАС ========= */
.about-header {
    background-color: #34495e;
    background-image: linear-gradient(135deg, #3a7bd5, #8e44ad);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.about-header h1 {
    color: var(--white);
    margin-bottom: 15px;
}

.about-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.about-content {
    padding: 80px 0;
}

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

.about-text h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.about-text h2:first-child {
    margin-top: 0;
}

.values-list {
    list-style-type: none;
    padding-left: 0;
}

.values-list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 15px;
}

.values-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.team-section {
    background-color: var(--light-gray);
    padding: 80px 0;
}

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

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

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

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

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

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

.team-member p {
    padding: 0 20px;
    margin-bottom: 10px;
    color: var(--text-light);
}

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

.team-member .social-icons {
    margin: 15px 0 20px;
}

.team-member .social-icons a {
    background-color: var(--light-gray);
    color: var(--primary-color);
    width: 35px;
    height: 35px;
}

/* ========= КОНТАКТЫ ========= */
.contact-header {
    background-color: #34495e;
    background-image: linear-gradient(135deg, #3a7bd5, #8e44ad);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.contact-header h1 {
    color: var(--white);
    margin-bottom: 15px;
}

.contact-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
    }
}

.contact-info h2 {
    margin-bottom: 30px;
}

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

.contact-item .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(58, 123, 213, 0.1);
    border-radius: 50%;
    margin-right: 15px;
    color: var(--primary-color);
}

.contact-item .details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

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

.social-heading {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-social {
    justify-content: flex-start;
}

.contact-social a {
    margin-left: 0;
    margin-right: 15px;
    background-color: rgba(58, 123, 213, 0.1);
    color: var(--primary-color);
}

.contact-form h2 {
    margin-bottom: 30px;
}

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

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

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

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.1);
}

.map-section {
    padding-top: 0;
    padding-bottom: 80px;
}

.map-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

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

/* ========= МОДАЛЬНОЕ ОКНО ========= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

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

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

.modal-close:hover {
    color: var(--accent-color);
}

.modal h2 {
    color: var(--success);
    margin-bottom: 15px;
}

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

.modal-btn {
    padding: 10px 30px;
}

/* ========= ПОСТ ========= */
.post-main {
    margin-top: 0;
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 0;
}

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

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

.post-date {
    margin-right: 15px;
    position: relative;
}

.post-date::after {
    content: '•';
    position: absolute;
    right: -10px;
}

.post-category {
    color: var(--primary-color);
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

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

.post-featured-image img {
    width: 100%;
    height: auto;
}

.post-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

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

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

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

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags span {
    font-weight: 500;
    margin-right: 10px;
}

.post-tags a {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    background-color: var(--light-gray);
    color: var(--text-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

.post-share {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.post-share span {
    font-weight: 500;
    margin-right: 15px;
}

.post-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: var(--light-gray);
    color: var(--text-color);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

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

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

.post-nav-prev,
.post-nav-next {
    max-width: 48%;
}

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

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

.post-nav-title {
    font-weight: 500;
    color: var(--text-color);
}

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

.related-posts {
    background-color: var(--light-gray);
    padding: 80px 0;
}

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

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

.related-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

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

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

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

.related-card .read-more {
    display: inline-block;
    margin-bottom: 20px;
}

/* ========= АДАПТИВНОСТЬ ========= */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .hero {
        padding: 100px 0;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    section {
        padding: 60px 0;
    }
    .post-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    .logo {
        margin-bottom: 15px;
    }
    nav ul li {
        margin-left: 15px;
    }
    .hero {
        padding: 80px 0;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .newsletter form {
        flex-direction: column;
    }
    .newsletter input {
        border-radius: var(--radius-md);
        border-right: 1px solid var(--border-color);
        margin-bottom: 10px;
    }
    .newsletter button {
        border-radius: var(--radius-md);
    }
    .cookie-content {
        flex-direction: column;
    }
    .cookie-content p {
        margin-bottom: 15px;
        padding-right: 0;
    }
    .post-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    nav ul li {
        margin: 0 10px 10px;
    }
    .hero {
        padding: 60px 0;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .post-navigation {
        flex-direction: column;
    }
    .post-nav-prev, .post-nav-next {
        max-width: 100%;
        margin-bottom: 15px;
    }
    .post-nav-next {
        text-align: left;
    }
    .contact-grid {
        gap: 30px;
    }
    .team-grid {
        grid-template-columns: 1fr;
    }
}
