/* ========================================
   BLOG STYLES - azimutprint
   Использует существующие переменные из styles.css
======================================== */

/* Variables (fallback if not loaded from main CSS) */
:root {
    --primary: #e62929;
    --primary-dark: #7a0c0c;
    --primary-light: #c01515;
    --dark: #1e293b;
    --text: #334155;
    --text-light: #475569;
    --border: #e2e8f0;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ========================================
   BLOG HERO
======================================== */
.blog-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8ecf1 100%);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 41, 41, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.blog-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.blog-subtitle {
    font-size: 20px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   BREADCRUMBS (blog pages)
======================================== */
.blog-hero .breadcrumbs,
.article-hero .breadcrumbs {
    margin-bottom: 24px;
    justify-content: flex-start;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-light);
}

.breadcrumbs .separator {
    color: var(--text-light);
    margin: 0 4px;
}

/* ========================================
   SECTION TITLES
======================================== */
.section-title-small {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 32px;
    text-align: center;
}

/* ========================================
   FEATURED ARTICLES
======================================== */
.blog-featured {
    padding: 60px 0;
    background: var(--bg);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.featured-card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px var(--shadow-lg);
}

.featured-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

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

.featured-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.featured-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.3;
}

.featured-content p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
    transition: gap 0.3s ease;
}

.featured-card:hover .read-more {
    gap: 12px;
}

/* ========================================
   ARTICLE CATEGORY BADGE
======================================== */
.article-category {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
}

/* ========================================
   ARTICLE META
======================================== */
.article-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: var(--primary);
    font-size: 12px;
}

.article-meta-large {
    display: flex;
    gap: 24px;
    font-size: 15px;
    color: var(--text-light);
    margin-top: 20px;
    flex-wrap: wrap;
}

.article-meta-large span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta-large i {
    color: var(--primary);
}

/* ========================================
   BLOG SECTION & FILTERS
======================================== */
.blog-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

.blog-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.blog-filters .filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: 24px;
    background: var(--bg);
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.blog-filters .filter-btn:hover,
.blog-filters .filter-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* ========================================
   BLOG GRID
======================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-lg);
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-content p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   BLOG CTA
======================================== */
.blog-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dark) 0%, #0f172a 100%);
}

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

.cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

/* ========================================
   ARTICLE PAGE
======================================== */
.article-hero {
    padding: 120px 0 40px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8ecf1 100%);
}

.article-header {
    max-width: 800px;
}

.article-header .article-category {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 0;
}

.article-hero-image {
    margin: 40px auto 0;
    border-radius: 16px;
    overflow: hidden;
    max-width: 1000px;
}

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

/* ========================================
   ARTICLE CONTENT
======================================== */
.article-content {
    padding: 60px 0;
    background: var(--bg);
}

.article-body {
    max-width: 760px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
}

.article-body p {
    margin-bottom: 24px;
}

.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin: 48px 0 20px;
    line-height: 1.3;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body ul,
.article-body ol {
    margin: 24px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 12px;
    position: relative;
}

.article-body ul li::marker {
    color: var(--primary);
}

.article-body blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text);
}

.article-body figure {
    margin: 32px 0;
}

.article-body figure img {
    width: 100%;
    border-radius: 12px;
}

.article-body figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 12px;
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

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

/* ========================================
   SHARE BUTTONS
======================================== */
.article-share {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.article-share span {
    font-weight: 600;
    color: var(--dark);
}

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

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.vk {
    background: #4a76a8;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.copy {
    background: var(--text-light);
}

/* ========================================
   RELATED ARTICLES
======================================== */
.related-articles {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

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

.back-to-blog {
    text-align: center;
}

/* ========================================
   ERROR MESSAGE
======================================== */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 18px;
}

/* ========================================
   RESPONSIVE - Tablets
======================================== */
@media (max-width: 1024px) {
    .blog-title {
        font-size: 40px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .featured-card {
        flex-direction: row;
    }
    
    .featured-image {
        width: 40%;
        min-width: 280px;
        height: auto;
        min-height: 240px;
    }
    
    .featured-content {
        width: 60%;
    }
    
    .article-header h1 {
        font-size: 36px;
    }
}

/* ========================================
   RESPONSIVE - Mobile
======================================== */
@media (max-width: 768px) {
    .blog-hero {
        padding: 100px 0 40px;
    }
    
    .blog-title {
        font-size: 32px;
    }
    
    .blog-subtitle {
        font-size: 16px;
    }
    
    .section-title-small {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .blog-featured {
        padding: 40px 0;
    }
    
    .featured-card {
        flex-direction: column;
    }
    
    .featured-image {
        width: 100%;
        height: 200px;
        min-width: auto;
    }
    
    .featured-content {
        width: 100%;
        padding: 20px;
    }
    
    .featured-content h3 {
        font-size: 20px;
    }
    
    .blog-section {
        padding: 40px 0 60px;
    }
    
    .blog-filters {
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .blog-filters .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-content h3 {
        font-size: 16px;
    }
    
    .blog-cta {
        padding: 60px 0;
    }
    
    .cta-content h2 {
        font-size: 28px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    /* Article Page */
    .article-hero {
        padding: 90px 0 30px;
    }
    
    .article-header h1 {
        font-size: 28px;
    }
    
    .article-meta-large {
        gap: 16px;
        font-size: 14px;
    }
    
    .article-hero-image {
        margin-top: 24px;
        max-height: 300px;
    }
    
    .article-content {
        padding: 40px 0;
    }
    
    .article-body {
        font-size: 16px;
    }
    
    .article-body h2 {
        font-size: 24px;
        margin: 36px 0 16px;
    }
    
    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 36px;
        padding-top: 24px;
    }
    
    .related-articles {
        padding: 40px 0 60px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========================================
   RESPONSIVE - Small Mobile
======================================== */
@media (max-width: 480px) {
    .blog-hero {
        padding: 90px 0 30px;
    }
    
    .blog-title {
        font-size: 26px;
    }
    
    .blog-subtitle {
        font-size: 14px;
    }
    
    .featured-content h3 {
        font-size: 18px;
    }
    
    .featured-content p {
        font-size: 14px;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .article-header h1 {
        font-size: 24px;
    }
    
    .article-body {
        font-size: 15px;
    }
    
    .article-body h2 {
        font-size: 22px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .cta-content p {
        font-size: 15px;
    }
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card,
.featured-card {
    animation: fadeIn 0.4s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-card:nth-child(6) { animation-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .featured-card {
        animation: none;
    }
    
    .blog-card:hover,
    .featured-card:hover {
        transform: none;
    }
    
    .blog-card-image img,
    .featured-image img {
        transition: none;
    }
}

