/* 
  Стили для блога "Краудфандинг и ICO для ИИ проектов"
  Создано: 2024 год
*/

/* ---------- Основные настройки и переменные ---------- */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #f72585;
    --text-color: #333;
    --text-color-light: #666;
    --text-color-lighter: #999;
    --background-color: #fff;
    --light-gray: #f5f5f5;
    --mid-gray: #e0e0e0;
    --dark-gray: #666;
    --border-color: #e0e0e0;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --header-height: 80px;
    --max-width: 1200px;
    --side-padding: 24px;
}

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

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

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

a:hover {
    color: var(--secondary-color);
}

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

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

p {
    margin-bottom: 16px;
}

ul, ol {
    margin: 0 0 20px 20px;
}

/* Кастомные маркеры списков */
ul {
    list-style: none;
}

ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
}

ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

ol {
    counter-reset: item;
    list-style: none;
}

ol li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

ol li::before {
    counter-increment: item;
    content: counter(item);
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    font-weight: 700;
}

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

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

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

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

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

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
}

.nav-links li {
    padding: 0;
}

.nav-links li::before {
    display: none;
}

.nav-links a {
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    border-bottom: 2px solid var(--primary-color);
}

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

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ---------- Секции на главной странице ---------- */
section {
    padding: 60px 0;
}

.blog-posts {
    background-color: var(--light-gray);
}

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

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

.post-image {
    flex: 0 0 100%;
    max-height: 300px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .post-image {
        flex: 0 0 40%;
        max-height: none;
    }
}

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

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

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

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

.post-date {
    color: var(--text-color-lighter);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: block;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

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

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

.btn-tertiary {
    background-color: transparent;
    color: var(--text-color);
}

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

/* ---------- Форма подписки ---------- */
.newsletter {
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
    color: white;
    text-align: center;
}

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

.newsletter p {
    max-width: 600px;
    margin: 0 auto 30px;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 576px) {
    .subscribe-form {
        flex-direction: row;
    }
}

.subscribe-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.subscribe-form button {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--accent-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background-color: #d90166;
}

/* ---------- Футер ---------- */
footer {
    background-color: #1a1a1a;
    color: white;
    padding: 60px 0 30px;
}

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

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

@media (min-width: 992px) {
    .footer-content {
        grid-template-columns: 2fr 1.5fr 1fr 1.5fr;
    }
}

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

.footer-info p {
    color: #aaa;
    font-size: 0.9rem;
}

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

.contact-list {
    list-style: none;
    margin: 0;
}

.contact-list li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
    color: #aaa;
}

.contact-list li::before {
    display: none;
}

.contact-list li i {
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--primary-color);
}

.icon-location::before {
    content: "📍";
}

.icon-phone::before {
    content: "📞";
}

.icon-mail::before {
    content: "📧";
}

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

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

.footer-links li::before {
    display: none;
}

.footer-links a {
    color: #aaa;
    transition: var(--transition);
}

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

.social-icons {
    display: flex;
    gap: 16px;
}

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

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

.copyright {
    margin-top: 40px;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* ---------- Cookie consent ---------- */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 16px;
    z-index: 1000;
    display: none;
}

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 992px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
    }
}

.cookie-content p {
    margin: 0;
    flex: 1;
}

.cookie-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

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

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

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

.post-header h1 {
    font-size: 2.6rem;
    margin-bottom: 16px;
}

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

.post-meta span {
    position: relative;
}

.post-meta span:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -12px;
}

.blog-post .post-image {
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-height: 500px;
}

.blog-post .post-content {
    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.4rem;
    color: var(--primary-color);
}

.post-tags {
    margin: 40px 0;
}

.post-tags h3 {
    margin-bottom: 16px;
}

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

.post-tags li {
    padding: 0;
    margin: 0;
}

.post-tags li::before {
    display: none;
}

.post-tags a {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--light-gray);
    border-radius: 30px;
    color: var(--text-color-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.share-post {
    margin: 40px 0;
}

.share-post h3 {
    margin-bottom: 16px;
}

.social-share {
    display: flex;
    gap: 12px;
}

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

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

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 60px 0;
    gap: 20px;
}

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

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

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

.post-navigation h4 {
    font-size: 1.2rem;
    margin: 0;
    transition: var(--transition);
}

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

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

.related-posts h3 {
    margin-bottom: 24px;
}

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

@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-post {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

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

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

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

/* ---------- Страница "О нас" ---------- */
.about-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.about-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

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

.team-section {
    background-color: var(--light-gray);
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 576px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

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

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

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

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

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

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

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

.about-cta {
    text-align: center;
}

.about-cta h2 {
    margin-bottom: 16px;
}

.about-cta p {
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ---------- Страница контактов ---------- */
.contact-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.contact-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

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

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

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

.contact-details {
    list-style: none;
    margin: 0;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 0;
}

.contact-details li::before {
    display: none;
}

.icon {
    flex: 0 0 40px;
    color: var(--primary-color);
}

.text {
    flex: 1;
}

.text h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

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

.social-contact {
    margin-top: 40px;
}

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

.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: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

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

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

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

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

.contact-form button {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.subscribe-section {
    background-color: var(--light-gray);
}

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

/* Модальное окно благодарности */
.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.5);
    align-items: center;
    justify-content: center;
}

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

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

.thank-you-message h2 {
    margin: 20px 0;
}

.thank-you-message p {
    margin-bottom: 30px;
}

/* ---------- Кейсы (для страницы с кейсами) ---------- */
.case-study {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 40px;
}

.case-details {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.case-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .case-info {
        grid-template-columns: repeat(5, 1fr);
    }
}

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

.label {
    font-size: 0.9rem;
    color: var(--text-color-lighter);
}

.value {
    font-weight: 500;
}

.expert-quote {
    background-color: white;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.expert-quote p {
    font-style: italic;
}

.expert-quote p.author {
    text-align: right;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--primary-color);
    font-style: normal;
}

.recommendations {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 30px 0;
    box-shadow: var(--box-shadow);
}

.recommendations ol {
    margin-bottom: 0;
}

/* Таблицы */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.comparison-table th, .comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table thead {
    background-color: var(--primary-color);
    color: white;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: var(--light-gray);
}

.comparison-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

/* Case example */
.case-example {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--accent-color);
}

.case-example h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.case-example p {
    margin-bottom: 0;
}
