/* ===============================
   HOME TOP SECTION
================================== */
.home-top {
    margin: 40px auto;
    max-width: 1300px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Layout grid */
.home-top-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ===== Section Headings ===== */
.section-heading {
    text-align: center;
    margin: 0 auto 20px;
    position: relative;
    font-weight: 500;
    font-size: 20px;
    color: #111;
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 2px solid red;
    border-right: 2px solid red;
    border-radius: 8px 16px 16px 8px;
    padding-bottom: 8px;
}

/* Left & Right lists */
.home-list-item {
    border-bottom: 1px solid #eaeaea;
    padding: 10px 0 12px;
}
.home-list-title { text-decoration:none; color:#111; font-weight:400; line-height:1.3; display:block; transition:color .3s; }
.home-list-title:hover { color:red; }
.home-list-time { font-size:13px; color:#777; margin-top:6px; }

/* Featured */
.home-featured-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.home-featured-thumb img { width:100%; height:auto; display:block; transition:transform .4s ease; }
.home-featured-thumb:hover img { transform:scale(1.03); }
.home-featured-overlay {
    position:absolute;
    bottom:0;
    left:0;
    right:0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color:#fff;
    padding:15px;
    box-sizing:border-box;
}
.home-featured-title { font-size:24px; font-weight:600; margin:0 0 6px; }
.home-featured-time { font-size:13px; opacity:0.9; }

/* ===============================
   CENTER COLUMN - CARD LIST (desktop)
   Cards appear INSIDE center column, below featured image
================================== */
.center-news-cards {
    margin-top: 22px;
}

/* Each card: left = text, right = small thumb */
.center-news-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #ececec;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 14px;
    transition: box-shadow .18s ease, transform .18s ease;
}
.center-news-card:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

/* Left column inside card (title + meta) */
.center-card-left {
    flex: 1 1 auto;
    min-width: 0; /* allow text to truncate */
}

.center-card-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: red;
    margin-bottom: 6px;
    text-transform: uppercase;
}

/* Title link */
.center-card-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}
.center-card-title:hover { color: red; }

/* Meta date/time */
.center-card-meta {
    font-size: 13px;
    color: #777;
}

/* Right thumbnail */
.center-card-thumb {
    flex: 0 0 140px;
    max-width: 140px;
    display:block;
    overflow:hidden;
    border-radius:4px;
}
.center-card-thumb img {
    width: 140px;
    height: 90px;
    object-fit: cover;
    display:block;
}

/* ===============================
   STICKY LEFT & RIGHT COLUMNScenter-card-cat
   =============================== */
.home-left,
.home-right {
    position: sticky;
    top: 90px; /* adjust based on header height */
    align-self: start;
    height: fit-content;
}

/* Ensure layout doesn’t collapse */
.home-top-grid {
    align-items: flex-start;
}

/* Prevent left/right background from showing blank behind them */
.home-top {
    overflow: visible;
}

/* Optional: to make sure center scrolls naturally while left/right stay fixed visually */
.home-center {
    z-index: 1;
}



/* ===============================
   RESPONSIVE DESIGN (Improved)
================================== */

/* For tablets and below */
@media (max-width: 992px) {
    .home-top-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Hide left and right columns */
    .home-left,
    .home-right {
        display: none;
    }

    .home-center {
        width: 100%;
    }

    /* Featured section */
    .home-featured-thumb img {
        height: 400px;
        object-fit: cover;
    }

    .home-featured-title {
        font-size: 22px;
        line-height: 1.4;
    }

    .home-featured-overlay {
        padding: 18px;
    }

    /* Cards layout remains horizontal (text left, image right) */
    .center-news-card {
        flex-direction: row;
        align-items: center;
        padding: 14px;
        gap: 14px;
    }

    .center-card-left {
        flex: 1;
    }

    .center-card-thumb {
        flex: 0 0 140px;
        max-width: 140px;
    }

    .center-card-thumb img {
        width: 140px;
        height: 100px;
        object-fit: cover;
    }
}

.view-all-wrapper {
    text-align: center;
    margin-top: 20px;
}


.view-all {
    display: inline-block;
    margin: 25px auto 0;
    padding: 10px 26px;
    background-color: red;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.view-all:hover {
    background-color: #c40000;
    transform: translateY(-2px);
}

/* Optional: focus accessibility */
.view-all:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.3);
}

/* For mobile phones */
@media (max-width: 600px) {
    .home-top {
        padding: 0 10px;
    }

    /* Hide left/right */
    .home-left,
    .home-right {
        display: none;
    }

    .home-center {
        width: 100%;
    }

    /* Featured post image slightly taller */
    .home-featured-thumb img {
        height: 360px;
        object-fit: cover;
    }

    .home-featured-title {
        font-size: 20px;
    }

    /* Keep image right, text left */
    .center-news-card {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 12px;
    }

    .center-card-thumb {
        flex: 0 0 120px;
        max-width: 120px;
    }

    .center-card-thumb img {
        width: 120px;
        height: 90px;
        object-fit: cover;
    }

    .center-card-left {
        flex: 1;
    }

    .center-card-title {
        font-size: 15px;
        line-height: 1.3;
    }

    .center-card-meta {
        font-size: 12px;
    }
}

/* ===============================
   LATEST NEWS GRID SECTION
================================== */
.latest-news {
    margin: 60px auto;
    max-width: 1300px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Grid layout */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

/* Each card */
.latest-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.latest-card:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

/* Thumbnail */
.latest-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.latest-card:hover .latest-thumb img {
    transform: scale(1.04);
}

/* Meta (date/time) */
.latest-meta {
    font-size: 13px;
    color: #777;
    margin: 10px 12px 0;
}

/* Title */
.latest-title {
    display: block;
    font-size: 14px;
    font-weight: 300;
    color: #111;
    text-decoration: none;
    line-height: 1.4;
    margin: 6px 12px 14px;
    transition: color .3s;
}

.latest-title:hover {
    color: red;
}

/* ===============================
   Latest News Heading Row
================================== */
.latest-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid red;
    margin-bottom: 30px;
    padding: 4px 0 4px 0;
    border-right: 2px solid red;
    border-radius: 8px 16px 16px 8px;
}

/* Left title */
.latest-heading {
    font-size: 22px;
    font-weight: 500;
    color: #111;
    margin: 0;
    padding-left: 10px;
}

/* Right "View All" */
.latest-heading-end {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    padding-right: 20px;
}

.latest-heading-end a {
    color: red;
    text-decoration: none;
    transition: color 0.3s ease;
}

.latest-heading-end a:hover {
    color: #c40000;
}