@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

* {
  font-family: "Noto Sans TC", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-decoration: none;
  transition: all 0.2s linear;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 1rem 0;
  background: #fff;
  border-bottom: 0.3rem solid #f1f1f1;
  z-index: 997;
}

.header .menu {
  display: none; 
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.6rem;
  background: #255d86;
  color: white;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.header .menu i {
  line-height: 0;
  font-size: 1.6rem;
}

.navbar-side {
  display: none;
}

/* Horizontal Navbar Container */
.navbar-horizontal {
  padding: 0 20px;
  z-index: 1000; 
}

/* Main Navigation Menu List */
.nav-menu {
  list-style: none; 
  padding: 0;
  margin: 0;
  display: flex; 
  justify-content: flex-start; 
  align-items: stretch;
  height: 60px; 
}

/* Individual Navigation Item */
.nav-item {
  position: relative;   
}

.nav-item > a {
  display: flex; 
  align-items: center;
  padding: 0 15px; 
  color: #000; 
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400; 
  height: 100%; 
  transition: background-color 0.3s ease;
}

.nav-item > a:hover,
.nav-item.open > a { 
  background-color: rgba(255, 255, 255, 0.1); 
}

/* Arrow icon for dropdown headers */
.has-dropdown > a::after {
  content: '▼'; 
  font-size: 10px;
  margin-left: 8px; 
  transition: transform 0.3s ease;
}

.nav-item.open > a::after {
  transform: rotate(180deg); 
}

  /* Dropdown Menu (Nested UL) - Desktop Specific */
.dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute; 
  top: 100%;
  left: 0;
  background-color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  white-space: nowrap;
  z-index: 1001;
  border-radius: 4px;

  /* Controlled by JS via max-height for smooth animation */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out; /* Add opacity for smoother blend */
  opacity: 0;
}

/* Show Dropdown when parent .nav-item has 'open' class */
.nav-item.open .dropdown-menu {
  max-height: 300px; 
  opacity: 1;
}

/* Dropdown Menu Item Links */
.dropdown-menu li a {
  display: block; 
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0; 
  color: #007bff; 
}

/* Optional: Add a border between dropdown items */
.dropdown-menu li:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu i {
  transition: transform 0.3s ease;
}
.menu .bi-x {
  transform: rotate(180deg);
}

.news-section-container {
  margin: 0px auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 20px; 
  max-width: 900px; 
  padding: 20px; 
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  position: relative; 
}

.news-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px; 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  z-index: 0;
}

.news-card .tag {
  background-color: #e0f2f7; 
  color: #2196f3; 
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 10px;
  width: fit-content; 
}

.news-card .title {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.4;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; 
  line-clamp: 2;         
}

.news-card .date {
  font-size: 0.9rem;
  color: #777;
  display: flex;
  align-items: center;
}

.news-card .date::before {
  content: "📅"; 
  margin-right: 5px;
}

.load-more-btn {
  grid-column: 1 / -1; 
  justify-self: end; 
  background-color: #f0f8ff; 
  color: #4682b4; 
  border: 1px solid #a8d6f5; 
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  margin-top: 20px;
}

.load-more-btn:hover {
  background-color: #e6f3ff;
  border-color: #8ccee8;
}

.load-more-btn .arrow {
  font-weight: bold;
}

.container {
  background-color: #fff; 
  padding: 30px;
  border-radius: 8px; 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
  max-width: 700px; 
  width: 100%; 
}

h1 {
  color: #2c3e50; 
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #ddd; 
  padding-bottom: 15px;
}

.experience-list {
  list-style: none; 
  padding: 0;
  margin: 0;
}

.experience-list li {
  background-color: #f9f9f9; 
  margin-bottom: 12px;
  padding: 15px 20px;
  border-left: 5px solid #3498db; 
  border-radius: 4px;
  font-size: 1.1rem; 
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; 
}

.experience-list li:hover {
  transform: translateX(5px); 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); 
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .experience-list li {
        font-size: 1rem;
        padding: 12px 15px;
    }
}

/* styles.css */
.director {
    max-width: 1300px;
    margin: 0px auto;
    background: #f1f1f1;
    padding: 30px 30px 100px;
    /* border-radius: 8px; */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    /* border: 1px solid #1a1919; */
}

.director .box-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  grid-gap: 10px;
}

.director .box-container .box {
  background: #fff;
  box-shadow: var(--box-shadow);
}

.director .box-container .box img {
  width: 100%;
}

.director .box-container .box p {
  font-size: 1rem;
  line-height: 2rem;
}

.photos {
    max-width: 1300px;
    margin: 0px auto;
    background: #f1f1f1;
    padding: 30px 30px 100px;
    /* border-radius: 8px; */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    /* border: 1px solid #1a1919; */
}

.photos .box-container {
  display: grid;
  /* grid-template-columns: auto auto auto ; */
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  grid-gap: 10px;
}

.photos .box-container .box {
  background: #fff;
  box-shadow: var(--box-shadow);
}

.photos .box-container .box img {
  width: 100%;
}

.photos .box-container .box p {
  font-size: 1rem;
  line-height: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-section-container {
        grid-template-columns: 1fr; /* Single column on smaller screens */
        padding: 15px;
    }
    .load-more-btn {
        justify-self: center; /* Center the button on smaller screens */
    }
}


.chairman {
  background: #f1f1f1;
  border: 1px solid #1a1919;
}
.chairman h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
  padding: 50px 30px;
  font-size: 28px;
  border-bottom: 2px solid #e0e0e0;
}

.chairman-container {
  display: flex;
  flex-direction: row;
}

.photo {
  background-color: #f1f1f1 ;
  padding: 6rem;
  flex: 50%;
}
.photo img {
  max-width: 400px;
  width: 100%;
}

.experience {
  background-color: #d1dee6;
  padding: 6rem;
  flex: 50%;
}

.footer-container {
  display: flex;
  flex-direction: row;
}

.service-items {
  background-color: #f1f1f1 ;
  padding: 6rem;
  flex: 50%;
}

.service-items h2 {
  margin-bottom: 2rem;
  font-size: 1.6rem;
  color: #0056b3;
}

.service-items ul {
  list-style-position: outside;
  padding-left: 2em; 
}

.service-items li {
  color: #0056b3;
  font-size: 1rem; 
  padding-left: 0em; 
}

.service-items li::marker {
  font-size: 1.5em; 
  color: #023a75; 
}

.service-items .fair {
  margin:20px 0;
  padding:10px;
  background:#f3eee9;
  font-size:1.2rem;
  font-weight: bold;
  text-align: center;
  color: #dca66d;
}

.service-items .notes {
    font-size: 0.9rem;
    color: #666;
    margin-top: 25px;
    padding: 15px 0;
    border-top: 1px dashed #ddd;
    text-align: justify;
}


.contact-link {
    display: inline-block; 
    padding: 10px 20px;
    background-color: #007bff; 
    color: white; 
    text-decoration: none; 
    border-radius: 5px; 
    font-weight: bold; 
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); 
}


.contact-link:hover {
  background-color: #0056b3; 
  transform: translateY(-2px); 
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); 
}

.contact-link:active {
  background-color: #004085; 
  transform: translateY(0); 
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); 
}

.contact-info {
  background-color: #d1dee6;
  padding: 6rem;
  flex: 50%;
}
.contact-info img {
  margin-bottom: 2rem;
  width: 330px;
  height: auto;
}

a[href^="mailto:"] { 
  color: inherit; 
  text-decoration: none; 
}

a[href^="mailto:"]:hover {
  color: #0056b3; 
  text-decoration: underline; 
}

.copyright {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background: #d6d5d5;
}

.copyright span {
  padding-left:10px;
  color: #dca66d;
}

section {
  min-height: 100vh;
  background: url(./imgs/esgb.jpg);
  padding: 100px 0;
}

.article {
  max-width: 800px;
  margin: 0px auto;
  background: #f1f1f1;
  padding: 30px 30px 100px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.article  h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
  }
.article  h2 {
  color: #34495e;
  border-bottom: 2px solid #34495e;
  padding-bottom: 5px;
  margin-top: 30px;
}
.article  h3 {
  color: #2980b9;
  margin-top: 20px;
}
.article  p {
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.article  ol {
  list-style-type: decimal;
  margin-left: 25px;
  margin-bottom: 15px;
}
.article  ol li {
  margin-bottom: 8px;
}
.article  strong {
  color: #e74c3c;
}

/* END artivle */
#scroll-up {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 50px;
  height: 50px;
  text-align: center;
  background: #255d86;
  border-radius: 50%;
  display: none;
  animation: scrollup 2s ease-in-out;
}

#scroll-up i {
  font-size: 24px;
  line-height: 50px;
  color: #fff;
}

@keyframes scrollup {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#scroll-up:hover {
  transform: scale(1.05);
  /* opacity: 0.8; */
  cursor: pointer;
}

/* Responsive layout - makes a one column-layout instead of two-column layout */
@media (max-width: 800px) {
  .footer-container {
    flex-direction: column;
  }

  .service-items,.contact-info {
    margin: 0;
     padding: 3rem 1rem; 
  }

  .chairman-container {
    flex-direction: column;
  }

  .photo,.experience {
    margin: 0;
     padding: 3rem 1rem; 
  }
}


@media (max-width: 1280px) {
  .navbar-horizontal {
    display: none;
  }
  .navbar-side {
    position: fixed;
    top: 0;
    left: -100%;
    width: 77%;
    height: 100%;
    background: #f1f1f1;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    justify-content: space-between;
    padding: 3rem 2rem;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 1002;
  }

  .content-link ,.social  {
    display: flex;
    flex-direction: column;
  }
  
  .content-link a,.social a {
    color: #130f40;
    padding: 10px;
  }

  .content-link a:hover,.social a:hover {
    color: #dca66d;
    /* letter-spacing: 2px; */
    font-weight: bold;
  }

  .navbar-side.active {
    left: 0;
  }

  .header .menu {
    position: relative;
    display: flex;
    z-index: 1003;
  }

  .accordion {
  background-color: #eee;
  color: #444;
  cursor: pointer;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1rem;
  transition: 0.4s;
  border-bottom: var(--border);
  padding: 10px;
  }

  .active-acc,
  .accordion:hover {
    background-color: #ccc;
  }

  .accordion:after {
    float: right;
    content: '▼'; 
    font-size: 10px; 
    margin-left: 8px; 
    transition: transform 0.3s ease; 
  }

  .active-acc:after {
    transform: rotate(180deg);
  }

  .panel {
   
    background-color: white;
    max-height: 0;
    overflow: hidden;
    color: var(--light-color);
    font-size: 1rem;
    transition: max-height 0.2s ease-out;
  }

  .pay ul li {
    padding: 10px; 
    margin: 5px 0;  
    list-style:none;
  }
}

@media (max-width: 680px) {
 .header img {
    width: 330px;
    height: auto;
  } 
 
}
@media (max-width: 480px) {
  
  .header img {
    width: 280px;
    height: auto;
  } 
 
}

@media (max-width: 360px) {

  .header img {
    width: 230px;
    height: auto;
  } 

  .contact-info img {
    width: 270px;
    height: auto;
  }
  .contact-info p {
    font-size: 0.9rem;
  }
}