/* Blog Styles - Modern Redesign */
.blog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.blog-header::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 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.blog-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.blog-header p {
    font-size: 1.4rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

.blog-posts {
    padding: 80px 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    min-height: 60vh;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.blog-image {
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    position: relative;
}

.blog-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card:hover .blog-image::after {
    opacity: 1;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.blog-content {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.blog-meta {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.blog-date {
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    background: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.blog-date i {
    color: var(--primary-color);
    font-size: 1rem;
}

.blog-title {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    color: #1a1a1a;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 5rem;
    transition: color 0.3s ease;
}

.blog-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.blog-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-excerpt {
    color: #666;
    line-height: 2;
    margin-bottom: 1.8rem;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-top: auto;
    padding: 0.8rem 0;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

.read-more:hover {
    gap: 15px;
    color: var(--accent-color);
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(-6px);
}

.no-posts {
    text-align: center;
    padding: 100px 20px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

.no-posts i {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    opacity: 0.3;
}

.no-posts h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.no-posts p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Blog Single Page - Modern Redesign */
.blog-single {
    padding: 100px 0 80px;
    margin-top: 70px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    min-height: 80vh;
}

.blog-single-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e8e8e8;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
}

.back-link:hover {
    gap: 15px;
    color: var(--accent-color);
    background: var(--secondary-color);
    transform: translateX(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.blog-single-title-wrapper {
    margin-bottom: 2rem;
}

.blog-single-title {
    font-size: 3.2rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -1px;
}

.blog-meta-single {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 1rem;
}

.blog-meta-single .blog-date {
    background: var(--secondary-color);
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}

.blog-single-image {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    border-radius: 24px;
    margin-bottom: 3rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    position: relative;
}

.blog-single-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.05) 100%);
}

.blog-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-single-content {
    font-size: 1.2rem;
    line-height: 2.4;
    color: #2c2c2c;
    padding: 3rem;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    max-width: 1000px;
    margin: 0 auto;
}

.blog-single-content p {
    margin-bottom: 2rem;
    text-align: justify;
}

.blog-single-content h2,
.blog-single-content h3 {
    color: #1a1a1a;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.blog-single-content h2 {
    font-size: 2.2rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
}

.blog-single-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.blog-single-content ul,
.blog-single-content ol {
    margin: 2rem 0;
    padding-right: 2.5rem;
}

.blog-single-content li {
    margin-bottom: 1rem;
    line-height: 2;
}

.blog-single-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 16px;
    margin: 2.5rem auto !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: block;
    width: 100%;
    object-fit: contain;
}

.blog-single-content figure {
    margin: 2.5rem 0;
    text-align: center;
}

.blog-single-content figure img {
    margin: 0 auto;
}

.blog-single-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    font-weight: 600;
}

.blog-single-content a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    padding-bottom: 2px;
}

.blog-single-content blockquote {
    border-right: 4px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    background: var(--secondary-color);
    border-radius: 12px;
    font-style: italic;
    color: #555;
}

.blog-single-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.blog-single-content pre {
    background: #1a1a1a;
    color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-single-content pre code {
    background: transparent;
    color: #fff;
    padding: 0;
}

.content-image-wrapper {
    margin: 2.5rem 0;
    text-align: center;
    width: 100%;
}

.content-image-wrapper img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: block;
    margin: 0 auto !important;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 968px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .blog-single-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 100px 0 60px;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-header p {
        font-size: 1.1rem;
    }
    
    .blog-posts {
        padding: 60px 0;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    
    .blog-card {
        border-radius: 20px;
    }
    
    .blog-image {
        height: 250px;
    }
    
    .blog-content {
        padding: 2rem;
    }
    
    .blog-title {
        font-size: 1.5rem;
        min-height: auto;
    }
    
    .blog-excerpt {
        font-size: 0.95rem;
    }
    
    .blog-single {
        padding: 80px 0 50px;
    }
    
    .blog-single-title-wrapper {
        padding: 0 15px;
    }
    
    .blog-single-title {
        font-size: 2.2rem;
    }
    
    .blog-single-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 15px;
        margin-bottom: 2rem;
    }
    
    .blog-single-image {
        border-radius: 20px;
        margin: 0 15px 2rem;
    }
    
    .blog-single-content {
        padding: 2rem 1.5rem;
        margin: 0 15px;
        border-radius: 20px;
        font-size: 1.1rem;
        line-height: 2.2;
    }
    
    .blog-single-content img {
        border-radius: 12px;
        margin: 1.5rem 0;
    }
    
    .blog-single-content h2 {
        font-size: 1.8rem;
    }
    
    .blog-single-content h3 {
        font-size: 1.5rem;
    }
    
    .back-link {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .posts-grid {
        gap: 20px;
    }
    
    .blog-image {
        height: 220px;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-title {
        font-size: 1.3rem;
    }
    
    .blog-excerpt {
        font-size: 0.9rem;
    }
    
    .blog-single-title {
        font-size: 1.8rem;
    }
    
    .blog-single-title-wrapper {
        padding: 0 15px;
    }
    
    .blog-single-content {
        padding: 1.5rem;
        font-size: 1rem;
        line-height: 2;
    }
    
    .blog-single-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-single-content h3 {
        font-size: 1.3rem;
    }
}
