/* ===========================
   🔹 BLOG PAGE STYLES
=========================== */

#blog-page {
    margin-top: 10px;
    /* Adjust this number to increase/decrease space */
    margin-bottom: 20px;
}

#blog-page section {
    margin-bottom: 0px;
    padding: 10px 25px;
}

/* Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* The Glass Card Style */
.blog-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 200, 255, 0.15);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Hover Effect - Neon Lift & Glow */
.blog-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 30px -10px rgba(0, 200, 255, 0.3);
    border-color: var(--cyan);
}

/* Header area inside card (Date & Category) */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

/* Date styling */
.blog-meta {
    color: var(--text-dim);
    display: flex;
    align-items: center;
}

.blog-meta i {
    color: var(--cyan);
}

/* Category Tag Styling */
.blog-category {
    background: rgba(255, 67, 197, 0.15);
    /* Magenta background */
    color: var(--magenta);
    border: 1px solid var(--magenta);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Alternative color for different categories */
.blog-category.tech-web {
    background: rgba(0, 200, 255, 0.15);
    /* Cyan background */
    color: var(--cyan);
    border-color: var(--cyan);
}

/* Card Title */
.blog-card h3 {
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.3s;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-card:hover h3 {
    color: var(--cyan);
    /* Title glows on hover */
}

/* Card Body Text */
.blog-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    /* Pushes button to bottom */
    /* 🟢 LIMIT TO 5 LINES EXACTLY */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    /* max number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* hides the extra text */
    text-overflow: ellipsis;
    /* adds "..." at the end */
    text-align: justify;
    /* Aligns text evenly on both sides */
    text-justify: inter-word;
    /* Prevents large gaps between words */
    hyphens: auto;
    /* Breaks long words if needed to keep spacing even */
}

/* Read More Button */
.read-more-btn {
    text-decoration: none;
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    align-self: flex-start;
    /* Aligns button to the left */
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover {
    color: var(--magenta);
    text-shadow: 0 0 8px rgba(255, 67, 197, 0.6);
}

.read-more-btn:hover i {
    transform: translateX(5px);
    /* Moves arrow slightly right */
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .container {
        /* 60px Top, Auto Sides, 0 Bottom */
        margin: 60px auto 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
        gap: 20px;
        margin-bottom: 0px;
    }

    .blog-card {
        padding: 20px;
    }

    .blog-card p {
        /* 1. Change limit to 4 lines */
        -webkit-line-clamp: 4;
        line-clamp: 4;

        /* 2. Slightly smaller text to fit more content */
        font-size: 0.85rem;

        /* 3. Tighter line height for mobile reading */
        line-height: 1.5;

        /* 4. Reduce space between text and button */
        margin-bottom: 15px;
    }
}