/* Основные стили для блога Private Capital Preservation Partners */

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

:root {
    /* Основные цвета */
    --primary-color: #1e3a8a;
    --secondary-color: #4f6bbd;
    --accent-color: #c3a86a;
    --text-color: #333333;
    --text-light: #666666;
    --background-color: #ffffff;
    --background-light: #f8f9fa;
    --background-dark: #1a2942;
    --border-color: #e0e0e0;
    
    /* Семантические цвета */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Размеры шрифтов */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.875rem;
    --font-size-3xl: 2.25rem;
    --font-size-4xl: 3rem;
    
    /* Шрифты */
    --font-family-base: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-family-heading: 'Playfair Display', Georgia, serif;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: var(--font-size-2xl);
    margin-top: 2rem;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: var(--font-size-xl);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.2rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

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

button {
    cursor: pointer;
}

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

/* Шапка сайта */
header {
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

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

.logo img {
    max-height: 60px;
    width: auto;
}

/* Навигация */
nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav a {
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: rgba(30, 58, 138, 0.1);
}

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

/* Главная секция героя */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 4rem 0;
    background-color: var(--background-light);
    border-radius: 8px;
    margin: 2rem 0;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-content p {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Кнопки */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #152c69;
    color: white;
}

.btn-secondary {
    background-color: var(--accent-color);
    color: white;
    border: none;
}

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

/* Секция блога */
.blog-posts {
    padding: 3rem 0;
}

.blog-posts h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.post-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.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 {
    padding: 1.5rem;
}

.post-content h3 {
    font-size: var(--font-size-lg);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.post-date {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-overview {
    background-color: var(--background-light);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.post-overview h4 {
    font-size: var(--font-size-sm);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.post-overview ul {
    font-size: var(--font-size-sm);
    margin-bottom: 0;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Счетчик просмотров */
.view-counter {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* CTA секция */
.cta-section {
    background-color: var(--background-dark);
    color: white;
    padding: 4rem 0;
    margin: 3rem 0;
    border-radius: 8px;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--background-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-logo {
    max-width: 120px;
    margin-bottom: 1rem;
}

.footer-info p,
.footer-contact p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact h3,
.footer-links h3,
.footer-social h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: var(--font-size-md);
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

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

.social-icons {
    display: flex;
    gap: 1rem;
}

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

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

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
}

/* Страница О нас */
.about-hero {
    background-color: var(--background-light);
    padding: 4rem 0;
    text-align: center;
    margin: 2rem 0;
    border-radius: 8px;
}

.about-hero h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
}

.about-hero p {
    font-size: var(--font-size-lg);
    max-width: 700px;
    margin: 0 auto;
}

.about-story {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 4rem 0;
}

.about-story-content {
    flex: 1.5;
}

.about-story-image {
    flex: 1;
}

.about-story-image img {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-mission {
    margin: 4rem 0;
}

.mission-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.mission-card {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.mission-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--primary-color);
}

.team-section {
    margin: 4rem 0;
}

.team-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: var(--font-size-lg);
}

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

.team-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

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

.team-card h3, .team-card p {
    padding: 0 1.5rem;
    margin: 1rem 0;
}

.team-card h3 {
    font-size: var(--font-size-lg);
    margin-bottom: 0.25rem;
}

.team-card p:nth-child(3) {
    color: var(--text-light);
    font-style: italic;
    margin-top: 0;
}

.team-social {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem 1.5rem;
}

.team-social a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--background-light);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

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

/* Страница контактов */
.contact-hero {
    background-color: var(--background-light);
    padding: 4rem 0;
    text-align: center;
    margin: 2rem 0;
    border-radius: 8px;
}

.contact-hero h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
}

.contact-hero p {
    font-size: var(--font-size-lg);
    max-width: 700px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.contact-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--primary-color);
}

.contact-form-section {
    margin: 4rem 0;
}

.contact-form-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.contact-form-content {
    flex: 1.5;
}

.contact-image {
    flex: 1;
    display: none;
}

.contact-image img {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-form {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

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

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

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

.checkbox-group input {
    width: auto;
    margin-top: 0.25rem;
}

.checkbox-group label {
    margin-bottom: 0;
}

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

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

.map-container {
    width: 100%;
    height: 400px;
    background-color: var(--background-light);
    border-radius: 8px;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
}

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

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.thank-you-content {
    text-align: center;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--success-color);
}

.thank-you-content h3 {
    margin-bottom: 1rem;
}

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

.close-btn {
    margin-top: 1rem;
}

/* Страница блога / Отдельный пост */
.blog-post {
    max-width: 800px;
    margin: 3rem auto;
}

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.post-meta div {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-overview-box {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.post-overview-box h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.post-overview-box ul {
    margin-bottom: 0;
}

.post-featured-image {
    margin-bottom: 2rem;
}

.post-featured-image img {
    width: 100%;
    border-radius: 8px;
}

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

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

.post-content h4 {
    font-size: var(--font-size-md);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-tags {
    margin-top: 3rem;
}

.post-tags h3 {
    font-size: var(--font-size-md);
    margin-bottom: 0.75rem;
}

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

.tags span {
    background-color: var(--background-light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

.post-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-share h3 {
    font-size: var(--font-size-md);
    margin-bottom: 0.75rem;
}

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

.share-buttons a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: var(--background-light);
    color: var(--text-color);
    font-size: var(--font-size-sm);
    transition: all 0.3s ease;
}

.share-buttons a:hover {
    background-color: var(--secondary-color);
    color: white;
}

.related-posts {
    margin: 4rem 0;
}

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

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

.related-post-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
}

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

.related-post-card h3 {
    font-size: var(--font-size-md);
    padding: 0 1.5rem;
    margin: 1rem 0 0.5rem;
}

.related-post-card .post-date {
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.related-post-card .read-more {
    display: inline-block;
    padding: 0 1.5rem 1.5rem;
    margin-top: 0.5rem;
}

/* Cookie уведомление */
.cookie-notice {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: var(--background-dark);
    color: white;
    padding: 1.5rem;
    z-index: 1050;
    transition: bottom 0.5s ease;
}

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

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cookie-accept {
    background-color: var(--success-color);
    color: white;
    border: none;
}

.cookie-accept:hover {
    background-color: #218838;
}

.cookie-settings {
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

.cookie-settings:hover {
    background-color: #3f57a1;
}

.cookie-decline {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-decline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cookie-policy {
    font-size: var(--font-size-sm);
    margin-bottom: 0;
}

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

/* Медиа-запросы */
@media (max-width: 991px) {
    .hero {
        flex-direction: column;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .about-story {
        flex-direction: column;
    }
    
    .contact-form-container {
        flex-direction: column;
    }
    
    .contact-image {
        display: block;
        margin-top: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .post-grid,
    .team-grid,
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr 1fr;
    }
    
    .cookie-content {
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: var(--font-size-2xl);
    }
    
    h2 {
        font-size: var(--font-size-xl);
    }
    
    .hero-content h1 {
        font-size: var(--font-size-3xl);
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .mission-container {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

/* Добавление анимаций */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero,
.post-card,
.team-card,
.mission-card,
.contact-card {
    animation: fadeIn 0.8s ease-out;
}

.post-card:nth-child(2),
.team-card:nth-child(2),
.mission-card:nth-child(2),
.contact-card:nth-child(2) {
    animation-delay: 0.2s;
}

.post-card:nth-child(3),
.team-card:nth-child(3),
.mission-card:nth-child(3),
.contact-card:nth-child(3) {
    animation-delay: 0.4s;
}

.post-card:nth-child(4),
.team-card:nth-child(4),
.contact-card:nth-child(4) {
    animation-delay: 0.6s;
}

.post-card:nth-child(5),
.team-card:nth-child(5) {
    animation-delay: 0.8s;
}

.post-card:nth-child(6) {
    animation-delay: 1s;
}

/* Общие улучшения */
::selection {
    background-color: var(--primary-color);
    color: white;
}

html {
    scroll-behavior: smooth;
}

/* Повышение контраста для доступности */
.post-date,
.view-counter,
.text-light {
    color: #555555;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
}

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