/* Variables & Base */
:root {
  --primary-color: #0056b3; /* Deep Blue */
  --secondary-color: #2ea3f2; /* Light Blue */
  --accent-color: #4CAF50; /* Eco Green */
  --dark-color: #333333;
  --light-color: #f4f4f4;
  --white-color: #ffffff;
  --text-color: #555555;
  --font-family: 'Noto Sans TC', 'Inter', sans-serif;
  --transition-speed: 0.3s;
  --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  color: var(--primary-color);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 5rem 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-speed);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white-color);
  box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  color: var(--white-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 163, 242, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* Header & Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all var(--transition-speed);
}

header.scrolled {
  padding: 5px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  transition: padding var(--transition-speed);
}

.logo a {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links li a {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--dark-color);
  position: relative;
  padding-bottom: 5px;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-speed);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary-color);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white-color);
  min-width: 150px;
  box-shadow: var(--box-shadow);
  border-radius: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-speed);
  padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 5px 20px;
}

.dropdown-menu li a {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
}

.dropdown-menu li a::after {
  display: none;
}

.dropdown-menu li a:hover {
  padding-left: 5px;
  color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
  height: 80vh;
  min-height: 600px;
  background: linear-gradient(rgba(0, 48, 102, 0.6), rgba(0, 48, 102, 0.6)), url('../images/banner1_1773412524396.png') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white-color);
  padding-top: 100px; /* Offset for fixed header */
  margin-bottom: 0;
}

.hero-content h1 {
  color: var(--white-color);
  font-size: 3.5rem;
  margin-bottom: 25px;
  text-shadow: 0 4px 15px rgba(0,0,0,0.5);
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
  margin-top: 40px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-section {
    height: auto;
    padding: 15rem 0 10rem;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
    padding: 0 20px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: var(--dark-color);
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: #ddd;
  padding: 50px 0 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h3 {
  color: var(--white-color);
  margin-bottom: 20px;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-col p {
  margin-bottom: 10px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-col p i {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white-color);
  font-size: 1.2rem;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* Page Header (for inner pages) */
.page-header {
  padding: 150px 0 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(0, 48, 102, 0.9) 100%);
  color: var(--white-color);
  text-align: center;
}

.page-header h1 {
  color: var(--white-color);
  font-size: 3rem;
  margin-bottom: 15px;
  text-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Animations */
/* Removed fade-in-up CSS in favor of AOS library */

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background-color: var(--white-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #f9f9f9;
    padding: 0;
    display: none;
  }
  
  .dropdown.active .dropdown-menu {
    display: block;
  }
}
/* Inner Page Content Styles */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.feature-box {
  background: var(--white-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  transition: transform var(--transition-speed);
  text-align: center;
}

.feature-box:hover {
  transform: translateY(-10px);
}

.feature-box i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.feature-box h3 {
  margin-bottom: 15px;
  color: var(--dark-color);
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.equipment-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.equipment-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s;
}

.equipment-card:hover img {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--white-color);
  transform: translateY(100%);
  transition: transform var(--transition-speed);
}

.equipment-card:hover .card-overlay {
  transform: translateY(0);
}

/* Products Page Styles */
.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.tab-btn {
  padding: 10px 20px;
  background: var(--white-color);
  border: 1px solid #ddd;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-speed);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
}

.product-item {
  display: none;
  animation: fadeIn 0.5s;
}

.product-item.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--white-color);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.product-info h3 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 20px;
}

.product-info ul {
  margin: 20px 0;
  padding-left: 20px;
}

.product-info ul li {
  margin-bottom: 10px;
  position: relative;
  list-style: none;
}

.product-info ul li::before {
  content: '?';
  color: var(--accent-color);
  position: absolute;
  left: -20px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .product-details {
    grid-template-columns: 1fr;
  }
}
/* Cases Page Styles */
.cases-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.case-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  cursor: pointer;
  aspect-ratio: 4/3;
}

.case-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.case-item:hover img {
  transform: scale(1.1);
}

.case-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: var(--white-color);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.case-item:hover .case-info {
  transform: translateY(0);
}

.case-info h4 {
  color: var(--secondary-color);
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.case-info span {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Contact Page Styles */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

.contact-info-box {
  background: var(--white-color);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
  gap: 20px;
}

.contact-item i {
  font-size: 2rem;
  color: var(--primary-color);
  background: rgba(0, 86, 179, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-text h4 {
  color: var(--dark-color);
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.contact-text p, .contact-text a {
  color: var(--text-color);
  font-size: 1rem;
}

.contact-text a:hover {
  color: var(--primary-color);
}

.map-container {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  height: 100%;
  min-height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

/* QA Page Styles */
.qa-container {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  background: var(--white-color);
}

.accordion-header {
  padding: 20px 25px;
  background-color: var(--white-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--dark-color);
  transition: background-color var(--transition-speed);
}

.accordion-header:hover {
  background-color: var(--light-color);
}

.accordion-header.active {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.accordion-header i {
  transition: transform 0.3s ease;
}

.accordion-header.active i {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 25px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: var(--white-color);
}

.accordion-content.active {
  padding: 20px 25px;
  max-height: 500px;
  border-top: 1px solid #eee;
}

/* 首頁 About 區塊排版 */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.about-image img {
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
}
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* 首頁 App Cards 區塊排版 */
.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
.app-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.app-card:hover {
  transform: translateY(-10px);
}
.app-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
.app-card-content {
  padding: 20px;
}
.read-more {
  display: inline-block;
  margin-top: 15px;
  color: #0056b3;
  font-weight: 600;
}
