:root {
  /* Brand Colors */
  --primary-green: #9acd32;
  /* YellowGreen - close to original but fresher */
  --primary-orange: #ff8c00;
  /* DarkOrange - readable on white */
  --accent-blue: #003366;
  /* Deep blue for text/headings */
  --accent-red: #d32f2f;
  /* For important notices */

  /* Neutral Colors */
  --bg-color: #f9f9f9;
  --surface-color: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
}

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

body {
  font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-primary {
  background-color: var(--primary-orange);
  color: white;
}

.btn-primary:hover {
  background-color: #e67e00;
  transform: translateY(-1px);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  font-size: 2rem;
  color: var(--accent-blue);
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-green);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Header */
.header {
  background-color: var(--surface-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary-orange);
}

/* Navigation */
.nav-menu {
  display: flex;
  gap: var(--spacing-md);
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 4px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-orange);
  background-color: rgba(255, 140, 0, 0.1);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-color);
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background-color: var(--accent-blue);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.bg-split {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.bg-left {
  clip-path: polygon(0 0, 60% 0, 40% 100%, 0 100%);
}

.bg-right {
  clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%);
}

.hero-content {
  position: relative;
  z-index: 1;

}

.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* History Slider */
.history-slider-container {
  overflow: hidden;
  width: 100%;
  margin-top: 8rem;
  padding: 1rem 0;
  background: white;
  /* Assuming white bg for clean look inside the white block, or transparent */
}

.history-slider-track {
  display: flex;
  width: max-content;
  animation: scroll-right 40s linear infinite;
}

.history-slider-track:hover,
.history-slider-track:active {
  animation-play-state: paused;
}

.history-slider-track img {
  height: 200px;
  width: auto;
  margin-right: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes scroll-right {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--surface-color);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.2s;
  border-top: 4px solid var(--primary-orange);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary-green);
  /* New styles for image icons */
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem auto;
  /* Center horizontally */
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-title {
  color: var(--accent-blue);
  margin-bottom: var(--spacing-sm);
  font-size: 1.25rem;
}

/* Notice/News Ticker Replacement */
.notice-board {
  background-color: #fff3e0;
  border-left: 4px solid var(--primary-orange);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  border-radius: 0 4px 4px 0;
}

.notice-title {
  color: var(--primary-orange);
  font-weight: bold;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--accent-blue);
  color: white;
  padding: var(--spacing-lg) 0;
  text-align: center;
  margin-top: auto;
}

.footer-info {
  margin-bottom: var(--spacing-md);
}

.copyright {
  opacity: 0.7;
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  /* Hidden by default */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  z-index: 1001;
  user-select: none;
}

.lightbox-close:hover {
  color: var(--primary-orange);
}

/* Cursor pointer for clickable images */
.feature-icon img,
.history-slider-track img {
  cursor: pointer;
  transition: transform 0.2s ease;
}


/* Maintenance Carousel */
.facilities-carousel,
.activities-carousel,
.maintenance-carousel {
  position: relative;
  margin: 0 auto 3rem;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background: #f5f5f5;
}

.facilities-carousel,
.activities-carousel {
  max-width: 500px;
}

.maintenance-carousel {
  max-width: 500px;
}

.carousel-slides {
  position: relative;
  width: 100%;
  padding-bottom: 66.66%;
  /* Aspect ratio placeholder (3:2) or adjust as needed */
  height: 0;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: white;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: #ddd;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.hero .dot {
  cursor: pointer;
  border: 1px solid white;
}

.dot.active,
.dot:hover {
  background-color: var(--primary-orange);
}