/* Исправляем стили кнопки в header */
.header-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    color: white !important;
    border-radius: 25px !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3) !important;
}

.header-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4) !important;
}

/* Single Post Hero Section */
.single-hero {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.single-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Контейнер hero - центрируем как основной контент */
.single-hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Обертка для контента hero */
.single-hero .hero-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Post Meta */
.single-hero .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.95;
}

.single-hero .post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.single-hero .post-meta span:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.single-hero .post-meta i {
    font-size: 0.85rem;
    opacity: 0.9;
}

.single-hero .post-category a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.single-hero .post-category a:hover {
    opacity: 0.8;
}

/* Post Title */
.single-hero .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Single Post Main Section */
.single-main {
    padding: 4rem 0;
    background: #f8f9fa;
}

.single-main .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

/* Single Content */
.single-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.single-article {
    padding: 3rem;
}

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

.post-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-content {
    line-height: 1.8;
    color: #2c3e50;
    font-size: 1.05rem;
}

/* Content Styling */
.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4, 
.post-content h5, 
.post-content h6 {
    color: #2c3e50;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { 
    font-size: 1.75rem; 
    border-bottom: 2px solid #e9ecef; 
    padding-bottom: 0.5rem; 
    margin-top: 3rem;
}
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }
.post-content h5 { font-size: 1.1rem; }
.post-content h6 { font-size: 1rem; }

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

.post-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.post-content a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* Lists */
.post-content ul, 
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.post-content ul li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 2rem;
    list-style: none;
}

.post-content ul li::before {
    content: '▸';
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.post-content ol {
    counter-reset: item;
}

.post-content ol li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 2.5rem;
    list-style: none;
    counter-increment: item;
}

.post-content ol li::before {
    content: counter(item) '.';
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.1rem;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.post-content th, 
.post-content td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.post-content th {
    background: #3498db;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.post-content tr:nth-child(even) {
    background: #f8f9fa;
}

.post-content tr:hover {
    background: #e9ecef;
}

/* Blockquotes */
.post-content blockquote {
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-left: 4px solid #3498db;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    position: relative;
    color: #555;
    line-height: 1.7;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.post-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #3498db;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Code */
.post-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
    border: 1px solid #e9ecef;
}

.post-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.post-content pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    display: block;
}

.post-content .wp-caption {
    max-width: 100%;
    margin: 2rem 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

.post-content .wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.8rem;
    font-style: italic;
}

/* Post Tags */
.post-tags {
    padding: 2rem 3rem;
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
    margin-top: 3rem;
}

.post-tags h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

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

.tag-item {
    background: #3498db;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.tag-item:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* Post Navigation */
.post-navigation {
    padding: 2rem 3rem;
    background: white;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.post-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.post-navigation a:hover {
    background: #f8f9fa;
    color: #2980b9;
}

.nav-previous a:hover {
    transform: translateX(-3px);
}

.nav-next a:hover {
    transform: translateX(3px);
}

/* Sidebar */
.single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 2rem;
}

.sidebar-widget {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    font-weight: 600;
}

.sidebar-widget h3 i {
    color: #3498db;
    font-size: 1.2rem;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget ul li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e9ecef;
}

.sidebar-widget ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget ul li a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sidebar-widget ul li a:hover {
    color: #3498db;
}

/* Popular Posts */
.popular-posts .post-views {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

.popular-posts .post-views i {
    color: #3498db;
}

/* Contact CTA */
.contact-cta {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    text-align: center;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.contact-cta h3 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.contact-cta h3 i {
    color: white;
}

.contact-cta p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.contact-cta .cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.contact-cta .btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* Переопределяем стили кнопки только для sidebar */
.contact-cta .btn-primary {
    background: white !important;
    color: #3498db !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.contact-cta .btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.contact-cta .btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.contact-cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .single-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .single-sidebar {
        position: static;
        top: auto;
    }
    
    .single-hero .post-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .single-hero {
        padding: 2rem 0;
    }
    
    .single-hero .container {
        padding: 0 1.5rem;
    }
    
    .single-hero .post-title {
        font-size: 1.75rem;
    }
    
    .single-hero .post-meta {
        gap: 0.8rem;
    }
    
    .single-hero .post-meta span {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .single-article {
        padding: 2rem;
    }
    
    .post-tags,
    .post-navigation {
        padding: 1.5rem 2rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .single-main {
        padding: 3rem 0;
    }
    
    .single-main .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .single-hero {
        padding: 1.5rem 0;
    }
    
    .single-hero .container {
        padding: 0 1rem;
    }
    
    .single-hero .post-title {
        font-size: 1.5rem;
    }
    
    .single-hero .post-meta {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .single-hero .post-meta span {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .single-article {
        padding: 1.5rem;
    }
    
    .post-tags,
    .post-navigation {
        padding: 1.2rem 1.5rem;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
    }
}