﻿

/*hero section*/

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar Styles */
.navbar {
    background-color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.2em;
    color: #000;
}


.logo-img {
    width: 250px; /* Adjust as needed */
    height: auto; /* Maintain aspect ratio */
}

/* Hero Section Styles */
.hero-section {
    padding: 40px 0;
}

/* Main Hero Card */
.hero-main-card {
    display: flex;
    background-color: #fdfbf7;
    border-radius: 0px;
    overflow: hidden;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);*/
    margin-bottom: 10px;
    border-bottom: 1px solid black; /* Added border-bottom */
}

.hero-main-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .hero-main-content .category {
        font-size: 0.8em;
        color: #666;
        text-transform: uppercase;
        margin-bottom: 10px;
        font-weight: bold;
    }

    .hero-main-content h1 {
        font-size: 2.2em;
        margin-top: 0;
        margin-bottom: 15px;
        line-height: 1.2;
        color: #000;
    }

    .hero-main-content .description {
        font-size: 1.1em;
        color: #555;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .hero-main-content .article-info {
        font-size: 0.9em;
        color: #888;
    }

.hero-main-image {
    flex: 1;
    /*min-width: 400px;*/ /* Adjust as needed */
    min-height: 400px;/* Fixed height for consistency */
    overflow: hidden;
    margin-bottom: 10px; /* Ensures the image is at the top */
}

    .hero-main-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        max-height:400px;
    }

/* Sub Cards */
.hero-sub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /*gap: 20px;*/
}

.sub-card {
    background-color: #fff;
    border-radius: 0px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 15px; /* Add some padding for content */
    /* Apply a border-right to most cards */
    border-right: 1px solid black; /* Adjust color as needed */
    height: 100%; /* Ensures all cards have the same height */
    position: relative; /* Allows for absolute positioning of child elements */
}
    .sub-card .card-metadata {
        margin-top: auto; /* Pushes this div to the bottom of the flex container */
        /* You might want to add some padding-top if the previous element is right up against it */
        padding-top: 10px; /* Example padding */
        align-self: flex-start; /* Aligns to the start (left) of the cross axis */
    }


/* Order for mobile: cards become bottom to top */
.hero-sub-cards .sub-card:nth-child(1) {
    order: 4;
    border-right: none; /* Remove border for the last card */
    border-bottom: none;
}

    .sub-card:hover {
        transform: translateY(-5px);
    }

    .sub-card img {
        width: 100%;
        height: 180px; /* Fixed height for sub-card images */
        object-fit: cover;
        display: block;
    }



    .sub-card h3 {
        font-size: 1.1em;
        margin: 5px 5px 5px;
        color: #000;
        line-height: 1.4;
    }

/* Responsive Design */
@media (max-width: 992px) {
    .hero-main-card {
        flex-direction: column; /* Stack image and content on smaller screens */
    }

    .hero-main-image {
        min-width: unset;
        height: 250px; /* Adjust height for mobile */
        min-height: unset; /* Remove fixed height for mobile */
        max-height: 250px;
    }

    .hero-main-content {
        padding: 10px;
    }

        .hero-main-content h1 {
            font-size: 1.8em;
        }

        .hero-main-content .description {
            font-size: 1em;
        }

    .hero-sub-cards {
        grid-template-columns: 1fr; /* Stack sub-cards on mobile */
    }

        /* Order for mobile: cards become bottom to top */
        .hero-sub-cards .sub-card:nth-child(1) {
            order: 4;
            border-right: none; /* Remove border for the last card */
            border-bottom: none;
        }

        .hero-sub-cards .sub-card:nth-child(2) {
            order: 3;
            border-right: none; /* Remove border for the last card */
            border-bottom: 1px solid black;
        }

        .hero-sub-cards .sub-card:nth-child(3) {
            order: 2;
            border-right: none; /* Remove border for the last card */
            border-bottom: 1px solid black;
        }

        .hero-sub-cards .sub-card:nth-child(4) {
            order: 1;
            border-right: none; /* Remove border for the last card */
            border-bottom: 1px solid black;
        }
}

@media (max-width: 576px) {
    .container {
        padding: 15px;
    }

    .hero-section {
        padding: 20px 0;
    }

    .hero-main-content h1 {
        font-size: 1.5em;
    }
}

/*hero section*/

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}


.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto {
    position: relative;
    width: 100%;
    padding-right: 5px;
    padding-left: 5px;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

p {
    font-size: 18px;
    line-height: 27px;
    margin-bottom: .8rem;
}


.clickable-line {
    cursor: pointer;
    display: inline-flex;
    padding: 10px;
    width: 100%;
}

    .clickable-line:hover {
        background-color: #ececec;
        color: #252525;
        transition: background-color 0.3s ease;
        border-radius: 10rem;
    }


#topic-news > a:hover {
    text-decoration: none;
}

#uni-news > a:hover {
    text-decoration: none;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    font-size: 14px;
    background-color: #ffffff;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
        background-color: #ffffff;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
    background-color: #ffffff;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
    background-color: #ffffff;
    font-family: 'Merriweather', serif;
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 50px; /* Vertically center the text there */
}



/*cards     css*/
.card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #ffffff;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.00);
    border: none;
}

    .card:hover {
        cursor: pointer;
    }

.card-image {
    width: 233px;
    height: 144px;
    object-fit: fill;
    margin-left: 15px;
}


.card-title {
    font-size: 24px;
    line-height: 24px;
    font-weight: bold;
    margin: 0;
}

.card-subtitle {
    font-size: 16px;
    line-height: 22px;
    color: #555555;
    margin: 8px 0 0;
    font-weight: normal;
}


    .card-subtitle > a:hover {
        text-decoration: none;
    }


.card-topics {
    margin: 2px;
}


a {
    color: #252525;
}

    a:hover {
        color: #252525;
    }

.card-metadata {
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    color: #555555;
    margin: 4px 0 0;
    padding-left: 2px;
}

    .card-metadata > span {
        margin-right: 1px;
    }

.point-circle {
    display: inline-block;
    width: 3px; /* Adjust size as needed */
    height: 3px; /* Adjust size as needed */
    background-color: #999;
    border-radius: 50%; /* Makes it circular */
    margin-top: 10px; /* Adjust spacing as needed */
    margin-left: 12px;
    vertical-align: middle; /* Align vertically with other inline elements */
}



.card-source {
    margin-left: 3px;
    text-decoration: none;
    color: #555555;
}

    .card-source a:hover {
        text-decoration: underline;
    }

.d-none {
    display: none;
}

.showing {
    display: block;
}

.btn {
    padding: 10px;
    margin: 5px;
    cursor: pointer;
}



.btn-checked {
    color: #fff;
    border-color: #e0ded8;
    background-color: #252525;
}

    .btn-checked:hover {
        background-color: unset !important;
        color: unset !important;
    }


.btn-unchecked {
    background-color: #f4f4f4;
    color: #252525;
    border-color: #e0ded8;
}

    .btn-unchecked:hover {
        background-color: unset !important;
        color: unset !important;
    }


.clickable-line {
    cursor: pointer;
}




/* sticky footer */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/*body {
    display: flex;
    flex-direction: column;
}*/

.main-content {
    flex: 1 0 auto;
}

.sticky-footer {
    flex-shrink: 0;
    width: 100%;
    position: sticky;
    bottom: 0;
}


.nav-link.active {
    background-color: #666 !important;
    color: white !important;
}

/*#d1cfcf can be applied also*/
.selected-topic {
    background-color: #333333 !important; /* Change color when topic clicked */
    color: white !important;
}


/*scroll top button*/
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 65px;
    right: 35px;
    z-index: 99;
    font-size: 40px;
    border: none;
    outline: none;
    background-color: transparent; /* Change to your preferred color */
    color: #252525;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    transition: background-color 0.3s ease; /* Smooth transition */
}

    #scrollToTopBtn:hover {
        background-color: #d4d2cc; /* Change to your preferred hover color */
    }


.link-button {
    background: none;
    border: none;
    color: #252525;
    cursor: pointer;
    font-size: inherit;
    width: 100%;
    text-align: left;
    margin-left: 5px;
    outline: none;
}

    .link-button:focus,
    .link-button:active {
        border: none; /* No border on active/focus */
        outline: none; /* No outline on active/focus */
        box-shadow: none; /* Optional: removes any shadow that might appear */
    }


.card-source-uni {
    background: none;
    border: none;
    color: #555555;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    text-align: left;
    outline: none;
    min-width: 24px;
    min-height: 24px;
    padding: 0px 10px;
    line-height: 1.5;
}


    .card-source-uni:hover {
        text-decoration: underline;
    }


    .card-source-uni:focus,
    .card-source-uni:active {
        border: none; /* No border on active/focus */
        outline: none; /* No outline on active/focus */
        box-shadow: none; /* Optional: removes any shadow that might appear */
    }

.card-date-formatted {
    color: #555555;
    font-size: 13px;
    padding: 1px 0px 0px 0px;
    margin: 0px;
}


.vertical-line {
    width: 1px; /* Adjust thickness */
    height: 1000px; /* Adjust height */
    background-color: gray; /* Adjust color */
    /* Optional: Center the line */
    margin: 0; /* or margin-left: 50%; transform: translateX(-50%); for more precise centering */
}



/******************************************************************SCIENCENEWSLAYOUTCSS*****************************************/



/* Navigation */
nav {
    background-color: white;
    box-shadow: var(--card-shadow);
    /*position: fixed;*/
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid black;
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    /*padding: 1rem;*/
    display: flex;
    justify-content: center;
    align-items: center;
    /*box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);*/
    border-bottom: 1px solid #fefefe;
}

#nav-container{
    width:900px;
}

.logo-search {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
    text-decoration: none;
    margin-left: 40px;
}

    .logo strong {
        font-weight: bold;
    }

    .logo span {
        font-weight: normal;
        font-size: 1.25rem;
    }


.search-container {
    flex: 1;
    max-width: 400px;
    margin-left: 40px;
    margin-right: 20px;
}

    .search-container input {
        width: 100%;
        padding: 0.75rem 1rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 0.9rem;
    }

.menu-toggle {
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    margin-left: 80px;
}

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: black;
        margin: 5px 0;
        transition: 0.3s;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }


.nav-links {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px; /* adjust the width to fit your content */
    background-color: #fff;
    z-index: 1;
    display: none;
}

    .nav-links.show {
        display: block;
    }

    .nav-links.active {
        right: 0;
        z-index: 2;
        position: relative;
        display: block;
        width: 100%; /* adjust the width */
        height: 100%; /* adjust the height */
        background-color: #ffffff; /* adjust the background color */
        border: 1px solid #f5f5f5; /* adjust the border */
        padding: 30px; /* adjust the padding */
        box-shadow: 0 5px 5px rgb(245,245,245); /* adjust the box shadow */
    }

    .nav-links .menu-section {
        margin-bottom: 2rem;
    }

        .nav-links .menu-section h3 {
            color: var(--primary-color);
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #ddd;
            font-weight: 500;
        }

    .nav-links a {
        display: block;
        text-decoration: none;
        color: var(--text-color);
        padding: 0.75rem 0;
        /*font-weight: 500;*/
        transition: color 0.3s ease;
    }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--secondary-color);
        }

.social-links {
    display: flex;
    gap: 1rem;
}

    .social-links a {
        padding: 0.5rem;
    }

.nav-links a:active, .nav-links a:focus, .nav-links a:hover {
    color: #007bff; /* blue color */
    background-color: #f0f0f0; /* light gray background */
    text-decoration: none;
}
/* Main Content */
main {
    max-width: 1200px;
    margin: 80px auto 2rem;
    padding: 0 1rem;
}



/* Hero Section with Featured and Trending */
/*.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}*/

.featured-container {
    margin-bottom: 0;
}

.featured-article {
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    height: 450px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .featured-article:hover {
        transform: translateY(-5px);
    }

    .featured-article img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .featured-article .content {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 2rem;
        background: linear-gradient(transparent, rgba(0,0,0,0.8));
        color: white;
    }

/* Trending Section */
.trending-section {
    background: white;
    border-radius: 5px;
    box-shadow: var(--card-shadow);
    height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) #ddd;
}

    .trending-section::-webkit-scrollbar {
        width: 6px;
    }

    .trending-section::-webkit-scrollbar-track {
        background: #ddd;
        border-radius: 3px;
    }

    .trending-section::-webkit-scrollbar-thumb {
        background: var(--secondary-color);
        border-radius: 3px;
    }

.trending-title {
    position: sticky;
    top: 0;
    background: white;
    padding: 1rem;
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    z-index: 1;
}

.trending-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.trending-card {
    display: flex;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .trending-card:hover {
        transform: translateX(5px);
    }

    .trending-card img {
        width: 120px;
        height: 125px;
        object-fit: cover;
    }

    .trending-card .content {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .trending-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }





.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 2rem;
    max-width: 1024px;
    margin: 0 auto;
}

.article-card {
    display: flex;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .article-card:hover {
        transform: translateY(-5px);
    }

.card img {
    /*  width: 233px;
    height: 144px;*/
    object-fit: cover;
}

.card .content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.card p {
    color: #666;
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

    .meta small {
        color: #666;
    }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.source-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

    .source-info img {
        width: 16px;
        height: 16px;
        border-radius: 50%;
    }

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #666;
    transition: color 0.3s ease;
}

    .action-button:hover {
        color: var(--secondary-color);
    }

    .action-button.active {
        color: var(--secondary-color);
    }

.topic-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-article .topic-tag {
    margin-bottom: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}

.trending-card .topic-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

/* Modal */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1001;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5vh auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
}

.close-button {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    z-index: 100;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Article Detail Page */
.article-detail {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.article-header {
    margin-bottom: 2rem;
}

    .article-header img {
        width: 100%;
        height: 400px;
        object-fit: cover;
        border-radius: 5px;
        margin-bottom: 1rem;
    }

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .article-meta small {
        color: #666;
    }

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

    .article-content p {
        margin-bottom: 1.5rem;
    }

/* Topic Header Styles */
.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

    .topic-header h1 {
        font-size: 2.5rem;
        color: var(--primary-color);
        margin: 0;
    }

.follow-topic-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

    .follow-topic-btn:hover {
        background-color: #2980b9;
    }

    .follow-topic-btn svg {
        stroke: currentColor;
    }


/* Card Layout*/

.first-news-card {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background-color: #fff;
    max-width: 900px;
    border-radius: 8px;
    font-size: 1.5rem;
}

    .first-news-card img {
        width: 100%;
        height: 377px;
        object-fit: cover;
        border-radius: 0px;
    }

    .first-news-card h2 {
        font-size: 1.5rem;
    }

    .first-news-card:hover {
        cursor: pointer;
    }

.card-title,
.card-subtitle,
.card-topics {
    width: 100%;
}

    .card-title a {
        text-decoration: none;
        color: #000;
    }

/* Responsive Design */
@media (max-width: 767px) {

    .first-news-card {
        display: flex;
        flex-direction: column;
        padding: 8px;
        background-color: #fff;
        max-width: 767px;
        border-radius: 8px;
        font-size: 1.5rem;
    }

        .first-news-card img {
            width: 100%;
            height: 233px;
            object-fit: cover;
            border-radius: 0px;
        }

        .first-news-card h2 {
            font-size: 1.5rem;
        }
    
    
    h4.card-subtitle {
        display: none;
    }

    .news-card .card {
        flex-direction: column;
    }

    .card-text {
        flex: auto;
        padding: 0.5rem;
        min-width: 0; /* Prevent overflow */
        text-align: left;
    }

    .card-title {
        font-size: 1.25rem;
        line-height: 22px;
    }

    .card-subtitle {
        font-size: 0.95rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .card {
        flex-direction: column;
    }

    .card-image {
        width: 144px;
        height: 89px;
        object-fit: fill;
        margin-left:auto
       
    }

    .article-card img {
        width: 100%;
        height: 89px;
    }

    /*.hero-section {
        grid-template-columns: 1fr;
    }*/

    .trending-section {
        display: none;
    }

    .featured-article {
        height: 300px;
    }

    .nav-container {
        padding: 1rem;
    }



    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

        .nav-links.active {
            display: flex;
        }


    .logo-search {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.6rem;
        flex: 0 0 auto;
        font-weight: bold;
        color: var(--primary-color);
        white-space: nowrap;
        text-decoration: none;
        margin-left: 10px;
    }


    .search-container {
        flex: 1 1 100%;
        max-width: none;
        order: 2;
        margin: 0.5rem 0;
    }

        .search-container input {
            padding: 0.75rem 1rem;
            font-size: 1rem;
        }

    .menu-toggle {
        order: 1;
    }

    .trending-card {
        flex-direction: row;
    }

        .trending-card img {
            width: 100px;
            height: 100px;
        }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-header img {
        height: 300px;
    }

    .article-content {
        font-size: 1rem;
    }

    .topic-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

        .topic-header h1 {
            font-size: 2rem;
        }
}


#news-container-header {
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    color: rgb(37, 37, 37);
    /*background-color: #f5f5f5;*/
    height: 110px;
    text-align: center; /* Ensures multi-line text is centered */
    /*margin-top:160px; */
    margin-bottom: 5px;
    border-bottom: 2px solid black; /* Or choose any suitable color */
    background-color: #fef9e7;
}


    #news-container-header h1 {
        font-size: 2.0rem;
        line-height: 1.2;
        color: var(--primary-color);
        margin: 0;
        font-weight: bold;
        background-color: #fef9e7;
    }


.news-card .card {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    border: none;
    background-color: #fff;
    align-items: flex-start;
}

/* Text content area */
.card-text {
    flex: 1;
    padding: 0.5rem;
    min-width: 0; /* Prevent overflow */
    text-align: left;
}

/* Title and subtitle handling */
.card-title, .card-subtitle {
    word-break: break-word;
    overflow-wrap: break-word;
}


.caption {
    font-size: 0.95rem;
    color: #555;
    font-style: italic;
}


