@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

/* Light 200 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-light.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
}

/* Regular 400 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}


/* Medium 500 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}

/* Semibold 600 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
}

/* Bold 700 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}



body {
  margin: 0;
  font-family: 'SF Pro Rounded', sans-serif;
  background: white;
}

/* ==== DARK MODE CUSTOM ==== */
body.dark-mode {
  background: #001919 !important;
  color: #fff !important;
}

body.dark-mode .main-header {
  background: #000;
}

body.dark-mode .logo img {
  content: url('../assets/logo-dark.png'); 
  height: 64px;
}

body.dark-mode .search-mask-path {
  fill: #045F57; /* warna saat dark mode */
}

body.dark-mode .search-custom {
  color: #FFFFFF /* warna saat dark mode */
}

body.dark-mode .info,
body.dark-mode .info span {
  color: #fff !important;
}

body.dark-mode .main-nav {
  background: #000 !important;
  border-top: 1px solid #333 !important; /* biar ada pembatas tipis */
}


body.dark-mode .main-nav li {
  color: #34AFA4 !important;
}

body.dark-mode #locationBtn {
  color: #FFFFFF !important;
}

body.dark-mode #updateTime {
  color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode #weather {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* icon action */
body.dark-mode .actions button img[alt="Home"] {
  content: url("../assets/home_dark.png");
}

body.dark-mode .actions .login-button img {
  content: url("../assets/profil-dark.png");
}

body.dark-mode .actions .login-container span {
  color: #34AFA4 !important;
}

body.dark-mode .actions button.menu-toggle img {
  content: url("../assets/hamburger.png");
}

body.dark-mode .beritaRekomendasi-link {
  color:  rgba(255, 255, 255, 0.7) !important;
}


/* Reset dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'SF Pro Rounded', sans-serif;
}

/* ===== HEADER DEFAULT ===== */
.main-header {
  width: 100%;
  border-bottom: 1px solid #e0e0e0;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: all 0.4s ease; /* animasi halus */
}

/* Space iklan */
.container_iklan {
  width: 100%;
  height: 150px;
  background: #EFEFEF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.hide-iklan {
  height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
}



/* Header dalam keadaan normal */
.container-header {
  width: 100%;
  max-width: 1500px;
  margin: auto;
  display: flex;
  align-items: center;
  padding: 15px 100px; /* default */
  transition: all 0.4s ease;
}

/* ===== SAAT SCROLL ===== */
.main-header.header-scrolled .container_iklan {
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.main-header.header-scrolled .container {
  padding: 25px 100px; /* header jadi agak lebar atasnya */
}

.main-header.header-scrolled {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* efek melayang */
}



.logo-wrapper {
  position: relative;
  top: 40px;
  padding: 5px 0;
  margin-right: 80px;
  margin-left: -20px; 
}

.logo {
  display: flex;
  align-items: left;
  color: #004d40;
  font-weight: bold;
  
}

.logo img {
  height: 64px;
  
 
}

.search-custom {
  font-family: 'SF Pro Rounded', sans-serif;
  position: relative;
  width: 100%;
  max-width: 440px; /* lebih kecil */
  height: 35px;     /* lebih pendek */
  color: #004d40;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
  margin-right: 30px;
}

.search-custom input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;   /* lebih kecil */
  color: #004d40;
  z-index: 2;
}

.search-custom input::placeholder {
  font-weight: 500;
  color: #004d40;
  opacity: 0.5;

}

.search-custom button {
  background: none;
  border: none;
  color: #004d40;
  font-size: 15px;  /* lebih kecil */
  cursor: pointer;
  padding: 0;
  z-index: 2;
  opacity: 0.5;
}

.search-custom .search-mask {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.highlight-search {
  background-color: #fff8c4;
  transition: background-color 0.6s ease;
}

.info {
  font-family: 'SF Pro Rounded', sans-serif;
  font-weight: 200;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 14px;
  color: #045F57;
}

/* Cuaca box */
.cuaca-box {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #2f4f4f;
  flex-wrap: nowrap; /* pastikan tetap sejajar */
}

/* Lokasi & teks */
.cuaca-box .lokasi {
  font-weight: 600;
  white-space: nowrap;
}

/* Separator & teks lainnya */
.cuaca-box span {
  font-weight: 400;
  font-size: 14px;
  color: rgba(15,76,60,0.7);
  white-space: nowrap;
}

/* Icon wrapper supaya selalu saklek */
.cuaca-box span img.ikon {
  width: 23px;       /* ukuran fixed */
  height: 23px;      /* ukuran fixed */
  object-fit: contain; /* supaya proporsional */
  display: block;
  flex-shrink: 0;     /* jangan mengecil */
  vertical-align: middle;
}


.lokasi { 
  font-weight: 500; 
}
    
.ikon { 
  width: 22px; 
  height: 22px; 
  vertical-align: middle; 
} 


.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 27px;
  position: relative;
}

.actions button,
.actions a {
  font-size: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0; /* reset sebelumnya */
  padding: 4px;
}


.actions button img,
.actions a img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}


.actions .live {
  border: 1px solid #df1e1e;
  color: #045F57;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.actions .live img {
  height: 14px;
  width: auto;
}


.actions .fa-home,
.actions .fa-user-circle,
.actions .fa-bars {
  font-size: 16px;
  cursor: pointer;
}

/* Atur ukuran ikon biar seimbang */
.actions img {
  height: 22px;
}

.actions #themeToggle img {
  height: 25px;
  cursor: pointer;
}

.actions #login img {
  height: 25px;
  cursor: pointer;
  margin-left: 10px;
}

.header-login {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-login .login img,
.header-login .user-pic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.header-login .user-profile {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 16px;
  color: #333;
}

.header-login .user-profile:hover {
  color: #007bff;
}

.actions a.user-icon img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 10px;
}

/* General Avatar Style */
.user-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #ddd;
  transition: transform 0.2s ease;
  margin-left: 13px;
  margin-right: 13px;
}
.user-avatar:hover img {
  transform: scale(1.05);
}

/* Login Container */
.login-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* ===== POPUP LOGIN ===== */
.login-popup {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  width: 320px;
  z-index: 999;
  overflow: hidden;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.login-popup.active {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

/* ===== POPUP CARD ===== */
.popup-card {
  padding: 32px 24px;
  text-align: center;
  font-family: 'Inter', sans-serif;
}

/* ===== HEADER ===== */
.popup-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.popup-subtext {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ===== GOOGLE LOGIN BUTTON ===== */
.google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 19px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  font-weight: 500;
  font-size: 15px;
  color: #333;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.google-login img {
  width: 22px;
  height: 22px;
}

.google-login:hover {
  background-color: #f5f5f5;
  border-color: #d1d1d1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.main-nav {
  width: 100%;
  background: #fff;
  border-top: 1px solid #e0e0e0;
}

.main-nav a {
  color: inherit;
  text-decoration: none;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 8px 0;
  gap: 37px;
  padding-left: 298px;
}

.main-nav li {
  font-size: 13px;
  color: #045F57;
  font-family: 'SF Pro Rounded', sans-serif;
  font-weight: 500; /* Semibold */
  cursor: pointer;
  transition: color 0.3s;
  white-space: nowrap;
  padding-right: 37px; /* spasi sebelum garis */
  border-right: 1px solid #ccc; /* garis pemisah */
}

.main-nav li:last-child {
  border-right: none; /* hilangkan garis di menu terakhir */
}

.main-nav li:hover {
  color: #0c7c5c;
}

.main-nav img {
  margin-top: -13px;
  height: 23px;
  vertical-align: middle;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle img {
  height: 22px;
  margin-left:10px;
}

.hamburger-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none !important;
  z-index: 998;
}

.hamburger-menu {
  position: absolute;
  top: 100%; /* langsung di bawah tombol */
  right: 0;
  background-color: #2a5f52;
  color: white;
  width: 400px;
  padding: 18px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s ease;
  z-index: 999;
}

.hamburger-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


.hamburger-overlay.show {
  display: block;
}

.hamburger-content h4 {
  margin-top: 20px;
  font-size: 16px;
  font-weight: bold;
  border-bottom: 1px solid #aaa;
  padding-bottom: 6px;
}

.hamburger-content ul {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

.hamburger-content ul li {
  margin: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.hamburger-content .divider {
  height: 1px;
  background-color: #aaa;
  margin: 16px 0;
}

.hamburger-content a {
  color: inherit;
  text-decoration: none;
}

/* Tombol close modern */
.hamburger-content .close-menu-text {
  display: none !important;;
  width: 100%;
  padding: 14px 20px;
  margin-top: 20px;
  border: none;
  background: transparent !important; /* paksa transparan */
  color: #fff !important;             /* paksa teks putih */
  font-size: 16px;
  font-weight: 500;
  display: flex;                      /* aktifkan flex */
  justify-content: flex-end;          /* geser isi ke kanan */
  align-items: center;
  cursor: pointer;
  transition: color 0.3s ease;
}

.hamburger-content .close-menu-text i {
  margin-left: 8px; /* biar panah ada di kanan teks */
}

.hamburger-content .close-menu-text:hover {
  color: #ffd369 !important;
}

.location-wrapper {
  position: relative;
  font-size: 14px;
  color: #fff;
}

#locationBtn {
  background: none;
  border: none;
  color: #045F57;
  font-family: 'SF Pro Rounded', sans-serif;
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

#updateTime {
  color: ;
}

.location-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background-color: #2a5f52;
  color: white;
  padding: 20px 24px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 280px;
  display: none;
  z-index: 999;
}

.location-dropdown.open {
  display: block;
}

.dropdown-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
}

.dropdown-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, #00b5ad, #ccc);
  margin-bottom: 12px;
}

.city-list {
  display: flex;
  justify-content: space-between;
}

.city-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.city-list li {
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 14px;
}

.city-list li:hover {
  text-decoration: underline;
}




/* default desktop */
.container-header .search-custom,
.container-header .info {
  display: flex;
}
.hamburger-menu .search-custom,
.hamburger-menu .info,
.hamburger-menu .cuaca-box {
  display: none;
}

/* ===== Desktop ===== */
@media screen and (min-width: 1025px) {
  /* Info di header desktop */
  .container-header .info {
    display: flex;
    font-size: 13px;
    color: #045F57;
    align-items: center;
    gap: 6px;
  }

  /* Info di hamburger tetap tersembunyi */
  .hamburger-menu .info {
    display: none;
  }
}

/* ========== TABLET & MOBILE: info di toggle putih ========== */
/* Hamburger menu info, tablet & mobile */
@media screen and (max-width: 1024px) {
  .hamburger-menu .info {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    margin-top: 20px;
  }

  .hamburger-menu .cuaca-box {
    display: flex !important;
    color: #fff !important;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 0;
    padding: 10px;
    gap: 6px;
  }

  .hamburger-menu .cuaca-box span,
  .hamburger-menu .cuaca-box .lokasi,
  .hamburger-menu .info span,
  .hamburger-menu .info img {
    color: #fff !important;
    white-space: nowrap;
  }
}


/* ========== RESPONSIVE UNTUK TABLET ========== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  
  /* Header container */
  .container-header {
    padding: 12px 40px; /* lebih rapat kiri-kanan */
  }

  /* Logo */
  .logo-wrapper {
    top: 20px;          /* turunin biar proporsional */
    margin-right: 40px; /* jarak ke elemen lain lebih kecil */
    margin-left: 0;
  }

  .logo img {
    margin-left: 40px;
    height: 44px; /* perkecil logo */
  }
  
  body.dark-mode .logo img {
   height: 44px;
  }

  /* Search bar */
  .search-custom {
    max-width: 360px;
    height: 32px;
    margin-right: 30px;
  }

  .search-custom input {
    font-size: 12px;
  }

  .search-custom button {
    font-size: 14px;
  }

  /* Info cuaca / jam */
 /* Info di header desktop disembunyikan */
  .container-header .info {
    display: none;
  }

  /* Info di hamburger muncul */
  .hamburger-menu .info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    margin-top: 20px;
  }

  .hamburger-menu .cuaca-box {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    color: #fff;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 0;
    padding: 10px;
  }

  .hamburger-menu .cuaca-box span,
  .hamburger-menu .cuaca-box .lokasi,
  .hamburger-menu .info span,
  .hamburger-menu .info img {
    color: #fff;
    white-space: nowrap;
  }

  /* Actions (icon kanan) */
  .actions {
    gap: 20px;
    margin-left: 40px;
  }

  .actions button,
  .actions a {
    font-size: 11px;
    gap: 9px;
    padding: 3px;
  }

  .actions button img,
  .actions a img {
    width: 22px;
    height: 22px;
  }

  .actions .live {
    font-size: 11px;
    padding: 2px 6px;
  }

  /* Avatar / login */
  .user-avatar img {
    width: 30px;
    height: 30px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .header-login .login img,
  .header-login .user-pic {
    width: 26px;
    height: 26px;
  }

  /* Main nav */
  .main-nav ul {
    gap: 12px;
    padding-left: 200px; /* biar nggak terlalu jauh */
  }

  .main-nav li {
    font-size: 12px;
    padding-right: 14px;
  }

  .main-nav img {
    height: 20px;
    margin-top: -10px;
  }

  /* Dropdown lokasi */
  .location-dropdown {
    width: 220px;
    padding: 16px 18px;
  }
  .dropdown-title {
    font-size: 14px;
  }
  .city-list li {
    font-size: 13px;
  }
}


/* ========== MOBILE HEADER ========== */
@media (max-width: 768px) {
  /* Header lebih ringkas */
  .container-header {
    padding: 10px 15px;
    justify-content: space-between;
  }

  /* Logo pindah ke kiri atas */
  .logo-wrapper {
    position: static;
    margin: 0;
  }
  .logo img {
    height: 40px;
  }
  
   body.dark-mode .logo img {
   height: 40px;
  }

  /* Hilangkan elemen yg bikin penuh */
  .search-custom,
  .info {
    display: none !important;
  }

  /* Actions → jadi sejajar kanan */
  .actions {
    gap: 12px;
    margin: 0;
  }
  .actions .fa-home,
  .actions #themeToggle img,
  .actions .fa-bars {
    font-size: 18px;
  }

  /* Navbar scroll horizontal */
  .main-nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* biar smooth di iOS */
  }

  .main-nav ul {
    justify-content: flex-start;
    gap: 16px;
    padding: 8px 12px;
    margin: 0;
  }

  .main-nav li {
    border-right: none; /* jangan pakai garis di mobile */
    padding-right: 0;
    flex: 0 0 auto; /* biar nggak ngecil */
  } /* <<< ini yang tadi hilang */

  /* bikin hamburger full screen */
/* sembunyiin versi desktop */
  .container-header .search-custom,
  .container-header .info {
    display: none !important;
  }

  /* tampilkan versi toggle */
  .hamburger-menu .search-custom {
    display: flex !important;
  }

   /* Info di hamburger muncul */
  .hamburger-menu .info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    margin-top: 20px;
  }

  .hamburger-menu .cuaca-box {
    display: flex;
    flex-wrap: wrap; /* wrap otomatis kalau sempit */
    gap: 4px;
    color: #fff;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 0;
    padding: 8px;
  }

  .hamburger-menu .cuaca-box span,
  .hamburger-menu .cuaca-box .lokasi,
  .hamburger-menu .info span,
  .hamburger-menu .info img {
    color: #fff;
    white-space: nowrap;
  }

  .hamburger-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: #2a5f52;
    padding: 20px;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 9999;
  }

  .hamburger-menu.open {
    transform: translateY(0);
  }

  .hamburger-menu .search-custom {
    margin-bottom: 20px;
    height: 40px;
  }

 /* Info di toggle mobile → putih */

  .close-menu {
    display: flex;
  }

    .hamburger-menu .close-menu-text {
    display: flex !important;
    color: #fff !important;
    justify-content: flex-end;
    align-items: center;
    font-size: 16px;
  }
}