/* ===== BASE STYLES ===== */
body {
    font-family: "Prompt", sans-serif;
    color: #333;
    background-color: #f5f5f5;
}

/* ===== LAYOUT ===== */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

.popularTags h1 {
    font-size: 1.75rem; /* lebih besar */
    font-weight: 700; /* bold */
}

/* ===== COMPONENTS ===== */
/* Topbar */
.topbar {
    background-color: white;
    color: black;
    padding: 8px 0;
    font-size: 14px;
}

.logo-area {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
}

.logo-area img {
    max-height: 50px;
}

/* Navigation styling */
.main-menu {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mengurangi padding dan membuat teks bold */
.navbar-nav .nav-link {
    font-weight: 700 !important; /* Teks bold */
}

/* Untuk dropdown items */
.dropdown-item {
    font-weight: 600 !important; /* Sedikit lebih ringan dari menu utama */
}

.navbar-dark .navbar-nav .nav-link {
    color: #333;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
    font-weight: 700 !important; /* Pastikan teks active tetap bold */
}

.navbar-dark .navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px 3px 0 0;
}

/* Dropdown active states */
.dropdown-item.active {
    background-color: #ffffff;
    color: white !important;
}

/* Search icon styling */
#toggleSearch {
    color: #333;
}

#toggleSearch:hover {
    color: #ffffff;
}

/* User dropdown styling */
.nav-link i.fa-user-circle,
.nav-link i.fa-user {
    color: #333;
    transition: color 0.3s;
}

.nav-link:hover i.fa-user-circle,
.nav-link:hover i.fa-user,
.nav-link.active i.fa-user-circle,
.nav-link.active i.fa-user {
    color: #ffffff;
}
/* Breaking News */
.breaking-news {
    background-color: #f8f9fa;
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.breaking-news-label {
    background-color: #c2272d;
    color: white;
    padding: 3px 10px;
    font-weight: bold;
    margin-right: 10px;
}

/* Post Cards */
.post-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.post-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.post-img img {
    width: 100%;
    max-width: 100%;
    min-width: 280px;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 8px;
}

.post-category {
    color: #c2272d;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-weight: 500;
    font-size: 12px;
    margin: 8px 0;
    color: #212529;
}

.post-meta {
    font-size: 13px;
    color: #6c757d;
}

/* Widgets
.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #c2272d;
    text-transform: uppercase;
} */

/* Footer */
.footer {
    background-color: #212529;
    color: white;
    padding: 40px 0 20px;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links li {
    margin: 0 15px 10px;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    color: grey;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: #c2272d;
}

/* ===== UTILITIES ===== */
.hr-dashed {
    border-top: 1px dashed #dee2e6;
    opacity: 0.6;
}

.trending-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #c2272d;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ===== MEDIA QUERIES ===== */
/* Extra small devices (phones, 360px and down) */

@media (max-width: 360px) {
    .post-img img {
        max-height: 200px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .post-img img {
        max-height: 250px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .post-img img {
        max-height: 300px;
    }

    .post-title {
        font-size: 20px;
        font-weight: 600;
    }
}

.news-thumb {
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
    height: auto;
}

@media (min-width: 768px) {
    .news-thumb {
        width: 284px;
        height: 132px; /* Ukuran tetap di desktop */
        flex-shrink: 0; /* Supaya tidak mengecil */
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .post-img img {
        max-height: 350px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .post-img img {
        max-height: 400px;
    }
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .navbar-nav {
        flex-direction: column;
        padding-left: 0;
        padding-right: 0;
    }

    .navbar-nav .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 15px;
        color: #333;
        transition: background 0.2s, color 0.2s;
    }

    .navbar-nav .nav-link:hover {
        background-color: #f8f9fa;
        color: #000;
    }

    .post-card {
        flex-direction: column;
    }

    .post-img {
        max-width: 100%;
        height: 200px;
    }
}

/* Featured News Carousel */
@media (max-width: 768px) {
    #featuredNews .carousel-item img {
        height: 300px !important;
    }

    #featuredNews .position-absolute {
        padding: 1rem !important;
    }

    #featuredNews h3 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }

    #featuredNews p {
        display: none;
    }

    #featuredNews .text-white-50 {
        font-size: 0.8rem !important;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 30px !important;
        height: 30px !important;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Category Headline */
@media (max-width: 768px) {
    .card.category-headline {
        border-radius: 0 !important;
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }

    .card.category-headline img {
        height: 280px !important;
        object-position: center;
    }

    .category-headline .position-absolute {
        padding: 1rem !important;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9),
            transparent
        ) !important;
    }

    .category-headline .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .category-headline .h3 {
        font-size: 1.2rem !important;
        line-height: 1.3;
        margin-bottom: 0.5rem !important;
    }

    .category-headline p {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 0.5rem !important;
    }

    .category-headline .text-white-50.small {
        font-size: 0.7rem !important;
    }
}

.toast {
    transition: all 0.3s ease;
}

.comment-item {
    transition: all 0.2s ease;
}

.comment-item:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.replies {
    border-left: 2px solid #dee2e6 !important;
}

@media (max-width: 576px) {
    .replies {
        margin-left: 1rem;
        padding-left: 1rem !important;
    }
}
