/* Root Variables */
:root {
    --primary-bg: #FFF;
    --main-bg: #ffffff;
    --header-bg: #333;
    --nav-bg: #eee;
    --headline-sidebar-bg: #fff;
    --footer-bg: #333;
    --text-light: #ffffff;
    --max-width: 1200px;
    --spacing-md: 12px;
}

/* General Styles */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%; 
    overflow-x: hidden;
}

body {
    background-color: var(--primary-bg);
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation Bar */
.navbar {
    width: 100%;
    background-color: var(--nav-bg);
    padding:0;
}

.navbar-content {
    margin: 0 auto;
    max-width: var(--max-width);
    width: 100%;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    border-right: 1px solid #ccc;
}

.navbar-nav a.active, .navbar-nav a:hover {
    color:#FFF !important;
    background-color: #dd0000;
}

.breaking-news {
    display:flex;
    background:#DD0000; 
    color:#fff; 
    padding:0.25rem 0.5rem;
    white-space: nowrap;
    font-weight: bold;
    border-radius: 2px 0 0 2px;
}

.marquee-section {
    display:flex;
    background:#333; 
    color:#eee; 
    padding:0.25rem 1rem;
    overflow:hidden;
    white-space: nowrap;
    flex:1;
}
/* Marquee Animation */
.marquee-wrapper {
    overflow: hidden; 
    mask: linear-gradient(90deg, #0000, #000 5% 95%, #0000); 
}

.marquee-track {
    display: flex;
    width: max-content; 
    animation: marquee-horizontal 30s linear infinite; 
    will-change: transform; 
}

@keyframes marquee-horizontal {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); } 
}

.marquee-content {
    padding-right: 0.5em; 
    padding-left: 0.5em;
    white-space: nowrap; 
}

.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}


/* Header Section */
header.page-header {
    background-color: var(--header-bg);
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

.header-top {
    display: flex;
    margin: 0 auto;
    max-width: var(--max-width);
}

.logo-section {
    flex: 1;
    padding: 3px 0;
}

.logo-section img {
    height: 100px;
}

.social-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-right: 1rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

.search-section {
    flex: 1;
    max-width: 250px;
}

/* Main Content */
.main-content {
    background-color: var(--main-bg);
    margin: 0 auto;
    padding: 0;
    max-width: var(--max-width);
    width: 100%;
}

.headline {
    background-color: var(--header-bg);
    margin:0;
    padding: 0;
}

.headline-content {
    margin: 10px auto;
    padding: 0;
    max-width: var(--max-width);
    width: 100%;
}

.headline-sidebar {
    background-color: var(--header-bg);
    margin:0;
    padding: 0;
}

.headline-sidebar h3 {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 0.5rem;
    
}

/* Carousel Section */
.carousel {
    margin-left:0;
    padding-left:0;
}

.carousel-img {
    height: 400px;
    object-fit: cover;
}

.carousel-date {
    display: inline-block;
   
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.carousel-caption {
    text-align: left;
    color: #fff;
    left: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,2);
}

/* Featured Section */
.center-section {
    padding: 0rem  1rem  1rem  1rem;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}


/* Featured Titles */
.featured-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.latest {
    padding-left: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}

/* Sidebar */
.sidebar-news {
    padding: 1rem;
}

.sidebar-news h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.sidebar-news ul {
    list-style: none;
    padding: 0;
}

.sidebar-news li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-news li:last-child {
    border-bottom: none;
}

.daerah {
    padding: 0rem 2rem 2rem 1.5rem;
}

/* List Group Styling */
.list-group {
    border: none;
}

.list-group-item {
    padding-left:0;
    border: none;
    border-bottom: 1px solid #ddd;
}

.list-group-item:last-child {
    border-bottom: none;
}

.category-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Footer */
.page-footer {
   background-color: var(--footer-bg);
    color: var(--text-light);
    padding: 40px 20px 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 auto;
    width: var(--max-width);
}

/* .footer-container {
     margin: 0 auto;
    width: var(--max-width);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
} */

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    margin-bottom: 10px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #aaa;
}

/* Blockquote Styling */
blockquote {
    font-style: italic;
    position: relative;
    margin: 1rem 0 0rem 0;
    padding: 1rem 2rem 1rem 2.5rem;
    background: #f4f4f4;
    border-radius: 5px;
    font-size: 1rem;
}

blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #dd0000;
    position: absolute;
    left: 5px;
    top: -10px;
    font-family: serif;
}

blockquote::after {
    content: '"';
    font-size: 4rem;
    color: #dd0000;
    position: absolute;
    right: 20px;
    bottom: -30px;
    font-family: serif;
}

/* News List Styling */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li a {
    color: #333;
    font-size: 0.95rem;
}

.news-list li a:hover {
    color: #dd0000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        justify-content: space-between; /* kiri & kanan */
        align-items: center; /* rata tengah vertikal */
    }

    .logo-section {
        font-size: 1.25rem;
    }

    .logo-section img {
        height: 75px;
    }

    .social-section {
        display: inline-block;
    }

    .social-section a {
        font-size: 1.5rem;
        color: var(--text-light);
        margin-left: 1rem;
    }

    .navbar-toggler {
        padding:0rem 0.5rem;
    }

    .search-section {
        display: none;
    }

    .navbar-search-mobile {
        flex: 1;
        padding:0.5rem 0;
        margin: 0 1rem 0 0;
    }

    .carousel-caption {
        left: 20px;
    }

    .carousel-img {
        height: 300px;
    }

    .breaking-news {
        margin-left: 10px;     
        padding:0.25rem 0.5rem;
        border-radius: 0;
        font-weight: normal;
    }

    .latest {
        padding-left:0.75rem;
    }

    .featured-title {
        font-size: 1.2rem;
        font-weight: normal;
        margin-bottom: 0.5rem;
    }

    .daerah-title {
        padding-left: 2.5rem;
    }

    .daerah {
        padding: 0rem 2rem 2rem 2.5rem;
    }

    .footer-container {
        width: 100%;
         grid-template-columns: 1fr;
        text-align: left;
    }

}
