/* Blog Layout */
.blog-main {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.blog-layout {
    display: flex;
    gap: 40px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

.blog-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: fit-content;
}

/* Search Section */
.main-search-section {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px;
}

.search-form {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.search-form input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 30px;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.search-form input::placeholder {
    color: #999;
}

.search-form button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.search-form button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Main Content Area */
.main-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0; /* Prevent content overflow */
}

/* Blog Posts Grid */
.blog-posts {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 20px 0;
}

/* Blog Post Card */
.blog-post {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

.blog-post:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Post Image */
.post-image {
    position: relative;
    width: 100%;
    padding-top: 66%;
    overflow: hidden;
}

.post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-post:hover .post-image img {
    transform: scale(1.08);
}

/* Category Tag */
.post-category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    max-width: calc(100% - 32px);
}

.post-category span {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: inline-block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.blog-post:hover .post-category span {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Post Content */
.post-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    background: #fff;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #666;
}

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

.post-meta i {
    color: #666;
    font-size: 0.9rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.blog-post:hover .post-title {
    color: #2e7d32;
}

.post-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Button */
.read-more-btn {
    margin-top: auto;
    background: #f5f5f5;
    color: #333;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(0,0,0,0.05);
}

.read-more-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.blog-post:hover .read-more-btn {
    background: #2e7d32;
    color: #fff;
    border-color: transparent;
}

.blog-post:hover .read-more-btn i {
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .blog-posts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .blog-layout {
        flex-direction: column;
        gap: 40px;
    }
    
    .blog-sidebar {
        flex: none;
        width: 100%;
        position: relative;
        top: 0;
    }

    .blog-posts {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .sidebar-widgets-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }

    .fb-page-wrapper {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .blog-layout {
        padding: 0 20px;
    }

    .blog-posts {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar-widgets-row {
        grid-template-columns: 1fr;
    }

    .post-content {
        padding: 20px;
    }

    .post-title {
        font-size: 1.2rem;
    }

    .post-excerpt {
        font-size: 0.9rem;
    }

    .blog-main {
        padding: 40px 0;
    }

    .search-form {
        flex-direction: column;
        padding: 10px;
    }

    .search-form input,
    .search-form button {
        width: 100%;
    }
}

/* No Results Message */
.no-results-message {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results-content i {
    font-size: 3rem;
    color: #666;
    margin-bottom: 20px;
}

.no-results-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.no-results-content p {
    color: #666;
    margin-bottom: 20px;
}

.reset-search-btn {
    background: #f5f5f5;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reset-search-btn:hover {
    background: #e0e0e0;
}

/* Sidebar Styles */
.blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    width: 300px;
    z-index: 10;
}

.sidebar-widgets-row {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.widget-title {
    background: var(--primary-color);
    color: #fff;
    padding: 20px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
    border-bottom: 3px solid rgba(0,0,0,0.1);
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 15px;
    margin: 0;
}

.categories-list li {
    margin-bottom: 12px;
}

.categories-list li:last-child {
    margin-bottom: 0;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.categories-list a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(5px);
    border-color: transparent;
}

.categories-list a i {
    font-size: 1.1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.categories-list a:hover i {
    background: rgba(255, 255, 255, 0.2);
}

.categories-list .count {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.categories-list a:hover .count {
    background: #fff;
    color: var(--primary-color);
}

/* Facebook Widget */
.facebook-content {
    padding: 15px;
    background: #ffffff;
}

.fb-page-wrapper {
    margin-bottom: 20px;
    background: #fff;
    min-height: 500px;
    width: 100%;
    overflow: hidden;
}

.fb-page {
    margin: 0 !important;
    display: block !important;
}

.fb-page > span {
    width: 100% !important;
}

.fb-page iframe {
    width: 100% !important;
    min-height: 500px;
}

.social-cta {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.social-cta p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.facebook-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #1877f2;
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.2);
}

.facebook-follow-btn i {
    font-size: 1.2rem;
}

.facebook-follow-btn:hover {
    background: #0d65d9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.3);
}

@media (max-width: 992px) {
    .fb-page-wrapper {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .facebook-content {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Support Widget */
.support-content {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.support-content p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #333;
    font-size: 0.95rem;
}

.support-content p i {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.support-buttons {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.support-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.support-btn.call-btn {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
}

.support-btn.call-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
}

.support-btn.whatsapp-btn {
    background: #25D366;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.support-btn.whatsapp-btn:hover {
    background: #1fa855;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}