/* ===== style.css - Общие стили для блога Webcam Room ===== */
:root {
    --primary-color: #ff3366;
    --secondary-color: #333333;
    --light-color: #ffffff;
    --dark-color: #222222;
    --gray-color: #f5f5f5;
    --text-color: #333333;
    --text-light: #666666;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

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

/* ===== Header ===== */
header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
}

.nav-menu a {
    font-weight: 600;
    transition: color 0.3s;
}

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

.btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #ff1a52;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.3);
}

/* ===== Hero блога ===== */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color), #ff6699);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.blog-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.blog-hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* ===== Сетка статей ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.blog-image {
    height: 220px;
    overflow: hidden;
}

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

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

.blog-content {
    padding: 25px;
}

.blog-date {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.3;
    font-weight: 700;
}

.blog-title a {
    color: var(--text-color);
    transition: color 0.3s;
}

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

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 15px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 5px;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: margin-left 0.3s;
}

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

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0 60px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
    background: white;
    font-weight: 500;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== Стили для отдельной статьи ===== */
.post-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.post-back {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: 600;
    transition: transform 0.3s;
}

.post-back:hover {
    transform: translateX(-5px);
    text-decoration: underline;
}

.post-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.post-content h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.2;
    font-weight: 700;
}

.post-meta {
    color: var(--text-light);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 15px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-content h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    color: var(--text-color);
    font-weight: 700;
}

.post-content h3 {
    font-size: 22px;
    margin: 30px 0 15px;
    color: var(--text-color);
    font-weight: 600;
}

.post-content p {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 16px;
}

.post-content ul, 
.post-content ol {
    margin: 20px 0 30px 25px;
    color: var(--text-light);
}

.post-content li {
    margin-bottom: 10px;
    line-height: 1.7;
    font-size: 16px;
}

.post-content li::marker {
    color: var(--primary-color);
}

.post-content blockquote {
    background: var(--gray-color);
    padding: 30px;
    border-left: 4px solid var(--primary-color);
    margin: 30px 0;
    font-style: italic;
    border-radius: 10px;
    color: var(--text-color);
    font-size: 18px;
}

.post-content blockquote p {
    margin-bottom: 0;
    color: var(--text-color);
    font-size: 18px;
}

.post-image {
    margin: 40px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.post-image figcaption {
    padding: 15px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    background: var(--gray-color);
}

.post-content .highlight {
    background: rgba(255, 51, 102, 0.1);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border-left: 4px solid var(--primary-color);
}

.post-content .highlight p:last-child {
    margin-bottom: 0;
}

.post-content .highlight strong {
    color: var(--primary-color);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.post-content th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.post-content td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.post-content tr:hover {
    background: var(--gray-color);
}

/* ===== Похожие статьи ===== */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-posts h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--text-color);
    font-weight: 700;
}

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

.related-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border: 1px solid #eee;
    display: block;
    color: inherit;
}

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

.related-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.related-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.related-card .read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.related-card .read-more:hover {
    text-decoration: underline;
}

/* ===== Форма заявки ===== */
.form-section {
    background-color: var(--dark-color);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-top: 60px;
}

.form-section h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 36px;
    font-weight: 700;
}

.form-section p {
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    font-size: 18px;
}

.form-section .btn {
    background-color: white;
    color: var(--primary-color);
    padding: 15px 45px;
    font-size: 18px;
    font-weight: 700;
}

.form-section .btn:hover {
    background-color: var(--gray-color);
}

/* ===== Footer ===== */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 50px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    color: white;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s;
    font-weight: 500;
}

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

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.copyright p {
    margin-bottom: 5px;
}

/* ===== Адаптивность ===== */
@media (max-width: 992px) {
    .blog-hero h1 {
        font-size: 40px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .blog-hero {
        padding: 60px 0;
    }
    
    .blog-hero h1 {
        font-size: 32px;
    }
    
    .blog-hero p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 40px 0;
    }
    
    .post-content {
        padding: 30px 20px;
    }
    
    .post-content h1 {
        font-size: 32px;
    }
    
    .post-content h2 {
        font-size: 24px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .form-section h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 28px;
    }
    
    .post-content h1 {
        font-size: 26px;
    }
    
    .post-content blockquote {
        padding: 20px;
        font-size: 16px;
    }
    
    .post-content blockquote p {
        font-size: 16px;
    }
    
    .form-section h2 {
        font-size: 24px;
    }
    
    .form-section .btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .pagination a {
        padding: 8px 12px;
    }
}

/* ===== Дополнительные утилиты ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* ===== Анимации ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeIn 0.5s ease-out;
}

/* ===== Скроллбар ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff1a52;
}