/* AEM Labs - Blog Home CSS */
/* ======================== */

.section-header h2 {
    font-size: 32px;
}

.section-header h2::after {
    height: 6px;
}

.container {
    max-width: min(90%, var(--max-container-width));
    margin: 0 auto;
    padding: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.section-title i {
    color: var(--accent-color);
    font-size: 22px;
}

/* Animation for post filtering */
.post-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.post-card.visible {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Scroll animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    animation: fadeInUp 0.6s ease forwards;
}

/* Featured Blogs Carousel Start */
.featured-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 40vh;
}

.featured-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.featured-post.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    box-sizing: border-box;
}

.featured-post.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.featured-carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 0 20px;
}

.featured-carousel-nav {
    display: flex;
    gap: 15px;
    z-index: 4;
}

.featured-carousel-nav .carousel-btn {
    pointer-events: all;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(167, 28, 28, 0.2);
    color: var(--accent-color);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-carousel-nav .carousel-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(167, 28, 28, 0.3);
}

.featured-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 5;
}

.featured-carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(167, 28, 28, 0.3);
    border: 2px solid rgba(167, 28, 28, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.featured-carousel-indicators .indicator.active {
    background: var(--accent-color, #a71c1c);
    border-color: var(--accent-color, #a71c1c);
    transform: scale(1.2);
}

.featured-carousel-indicators .indicator:hover {
    background: rgba(167, 28, 28, 0.6);
    border-color: rgba(167, 28, 28, 0.6);
}

.hero-graphic i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.featured-blog-section {
    padding: 60px 0 20px;
}

.featured-blog-container {
    max-width: min(70%, var(--max-container-width));
    margin: 0 auto;
    padding: 0;
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.featured-post-image {
    position: relative;
    overflow: hidden;
}

.featured-post-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post:hover .featured-post-image img {
    transform: scale(1.05);
}

.featured-post-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.featured-post-content {
    padding: 22px 30px 22px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.post-category {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-category.general {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.post-category.dev-logs {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.post-category.updates {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.post-category.tutorials {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.post-category.community {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.post-category.tech-insights {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
}

.post-date {
    color: #666;
    font-size: 10px;
    font-weight: 500;
}

.post-read-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 10px;
    font-weight: 500;
}

.post-views {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 10px;
    font-weight: 500;
}

.featured-post-title a {
    color: #333;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.featured-post-title a:hover {
    color: var(--accent-color);
}

.featured-post-excerpt {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 6px;
}

.featured-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 12px 24px;
    background: linear-gradient(270deg, #a71c1c, #6907c5, #a71c1c, #6907c5);
    background-size: 300% 100%;
    background-position: 0% 0%;
    color: white;
    text-decoration: none;
    border-radius: 16px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.featured-read-more-btn:hover {
    background-position: 100% 0%;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: white;
}

.featured-read-more-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.featured-read-more-btn:hover i {
    transform: translateX(3px);
}

.featured-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.author-role {
    color: #666;
    font-size: 11px;
}

.post-engagement {
    display: flex;
    gap: 20px;
    align-items: center;
}

.post-views,
.post-comments {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 1400px) {
    .featured-blog-container {
        max-width: min(80%, var(--max-container-width));
    }

    .featured-post-badge {
        font-size: 12px;
        padding: 8px 12px;
    }

    .featured-post-badge i {
        font-size: 13px;
    }

    .featured-post-content {
        padding: 18px 20px 18px 0;
    }

    .post-category {
        font-size: 10px;
        padding: 4px 10px;
    }

    .featured-post-title a {
        font-size: 20px;
    }

    .featured-post-excerpt {
        font-size: 13px;
    }

    .featured-read-more-btn {
        padding: 8px 16px;
        font-size: 11px;
        border-radius: 12px;
    }

    .featured-post-footer {
        padding-top: 12px;
    }

    .author-avatar {
        width: 44px;
        height: 44px;
    }

    .author-name {
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .featured-blog-section {
        padding: 110px 0 20px;
    }

    .featured-blog-container {
        max-width: min(95%, var(--max-container-width));
        padding: 0 20px;
    }

    .featured-post {
        gap: 22px;
        grid-template-columns: 0.85fr 1fr;
    }

    .post-meta {
        margin-bottom: 6px;
    }

    .featured-post-image img {
        height: 350px;
    }

    .featured-post-content {
        padding: 20px 25px 20px 0;
        gap: 0;
    }

    .featured-post-title {
        margin-bottom: 0;
    }

    .featured-post-title a {
        font-size: 18px;
    }

    .featured-post-excerpt {
        font-size: 13px;
        font-weight: 500;
        line-height: 1.4;
    }

    .featured-carousel-container {
        height: 30vh;
    }
}

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

    .section-title {
        font-size: 22px;
    }

    .featured-blog-container {
        max-width: min(98%, var(--max-container-width));
        padding: 0 15px;
    }

    .featured-post {
        grid-template-columns: 0.65fr 1fr;
    }

    .featured-post-title {
        font-size: 16px;
    }

    .featured-post-excerpt {
        font-size: 12px;
    }

    .featured-read-more-btn {
        padding: 8px 16px;
    }

    .author-name {
        font-size: 13px;
    }

    .featured-carousel-nav .carousel-btn {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .featured-blog-section {
        padding: 60px 0 20px;
    }

    .featured-blog-container {
        max-width: min(95%, var(--max-container-width));
        padding: 0 15px;
    }

    .featured-post {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 0;
    }

    .featured-post-image {
        order: 1;
    }

    .featured-post-badge {
        top: 10px;
        left: 10px;
        font-size: 10px;
        padding: 4px 10px;
    }

    .featured-post-badge i {
        font-size: 11px;
    }

    .featured-post-content {
        order: 2;
        padding: 14px 18px;
    }

    .featured-post-image img {
        height: 200px;
        width: 100%;
        object-fit: cover;
    }

    .post-category {
        font-size: 9px;
        padding: 4px 10px;
    }

    .featured-post-title {
        margin-bottom: 8px;
    }

    .featured-post-title a {
        font-size: 14px;
    }

    .featured-post-excerpt {
        margin-bottom: 8px;
    }

    .featured-carousel-container {
        height: auto;
        min-height: calc(200px + 250px);
    }

    .featured-carousel-track {
        height: auto;
        min-height: calc(200px + 250px);
    }

    .post-author {
        gap: 8px;
    }

    .author-role {
        font-size: 10px;
    }

    .post-views,
    .post-comments {
        font-size: 10px;
    }

    .featured-carousel-nav {
        gap: 6px;
    }

    .featured-carousel-nav .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .featured-carousel-indicators {
        gap: 4px;
    }

    .featured-carousel-indicators .indicator {
        width: 10px;
        height: 10px;
    }
}

/* --- Featured Blogs Carousel End --- */


/* --- Recent Blogs Start --- */
.recent-posts-section {
    padding: 20px 0 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2::after {
    width: 50%;
    left: 0;
    height: 8px;
    transform: translateX(25%);
}

.section-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    background: white;
    color: #666;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(167, 28, 28, 0.3);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.post-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.1);
}

.post-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(167, 28, 28, 0.8), rgba(214, 69, 69, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.post-card:hover .post-card-overlay {
    opacity: 1;
}

.read-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    color: var(--accent-color);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.post-card:hover .read-more-btn {
    transform: scale(1);
}

.read-more-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.post-card-content {
    padding: 16px 24px;
}

.post-title {
    margin-bottom: 6px;
}

.post-title a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a:hover {
    color: var(--accent-color);
}

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

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-author-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-author-mini img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-mini span {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.post-card .post-date {
    font-size: 11px;
}

.post-card .post-read-time {
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 1400px) {
    .recent-posts-section {
        padding: 20px 0 30px;
    }

    .section-header h2 {
        font-size: 30px;
    }

    .section-header h2::after {
        width: 40%;
        transform: translateX(40%);
    }

    .section-filters {
        gap: 8px;
    }

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

    .post-card-image {
        height: 150px;
    }

    .post-card-content .post-meta {
        gap: 10px;
    }

    .post-card-content a {
        font-size: 16px;
    }

    .post-excerpt {
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .recent-posts-section {
        padding: 20px 0 30px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 26px;
    }

    .section-header h2 {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

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

@media (max-width: 480px) {
    .recent-posts-section {
        padding: 10px 0 30px;
    }

    .section-filters {
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .section-header h2::after {
        width: 15%;
        transform: translateX(60%);
    }

    .posts-grid {
        width: 90%;
        margin: 0 auto 20px;
        gap: 12px;
    }

    .post-card-image {
        height: 140px;
    }

    .post-meta span {
        font-size: 10px !important;
    }

    .post-card-content {
        padding: 12px 16px;
    }

    .post-card-content .post-category {
        font-size: 9px !important;
        padding: 4px 8px;
    }

    .post-title a {
        font-size: 15px;
    }

    .post-excerpt {
        font-size: 12px;
    }

    .post-footer {
        padding-top: 10px;
    }

    .post-footer span,
    .post-author-mini span {
        font-size: 12px;
    }
}

/* --- Recent Blogs End --- */


/* --- Load More Blogs Start --- */
.load-more-section {
    text-align: center;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--accent-color), #d64545);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(167, 28, 28, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(167, 28, 28, 0.4);
}

/* --- Load More Blogs End --- */




/* --- No Posts Message Styles Start --- */
.no-posts-message {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px dashed #e9ecef;
    margin: 20px 0;
}

.no-posts-content {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-posts-content i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

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

.no-posts-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Additional category styles for dynamic content */
.post-category.blog {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.post-category.news {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.post-category.guides {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.post-category.how-to {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.post-category.insights {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
}

.post-category.development {
    background: linear-gradient(135deg, #fd7e14, #e55a00);
    color: white;
}

/* --- No Posts Message Styles End --- */