:root {
    --header-height: 3rem;

    /* Colors */
    --firstcolor: #e42f0f;
    --firstcolor-alt: #e42f0f;
    --title-color: #393939;
    --text-color: #707070;
    --text-color-light: #A6A6A6;
    --body-color: #FBFEFD;
    --container-color: #FFFFFF;

    /* Font */
    --body-font: 'Poppins', sans-serif;
    --biggest-font-size: 2.25rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /* Font weight */
    --font-medium: 500;
    --font-semi-bold: 600;

    /* Margins */
    --mb-1: .5rem;
    --mb-2: 1rem;
    --mb-3: 1.5rem;
    --mb-4: 2rem;
    --mb-5: 2.5rem;
    --mb-6: 3rem;

    /* z index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* Base */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header & Nav */
.l-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--body-color);
}

.nav {
    max-width: 1024px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__menu {
    display: flex;
    align-items: center;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    color: var(--title-color);
    transition: .3s;
}

.nav__link:hover {
    color: var(--firstcolor);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown__menu {
    position: absolute;
    left: 0;
    top: 2.5rem;
    background-color: var(--container-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: .75rem 1rem;
    border-radius: .5rem;
    display: none;
}

.dropdown:hover .dropdown__menu {
    display: block;
}

.dropdown__link {
    color: var(--title-color);
    font-size: var(--small-font-size);
    display: block;
    padding: .5rem 0;
}

/* Section */
.section {
    padding: 4rem 0 2rem;
}

.section-title, 
.section-subtitle {
    text-align: center;
}

.section-title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    margin-bottom: var(--mb-3);
}

.section-subtitle {
    display: block;
    color: var(--firstcolor);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-1);
}

.bd-container {
    max-width: 1024px;
    width: calc(100% - 2rem);
    margin-left: var(--mb-2);
    margin-right: var(--mb-2);
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background-color: var(--container-color);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    padding: 0 2rem;
    max-width: 1024px;
    margin: 0 auto;
}

.footer__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__title {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    margin-bottom: var(--mb-2);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.footer__social-link {
    font-size: 1.25rem;
    color: var(--text-color);
    transition: .3s;
}

.footer__social-link:hover {
    color: var(--firstcolor);
}

.footer__copy {
    text-align: center;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-top: 3rem;
}

/* News Container */
.news__container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 10em;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

/* News Item */
.news__item {
    display: flex;
    flex-direction: column;
    background: var(--container-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    width: 100%;
}

.news__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Horizontal Image Gallery */
.news__images {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--firstcolor) #f0f0f0;
    justify-content: center;
}

.news__image-gallery {
    display: flex;
    justify-content: center;
    width: 100%;
}

.news__images::-webkit-scrollbar {
    height: 6px;
}

.news__images::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.news__images::-webkit-scrollbar-thumb {
    background-color: var(--firstcolor);
    border-radius: 10px;
}

.news__image-container {
    flex: 0 0 auto;
    width: 300px;
    height: 200px;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.news__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news__image:hover {
    transform: scale(1.05);
}

/* News Content */
.news__content {
    margin-top: 1rem;
}

.news__title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    margin-bottom: 0.5rem;
    font-weight: var(--font-semi-bold);
}

.news__date {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--normal-font-size);
    color: var(--firstcolor);
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.news__text {
    color: var(--text-color);
    line-height: 1.8;
    font-size: var(--normal-font-size);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .news__container {
        padding: 0 1rem;
    }

    .news__item {
        padding: 1.5rem;
    }

    .news__images {
        justify-content: flex-start;
    }

    .news__image-container {
        width: 250px;
        height: 180px;
    }

    .news__title {
        font-size: var(--h2-font-size);
    }
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: pointer;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 0.5rem;
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

/* Jika hanya satu gambar, pastikan tetap di tengah */
.news__image-container:only-child {
    margin: 0 auto;
}
