/* ============================================
   BLOG SECTIONS STYLES
   Modern, sleek design for blog content sections
   ============================================ */

/* ============================================
   TRENDING POSTS SECTION
   ============================================ */
.trending-posts-section {
    padding: 80px 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f2;
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.trending-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 25px;
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.trending-badge::before {
    content: '🔥';
    margin-right: 8px;
}

.trending-arrows {
    display: flex;
    gap: 10px;
}

.trend-nav-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #27AE60 0%, #18bd5d 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.trend-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px #27AE60;
}

.trending-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.trending-post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
}

.trending-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.trending-post-image {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.trending-post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    transition: all 0.3s ease;
}

.trending-post-card:hover .trending-post-image::before {
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
}

.trending-post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    z-index: 2;
}

.trending-post-content {
    padding: 25px;
}

.trending-post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.trending-post-title a:hover {
    color: #27AE60;
}

.trending-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.trending-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #5a6c7d;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   CATEGORY SECTIONS
   ============================================ */
.category-sections {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fc 0%, #f1f3f8 100%);
}

.category-block {
    margin-bottom: 60px;
}

.category-block:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #27AE60 0%, transparent 100%) 1;
}

.category-title {
    margin: 0;
}

.category-badge {
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.people-badge {
    background: #e74c3c;
}

.wedding-badge {
    background: #3f6dee;
    color: #ffffff;
}

.worshipers-badge {
    background: #764ba2;
    color: #fff;
}
.funerals-badge {
    background: #2e2e2e;
    color: #fff;
}
.marketplace-badge {
    background: #faae09;
    color: #fff;
}
.students-badge {
    background: #05a4d4;
    color: #fff;
}
.culture-badge {
    background: #9e600f;
    color: #fff;
}
.workplace-badge {
    background: #031d72;
    color: #fff;
}

.view-all-link {
    color: #27AE60;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all-link:hover {
    color: #5a67d8;
    transform: translateX(5px);
}

.category-posts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.category-post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    cursor: pointer;
}

.category-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.category-post-card.featured {
    grid-row: span 2;
}

.category-post-image {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.category-post-card.featured .category-post-image {
    height: 280px;
}

.category-post-card:not(.featured) .category-post-image {
    height: 160px;
}

.category-post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.category-post-card:hover .category-post-image::before {
    opacity: 1;
}

.category-post-overlay-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    z-index: 2;
}

.category-post-content {
    padding: 20px;
}

.category-post-card.featured .category-post-content {
    padding: 25px;
}

.category-post-title {
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: #2c3e50;
}

.category-post-card.featured .category-post-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.category-post-card:not(.featured) .category-post-title {
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-post-title a:hover {
    color: #27AE60;
}

.category-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 12px;
}

.category-post-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #5a6c7d;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   POPULAR POSTS SECTION
   ============================================ */
.popular-posts-section {
    padding: 80px 0;
    background: white;
}

.popular-posts-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.popular-tabs-header {
    margin-bottom: 40px;
    border-bottom: 2px solid #f0f0f2;
}

.popular-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.tab-item {
    padding: 18px 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #7f8c8d;
    background: #f8f9fa;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
}

.tab-item.active {
    background: #007B00;
    color: white;
    box-shadow: 0 -4px 15px rgba(102, 126, 234, 0.3);
}

.tab-item:not(.active):hover {
    background: #e9ecef;
    color: #495057;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.tab-content.active {
    display: block;
}

.popular-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.popular-post-card {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.popular-post-card:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left-color: #27AE60;
}

.popular-post-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.popular-post-content {
    flex: 1;
}

.popular-post-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: white;
}

.popular-post-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-title a:hover {
    color: #27AE60;
}

.popular-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #7f8c8d;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2d2e2d 0%, #2d2e2d 100%);
    position: relative;
    overflow: hidden;
}

.newsletter-section::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="newsletterPattern" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23newsletterPattern)"/></svg>');
    opacity: 0.6;
}

.newsletter-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.newsletter-content {
    flex: 1;
    color: white;
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #fff;
}

.newsletter-subtitle {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
    margin: 0;
    color: #fff;
}

.newsletter-form {
    flex: 1;
    max-width: 500px;
}

.form-group {
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.newsletter-input {
    flex: 1;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 50px;
    outline: none;
    background: transparent;
}

.newsletter-input::placeholder {
    color: #a0aec0;
}

.newsletter-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .category-posts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .category-post-card.featured {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 992px) {
    .trending-posts-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .category-posts-grid {
        grid-template-columns: 1fr;
    }

    .category-post-card.featured {
        grid-column: span 1;
    }

    .newsletter-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .newsletter-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .trending-posts-section,
    .category-sections,
    .popular-posts-section,
    .newsletter-section {
        padding: 60px 0;
    }

    .popular-tabs {
        flex-direction: column;
        gap: 5px;
    }

    .tab-item {
        text-align: center;
        border-radius: 8px;
        margin-right: 0;
    }

    .popular-post-card {
        flex-direction: column;
        gap: 15px;
    }

    .popular-post-image {
        width: 100%;
        height: 180px;
    }

    .form-group {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        border-radius: 20px;
    }

    .newsletter-input,
    .newsletter-btn {
        border-radius: 15px;
    }
}

@media (max-width: 576px) {
    .section-title {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .category-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .trending-post-content,
    .category-post-content {
        padding: 15px;
    }

    .newsletter-title {
        font-size: 1.8rem;
    }
}
