/* ===== Blog Styles ===== */

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,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;
    opacity: 0.1;
}

.blog-header-title {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.blog-header-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

/* Search Section */
.search-section {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 100%;
}

.search-form .input-group {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 50px;
    overflow: hidden;
    max-width: 100%;
}

.search-form .form-control {
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.search-form .btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 0 50px 50px 0;
}

/* Featured Post */
.featured-post {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    max-width: 100%;
}

.featured-post:hover {
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.featured-post-image {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    width: 100%;
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    color: #1a472a;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.featured-post-content {
    padding: 3rem;
}

.post-category {
    display: inline-block;
    background: linear-gradient(135deg, #1a472a, #2d5a3d);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.featured-post-excerpt {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    color: #888;
    font-size: 0.95rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    max-width: 100%;
    word-wrap: break-word;
}

.sidebar-widget:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #d4af37;
    position: relative;
    word-wrap: break-word;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 60px;
    height: 3px;
    background: #1a472a;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.category-list a:hover,
.category-list li.active a {
    background: linear-gradient(135deg, #1a472a, #2d5a3d);
    color: white;
    padding-right: 1.5rem;
    box-shadow: 0 5px 15px rgba(26, 71, 42, 0.2);
}

.category-list .count {
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-list a:hover .count,
.category-list li.active a .count {
    background: rgba(255,255,255,0.3);
}

/* Recent Posts */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.recent-posts-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    max-width: 100%;
}

.recent-post-item:hover {
    transform: translateX(-5px);
}

.recent-post-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-content h6 {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.recent-post-content small {
    color: #888;
    font-size: 0.85rem;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.blog-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transform: translateY(-10px);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    width: 100%;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    max-width: 100%;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.post-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #1a472a, #2d5a3d);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.blog-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: #1a472a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #d4af37;
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: #888;
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a472a;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    color: #d4af37;
    gap: 1rem;
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    color: #1a472a;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.7rem 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #1a472a, #2d5a3d);
    color: white;
    border-color: #1a472a;
    transform: translateY(-2px);
}

/* Load More Button */
#load-more-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(26, 71, 42, 0.2);
    transition: all 0.3s ease;
}

#load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(26, 71, 42, 0.3);
}

/* Responsive */
@media (max-width: 991px) {
    .featured-post-image {
        height: 300px;
    }
    
    .featured-post-content {
        padding: 2rem;
    }
    
    .featured-post-title {
        font-size: 1.5rem;
    }
    
    .blog-header-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 100px 0 60px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .blog-card-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .featured-post-image {
        height: 250px;
    }
    
    .blog-header-title {
        font-size: 1.8rem;
    }
    
    .blog-header-subtitle {
        font-size: 1rem;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }
    
    .row {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .col, [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .blog-header {
        padding: 80px 0 40px;
    }
    
    .blog-header-title {
        font-size: 1.5rem;
    }
    
    .featured-post-content {
        padding: 1.5rem;
    }
    
    .featured-post-image {
        height: 200px;
    }
    
    .blog-card-content {
        padding: 1.5rem;
    }
    
    .search-form .form-control {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

