/* -------- Global Reset -------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

/* -------- Global Variables -------- */
:root {
  --white: #fff;
  --text-color: #000000;
  --primary-color: #000;
  --secondary-color: #272B2F;
  --ui-bg: #fff;
}

/* -------- Page Layout Setup -------- */
html, body {
  height: 100%;
}

body {
  background-color: var(--ui-bg);
  color: var(--text-color);
}

button{
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 18px;
  height: 50px;
  width: 200px;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 20px;
  cursor: pointer;
}

button:hover{
  background: var(--secondary-color)
}

.wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* -------- Navigation Bar -------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: var(--primary-color);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navigation-bar {
  max-width: 1300px;
  height: 100%;
  margin: auto;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navigation-bar a {
  color: var(--white);
  text-decoration: none;
  font-size: 18px;
  opacity: 0.75;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
}

.nav-links li {
  list-style: none;
  margin: 0 8px;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.title-page-area{
  font-size: 30px;
  font-weight: 600;
  opacity: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  cursor: default;
  user-select: none;
}

#titleLink{
  font-size: 30px;
  font-weight: 600;
  opacity: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  cursor: pointer;
  user-select: none;
}

.page-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary-color);
}

/* -------- Appearance Area Style -------- */
.accessory-area {
  display: flex;
  align-items: center;
}

.location-btn, .dark-mode-btn {
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: var(--white);
  border-radius: 6px;
  font-size: 20px;
  text-align: center;
  line-height: 50px;
  cursor: pointer;
  margin-left: 10px;
  opacity: 0.8;
}

.location-btn:hover, .dark-mode-btn:hover {
  opacity: 1;
}

/* -------- Page Content Style -------- */
.content {
  flex: 1;
  padding-top: 50px;
}

/* -------- Main Section Style -------- */
.page-content {
  margin-top: 70px;
  padding: 0 60px;
  background: var(--ui-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  margin-bottom: 40px;
}

.color-text {
  color: var(--primary-color);
}

.page-content-title{
  font-size: 30px;
  margin-top: 40px;
  margin-bottom: 10px;
}

.page-content p {
  font-size: 16px;
  max-width: 700px;
  margin: 20px 0 30px;
}

.date-time-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;           
}

.date-time-wrapper p {
  text-align: center; 
  margin: 5px 0;      
}

/* -------- Box Style -------- */

.box-container{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(370px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 1200px;
  margin-top: 15px;
}

.box{
  background: var(--bg-ui);
  border: 1px solid gray;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  color: var(--text-color);
  justify-content: center;
  text-align: center;
  opacity: 1;
}

.note {
  display: block;
  margin-top: 6px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.6;
  font-style: italic;
}

/* -------- Local and Global News Style -------- */

/* -- Local -- */

.local-news-text-container {
  margin-top: 15px;
  margin-bottom: 20px;
  width: 250px;         
  margin-left: auto;    
  margin-right: auto;
}

.local-news-text-ui {
  position: relative; 
  height: 40px;         
  overflow: hidden; 
  color: #fff; 
  background-color: var(--bg-ui); 
  border: 2px solid #ccc;   
  border-radius: 12px;
  display: flex;
  align-items: center;     
}

.local-news-text-ui .local-news-text {
  position: relative;
  left: 0;
  white-space: nowrap;
  color: var(--text-color);
  font-size: 16px;
  font-weight: 500;
  transition: left linear;
  padding: 0 15px;
  margin: 0;
}

/* -- Global -- */

.global-news-text-container {
  margin-top: 15px;
  margin-bottom: 20px;
  width: 250px;         
  margin-left: auto;    
  margin-right: auto;
}

.global-news-text-ui {
  position: relative; 
  height: 40px;         
  overflow: hidden; 
  color: #fff; 
  background-color: var(--bg-ui); 
  border: 2px solid #ccc;   
  border-radius: 12px;
  display: flex;
  align-items: center;     
}

.global-news-text-ui .global-news-text {
  position: relative;
  left: 0;
  white-space: nowrap;
  color: var(--text-color);
  font-size: 16px;
  font-weight: 500;
  transition: left linear;
  padding: 0 15px;
  margin: 0;
}

/* -- common --*/

.news-btn{
  width: 180px;
  height: 50px;
}

/* -------- Footer -------- */
.footer {
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 20px;
  margin-top: auto;
}

/* -------- Dark Mode Theme -------- */
.color-text.darkMode {
  color: #FFD700;  /* yellow */
}

/* --------- Other Function Mode and Styles ----- */

.hidden{
  display: none;
}

/* ------- Mobile Device ------- */
@media (max-width: 768px) {

  .page-content {
    padding: 0 20px; 
  }

  .box-container {
    grid-template-columns: 1fr; 
    justify-items: center; 
    justify-content: center;
  }

  .box {
    width: 100%;
    max-width: 360px;
  }

  .accessory-area {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}