.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    display: flex;
    align-items: center;
}

.breadcrumb .highlight {
    color: #FFD700;
    margin: 0 5px;
}

.blog-header {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;   /* 🔹 keep 16:9 ratio */
    max-height: 560px;      /* 🔹 cap the height */
    background-size: cover;
    background-position: center;
    color: white;
    overflow: hidden;
}

/* Dark overlay */
.blog-header .overlay {
    background: rgba(0, 0, 0, 0.8);
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

/* Breadcrumb top-left */
.blog-header .breadcrumb {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    z-index: 2;
    font-size: 1.4rem;
    font-family: var(--font-secondary);
    color: rgba(255, 255, 255, 0.85);
    text-align : left;
    padding-left: 5.56%;
    max-width: 100%;
}


.blog-header .breadcrumb a.active,
.blog-header .breadcrumb span.active {
    color: #fff;
    /* font-weight: bold; */
}

/* Text content */
.blog-header h1 {
    position: relative;
    z-index: 2;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin: 0.5rem 0;
}

.blog-header h1 span {
    color: var(--clr-yellow);
}

.blog-header p {
    position: relative;
    z-index: 2;
    font-size: 1.7rem;
    line-height: 1.2;
    max-width: 100%;
    margin-inline : 5.56%;
    font-family: var(--font-secondary);
    text-align: justify;
}

/* BLOG GRID */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* gap: 25px; */
    gap : 30px;
    padding-inline : 5.56%;
    background: #111;
    font-family : var(--font-secondary);

}

.blog-card {
    background: #111;
    color: white;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex; 
    flex-direction: column; 
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* .blog-card img {
    width: 100%;
    height: 450px;
    object-fit: contain;
} */

.blog-card img {
    width: 100%;
    height: 100%; 
    object-fit: contain;
} 


.blog-info {
    /* padding: 15px; */
    padding: 20px; /* Adjusted padding for better spacing */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-info .date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.blog-title {
    font-size: 1.5rem;
    margin: 10px 0;
    font-weight: bold;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-clamp: 2;
    letter-spacing: 0.04em;
    font-family : var(--font-primary);
    min-height : calc(1.1rem * 1.4 * 2);
}

.blog-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-top : auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-clamp: 3;

    min-height : calc(0.85rem * 1.5 * 3)
}


@media (max-width: 768px) {

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

    .blog-grid {
        display: block;
        padding: 25px;
    }

    .blog-card {
        display: flex;
        align-items: flex-start; 
        flex-direction: row;
        gap: 15px;
        background: none; 
        margin-bottom: 30px; 
    }
    
    .blog-card:hover {
        transform: none;
        box-shadow: none;
    }

    .blog-card .blog-image-wrapper {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        overflow: hidden;
    }

    .blog-card img {
        max-width: 90px;
        max-height: 90px;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 0;
        background: transparent;
        display: block;
    }

    .blog-info {
        padding: 0;
        flex: 1 1 auto;
    }

    .blog-info .date {
        font-size: 0.7rem;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.6);
    }

    .blog-title {
        font-size: 1.25rem;
        text-transform: uppercase; 
        font-weight: 700;
        line-height: 1.5;
        margin: 5px 0;
        font-family: var(--font-primary);
        letter-spacing : normal;
    }
    .blog-header .breadcrumb {
        font-size: 1rem;
    }

    .blog-desc {
        display: none;
    }
    
    /* Create and style the "READ STORY" link */
    .blog-info::after {
        content: "READ STORY →";
        display: block;
        font-size: 0.75rem;
        color: white;
        margin-top: 8px;
        transition: color 0.2s ease; 
        text-decoration: underline;
        letter-spacing: 0.02em;
        line-height : 1;
    }

  
    a:hover .blog-info::after {
        color: var(--clr-yellow);
    }
}

/* Pagination Navigation */
.blog-pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 40px;
    box-sizing: border-box;
    background: #111;
    margin-top: 20px;
}

.blog-nav-btn {
    background: #f4a300;
    color: #111;
    padding: 8px 15px;
    text-transform: uppercase;
    font-family: var(--font-secondary);
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blog-nav-btn:hover {
    background: #ffbe33;
}

/* Force Next button to right side */
.blog-nav-btn.next {
    margin-left: auto;
}

/* Blog Controls */
.blog-controls {
    padding: 20px 40px;
    background: #111;
    font-family: var(--font-secondary);
    color: white;
    text-align: right;
}

.blog-controls label {
    margin-right: 10px;
    font-size: 0.9rem;
}

.blog-controls select {
    padding: 5px 10px;
    font-size: 0.9rem;
    border-radius: 5px;
    border: none;
    background: #222;
    color: white;
}


/* =================================================== */
/* --- Responsive Styles for Blog Header (Mobile) --- */
/* =================================================== */

@media (max-width: 500px) {
    .blog-header {
        /* On mobile, remove the wide aspect ratio and let content define height */
        aspect-ratio: auto;
        height: auto;
        min-height: 350px; /* Ensure it still has a good presence */
        max-height: none;
    }

    .blog-header .overlay {
        /* Adjust padding to give more vertical space */
        padding: 6rem 1rem 2rem;
    }

    .blog-header .breadcrumb {
        /* Make breadcrumb smaller and adjust position */
        font-size: 0.8rem;
        left: 1rem;
        top: 1.5rem;
        max-width: 90%; /* Prevent it from getting too wide */
    }

    .blog-header h1 {
        /* Drastically reduce title font size for mobile */
        font-size: 2.2rem;
        line-height: 1.2;
        margin: 0 0 1rem 0;
    }

    .blog-header p {
        /* Reduce paragraph font size */
        font-size: 0.9rem;
        line-height: 1.6;
    }
}