* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #FCF8F8;
  color: #000;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  height: 80px;
  background-color: #FCF8F8;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  margin-left: 20px;
  text-decoration: none;
  color: #000;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 18px;
}

.nav-links a:hover {
  background-color: rgba(0,0,0,0.08);
  color: #000;
}

/* Logo fixed size */
.logo img {
  height: 70px;
  width: auto;
  display: block;
  transition: none;
  object-fit: contain;
  max-width: none;
}

/* biar responsiv */
@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    height: 80px;
    padding: 15px 20px;
    gap: 0;
    position: fixed;
    left: 0;
    right: 0;
  }
  
  .logo img {
    height: 50px;
  }
  
  .nav-links {
    margin-top: 0;
    margin-left: auto;
  }
  
  .nav-links a {
    margin: 0 5px;
    padding: 6px 12px;
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .navbar {
    height: 70px;
    padding: 10px 15px;
    position: fixed;
    left: 0;
    right: 0;
  }
  
  .logo img {
    height: 40px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
  }
  
  .nav-links a {
    margin: 2px 3px;
    padding: 4px 8px;
    font-size: 15px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .logo img {
    height: 60px;
  }
}

@media (min-width: 1025px) {
  .logo img {
    height: 70px;
  }
}

.nav-link {
  cursor: pointer;
  font-weight: 500;
  color: #000;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 2px solid #000;
  min-width: 160px;
  display: none;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #000;
  font-size: 17px;
}

.dropdown-menu a:hover {
  background: #000000;
  color: #fff;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

/* NEWS PAGE STYLES */

/* BACKGROUND IMAGE CLASSES - TAMBAHKAN GAMBAR DI SINI */
.news-section-bg {
    /* TAMBAHKAN BACKGROUND IMAGE UNTUK NEWS SECTION */
    /* Contoh: background-image: url('../GambarFE/news-section-bg.jpg'); */
    /* Contoh: background-size: cover; */
    /* Contoh: background-position: center; */
    /* Contoh: background-attachment: fixed; */
    background-color: #FCF8F8; /* Default background color */
}

.news-title-bg {
    /* TAMBAHKAN BACKGROUND IMAGE UNTUK NEWS TITLE */
    /* Contoh: background-image: url('../GambarFE/news-title-bg.jpg'); */
    /* Contoh: background-size: cover; */
    /* Contoh: background-position: center; */
    background-color: transparent; /* Default transparent */
}

.news-wrapper-bg {
    /* TAMBAHKAN BACKGROUND IMAGE UNTUK NEWS WRAPPER */
    /* Contoh: background-image: url('../GambarFE/news-wrapper-bg.jpg'); */
    /* Contoh: background-size: cover; */
    /* Contoh: background-position: center; */
    background-color: transparent; /* Default transparent */
}

.news-track-bg {
    /* TAMBAHKAN BACKGROUND IMAGE UNTUK NEWS TRACK */
    /* Contoh: background-image: url('../GambarFE/news-track-bg.jpg'); */
    /* Contoh: background-size: cover; */
    /* Contoh: background-position: center; */
    background-color: transparent; /* Default transparent */
}

.news-card-bg {
    /* TAMBAHKAN BACKGROUND IMAGE UNTUK NEWS CARD */
    /* Contoh: background-image: url('../GambarFE/news-card-bg.jpg'); */
    /* Contoh: background-size: cover; */
    /* Contoh: background-position: center; */
    background-color: #fff; /* Default background color */
}

.footer-bg {
    /* TAMBAHKAN BACKGROUND IMAGE UNTUK FOOTER */
    /* Contoh: background-image: url('../GambarFE/footer-bg.jpg'); */
    /* Contoh: background-size: cover; */
    /* Contoh: background-position: center; */
    /* Contoh: background-attachment: fixed; */
    background-color: #000; /* Default background color */
}

/* NEWS SECTION */
.news-section {
    min-height: calc(100vh - 80px);
    padding: 60px 20px 80px 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-title {
    font-size: 38px;
    margin-bottom: 40px;
    text-align: center;
    font-weight: bold;
    color: #000;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
}

/* WRAPPER */
.news-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    position: relative;
}

/* TRACK */
.news-track {
    display: flex;
    gap: 30px;
    width: max-content;
    justify-content: center;
}

/* CARD */
.news-card {
    width: 320px;
    height: 420px;
    border: 2px solid #000;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* IMAGE */
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid #000;
}

/* CONTENT */
.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
    text-align: left;
    line-height: 1.3;
}

.news-content p {
    font-size: 19px;
    line-height: 1.5;
    text-align: left;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
}

.news-date {
    display: block;
    margin-top: 10px;
    font-size: 15px;
    color: #666;
    text-align: right;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .news-section {
        padding: 40px 15px 60px 15px;
    }
    
    .news-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .news-wrapper {
        max-width: 100%;
    }
    
    .news-track {
        justify-content: flex-start;
        gap: 20px;
    }
    
    .news-card {
        width: 280px;
        height: 380px;
    }
    
    .news-card img {
        height: 160px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-content h3 {
        font-size: 22px;
    }
    
    .news-content p {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: 30px 10px 50px 10px;
    }
    
    .news-title {
        font-size: 29px;
        margin-bottom: 25px;
    }
    
    .news-track {
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        width: max-content;
    }
    
    .news-card {
        width: 280px;
        height: 380px;
    }
    
    .news-card img {
        height: 160px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-content h3 {
        font-size: 19px;
    }
    
    .news-content p {
        font-size: 17px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

.news-wrapper {
    scroll-behavior: smooth;
    cursor: grab;
}

.news-wrapper::-webkit-scrollbar {
    height: 8px;
}

.news-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.news-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.news-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Add scroll hint for mobile */
.news-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 480px) {
    .news-wrapper::after {
        width: 20px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - INTEGRATED
   ======================================== */

/* MOBILE (480px ke bawah) */
@media (max-width: 480px) {
    /* NAVBAR */
    .navbar {
        height: 60px;
        padding: 10px 15px;
        flex-wrap: nowrap;
        position: fixed;
        left: 0;
        right: 0;
    }
    
    .logo img {
        height: 35px;
        width: auto;
    }
    
    .nav-links {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .nav-links a {
        font-size: 11px;
        padding: 6px 10px;
        margin: 0 2px;
        text-decoration: none;
        color: #000;
        background: rgba(0,0,0,0.05);
        border-radius: 4px;
        transition: background-color 0.3s ease;
        white-space: nowrap;
        min-height: 36px;
        display: flex;
        align-items: center;
    }
    
    .nav-links a:hover {
        background-color: rgba(0,0,0,0.1);
    }
    
    /* NEWS SECTION */
    .news-section {
        padding: 30px 15px;
        min-height: calc(100vh - 60px);
        background: #FCF8F8;
    }
    
    .news-title {
        font-size: 20px;
        margin-bottom: 25px;
        text-align: center;
        padding: 15px 10px;
        border-radius: 12px;
        background: #fff;
        border: 2px solid #000;
        color: #000;
        display: inline-block;
    }
    
    .news-wrapper {
        padding: 0;
        overflow: visible;
    }
    
    .news-track {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 0;
        width: 100%;
        overflow: visible;
    }
    
    /* NEWS CARD */
    .news-card {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        background: #fff;
        border: 2px solid #000;
    }
    
    .news-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    .news-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 0;
        display: block;
    }
    
    .news-content {
        padding: 15px;
        text-align: left;
        background: #fff;
    }
    
    .news-content h3 {
        font-size: 19px;
        margin-bottom: 10px;
        line-height: 1.3;
        color: #000;
        font-weight: 600;
    }
    
    .news-content p {
        font-size: 17px;
        line-height: 1.5;
        color: #333;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .news-date {
        font-size: 15px;
        color: #666;
        display: block;
        text-align: right;
        padding-top: 8px;
        border-top: 1px solid #eee;
        font-style: italic;
    }
    
    /* EMPTY STATE */
    .news-track:empty::before {
        content: "Belum ada berita tersedia.";
        display: block;
        text-align: center;
        padding: 40px 20px;
        color: #666;
        font-size: 17px;
        background: #fff;
        border: 2px solid #000;
        border-radius: 12px;
    }
    
    /* FOOTER */
    .footer {
        background: #000;
        color: #fff;
        text-align: center;
        padding: 20px 15px;
    }
    
    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .footer-logo img {
        height: 25px;
        width: auto;
    }
    
    .footer-copyright p {
        font-size: 15px;
        margin: 0;
        color: #ccc;
    }
}

/* TABLET (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .navbar {
        height: 70px;
        padding: 15px 20px;
        position: fixed;
        left: 0;
        right: 0;
    }
    
    .logo img {
        height: 45px;
    }
    
    .nav-links a {
        font-size: 15px;
        padding: 8px 14px;
        margin: 0 4px;
    }
    
    .news-section {
        padding: 40px 20px;
        min-height: calc(100vh - 70px);
    }
    
    .news-title {
        font-size: 29px;
        margin-bottom: 30px;
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .news-wrapper {
        padding: 0 10px;
    }
    
    .news-track {
        gap: 25px;
    }
    
    .news-card {
        max-width: 100%;
        border-radius: 15px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    }
    
    .news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }
    
    .news-card img {
        height: 200px;
        border-radius: 0;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-content h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .news-content p {
        font-size: 18px;
        line-height: 1.6;
        -webkit-line-clamp: 4;
    }
    
    .news-date {
        font-size: 16px;
        padding-top: 10px;
    }
    
    .footer {
        padding: 25px 20px;
    }
    
    .footer-logo img {
        height: 28px;
    }
    
    .footer-copyright p {
        font-size: 16px;
    }
}

/* DESKTOP (769px+) - PRESERVE ORIGINAL */
@media (min-width: 769px) {
    /* Desktop styles already exist in original CSS */
}

/* LANDSCAPE MODE */
@media (max-width: 896px) and (orientation: landscape) {
    .news-section {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .news-title {
        font-size: 22px;
        margin-bottom: 20px;
        padding: 12px 15px;
        border-radius: 10px;
    }
    
    .news-track {
        gap: 15px;
    }
    
    .news-card img {
        height: 150px;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .news-content h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }
    
    .news-content p {
        font-size: 16px;
        -webkit-line-clamp: 2;
    }
    
    .news-date {
        font-size: 11px;
        padding-top: 6px;
    }
}

/* NEWS MODAL */
.news-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: 2px solid #000;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #000;
    float: right;
    font-size: 38px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.1);
}

#modal-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.modal-text {
    padding: 30px;
}

.modal-text h3 {
    font-size: 29px;
    margin-bottom: 20px;
    color: #000;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.modal-text p {
    font-size: 19px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

.modal-text small {
    font-size: 16px;
    color: #666;
    display: block;
    text-align: right;
    font-style: italic;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    #modal-image {
        max-height: 300px;
    }

    .modal-text {
        padding: 20px;
    }

    .modal-text h3 {
        font-size: 24px;
    }

    .modal-text p {
        font-size: 17px;
    }

    .close-modal {
        font-size: 32px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5% auto;
        max-height: 90vh;
    }

    #modal-image {
        max-height: 250px;
    }

    .modal-text {
        padding: 15px;
    }

    .modal-text h3 {
        font-size: 20px;
    }

    .modal-text p {
        font-size: 16px;
    }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    .news-card:hover {
        transform: none;
    }

    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }

    .news-modal {
        animation: none;
    }

    .modal-content {
        animation: none;
    }
}

/* FIX COMMON MOBILE ISSUES */
@media (max-width: 480px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    @supports (-webkit-touch-callout: none) {
        .news-section {
            min-height: -webkit-fill-available;
        }
    }
    
    @supports (padding: max(0px)) {
        .navbar {
            padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right));
        }
    }
}

/* TOUCH OPTIMIZATIONS */
@media (hover: none) and (pointer: coarse) {
    .news-wrapper {
        scroll-snap-type: y mandatory;
    }
    
    .news-card {
        scroll-snap-align: start;
    }
    
    .news-card {
        min-height: 44px;
    }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }