/* Blog Index Styles - For the blog listing page */

/* Main content */
main {
    position: relative;
    z-index: 10;
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Blog header */
.blog-header {
    text-align: center;
    padding: 5rem 0 3rem;
}

.blog-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(
        90deg,
        rgba(34, 211, 238, 0.85) 0%,
        rgba(236, 72, 153, 0.80) 50%,
        rgba(245, 158, 11, 0.85) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 4s ease-in-out infinite;
}

.blog-header p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog posts grid - 2 columns on desktop, 1 on mobile */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

/* Force single column on smaller screens */
@media (max-width: 1000px) {
    .blog-posts {
        grid-template-columns: 1fr;
    }
}

.blog-post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(34, 211, 238, 0.2) inset;
    border-color: rgba(34, 211, 238, 0.4);
}

.blog-post-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: 20px 20px 0 0;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-image {
    transform: scale(1.02);
}

.blog-post-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-post-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-post-date i {
    color: #22D3EE;
}

.blog-post-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.3;
}

.blog-post-excerpt {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;

    /* Limit excerpt to 3 lines max for consistency */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-post-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #22D3EE;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.2s ease;
    margin-top: auto;
}

.blog-post-card:hover .blog-post-readmore {
    gap: 0.75rem;
}

/* Responsive - Blog Index */
@media (max-width: 768px) {
    main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .blog-header {
        padding: 4rem 0 2.5rem;
    }

    .blog-header h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .blog-header p {
        font-size: 1rem;
    }

    .blog-posts {
        gap: 1.5rem;
        padding-bottom: 3rem;
    }

    .blog-post-image {
        height: 240px;
    }

    .blog-post-content {
        padding: 1.5rem;
    }

    .blog-post-title {
        font-size: 1.25rem;
        line-height: 1.4;
    }

    .blog-post-excerpt {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.75rem;
    }

    .blog-post-title {
        font-size: 1.15rem;
    }

    .blog-post-image {
        height: 200px;
    }
}

/* Pagination Navigation */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 0 4rem;
    margin-top: 2rem;
}

.pagination-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20pt;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-button:not(.pagination-disabled):hover {
    background: rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-2px);
}

.pagination-button.pagination-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

@media (max-width: 768px) {
    .pagination {
        gap: 1rem;
        padding: 2rem 0 3rem;
    }

    .pagination-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .pagination-info {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pagination-button {
        width: 100%;
        justify-content: center;
        max-width: 200px;
    }
}
