
/* =========================================
   LOKMAYA HOMEPAGE
========================================= */

.homepage {
    width: 94%;
    max-width: 1200px;
    margin: 25px auto;
}

.homepage-heading {
    background: #fff;
    padding: 25px;
    border-radius: 6px;
    border-left: 5px solid #a30f2b;
}

.homepage-heading h1 {
    margin: 0 0 8px;
    color: #171b2b;
    font-size: 26px;
}

.homepage-heading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* =========================================
   TOP NEWS + FEATURE NEWS LAYOUT
========================================= */

.homepage-news-layout {
    display: grid;
    grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    box-sizing: border-box;
}

.homepage-news-layout > * {
    min-width: 0;
}

.homepage-left-column {
    min-width: 0;
}

/* =========================================
   TOP NEWS - LEFT COLUMN
   Existing size and position preserved
========================================= */

.top-news-section {
    width: 100%;
    min-width: 0;
}

.top-news-card {
    display: block;
    text-decoration: none;
    color: #222;
}

.top-news-card img {
    display: block;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 5 / 4;
    height: auto;
    object-fit: cover;
}

.top-news-card h2 {
    font-size: 21px;
    line-height: 1.5;
    margin: 10px 0;
}

.top-news-card:hover h2 {
    color: #b00020;
}

/* =========================================
   RIGHT COLUMN
========================================= */

.homepage-right-column {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 10px;
    align-items: start;
}

/* FEATURE NEWS */

.homepage-right-column > :nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-width: 0;
}

.feature-news-section {
    width: 100%;
    min-width: 0;
}

.feature-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.feature-news-card {
    min-width: 0;
}

.feature-news-card a {
    display: block;
    text-decoration: none;
}

/* Smaller Feature Images */

.feature-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    overflow: hidden;
}

.feature-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.feature-news-card img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
}

/* FEATURE CATEGORY */

.feature-category {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    padding: 0;
    white-space: nowrap;
    z-index: 2;
}

/* =========================================
   VIDEO SECTION - RIGHT SIDEBAR
========================================= */

.homepage-right-column > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
}

/* =========================================
   POLLS SECTION - BELOW VIDEO
========================================= */

.homepage-right-column > :nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1100px) and (min-width: 901px) {

    .homepage-news-layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        gap: 12px;
    }

    .homepage-right-column {
        grid-template-columns: minmax(0, 1fr) 180px;
        gap: 8px;
    }

    .top-news-card h2 {
        font-size: 18px;
    }

    .feature-news-grid {
        gap: 6px;
    }

    .feature-category {
        font-size: 11px;
    }
}

/* =========================================
   MOBILE AND SMALL TABLET
========================================= */

@media (max-width: 900px) {

    .homepage {
        width: 94%;
        margin: 15px auto;
    }

    .homepage-news-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .homepage-right-column {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .homepage-right-column > * {
        width: 100%;
    }

    .top-news-card h2 {
        font-size: 18px;
    }

    .feature-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .feature-image-wrapper {
        width: 100%;
        aspect-ratio: 5 / 4;
    }

    .feature-image-wrapper img {
        width: 100%;
        height: 100%;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 650px) {

    .homepage-heading {
        padding: 18px;
    }

    .homepage-heading h1 {
        font-size: 21px;
    }

    .homepage-news-layout {
        gap: 20px;
    }

    .top-news-card img {
        width: 100%;
        max-width: none;
        aspect-ratio: 5 / 4;
    }

    .feature-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .feature-category {
        font-size: 11px;
    }
}

/* =========================================
   STATE NEWS - HOMEPAGE ALIGNMENT FIX
========================================= */

.state-news-section {
    width: 94% !important;
    max-width: 1200px !important;
    min-width: 0 !important;
    margin: 25px auto !important;
    padding: 20px;
    background: #b90026;
    color: #fff;
    box-sizing: border-box;
    overflow: hidden;
}

/* STATE NEWS GRID */

.state-news-panel {
    display: grid;
    grid-template-columns: minmax(0, 450px) repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* MAIN NEWS */

.state-news-card.main-news {
    grid-column: 1;
    grid-row: 1 / span 4;
    min-width: 0;
}

.state-news-card.main-news img {
    width: 100%;
    max-width: 450px;
    height: 350px;
    object-fit: contain;
    background: #fff;
}

/* SMALL NEWS */

.state-news-card.small-news {
    min-width: 0;
    width: 100%;
}

.state-news-card.small-news img {
    width: 100%;
    max-width: 250px;
    height: 200px;
    object-fit: contain;
    background: #fff;
}

/* TABLET */

@media(max-width: 900px) {
    .state-news-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .state-news-card.main-news {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

/* MOBILE */

@media(max-width: 600px) {
    .state-news-section {
        width: 94% !important;
        padding: 12px;
    }

    .state-news-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .state-news-card.main-news {
        grid-column: 1 / -1;
    }
}

@media(max-width: 380px) {
    .state-news-panel {
        grid-template-columns: 1fr;
    }

    .state-news-card.main-news {
        grid-column: 1;
    }
}
