/* Main Styles - CGMH Burn Center v2 */
:root {
  --primary-color: #2c5aa0;
  --primary-dark: #1e4080;
  --secondary-color: #f8f9fa;
  --accent-color: #00a651;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --border-color: #e9ecef;
  --shadow: 0 2px 15px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

/* English version font support */
html[lang="en"] body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* English version header adjustments */
html[lang="en"] .logo-text .main {
  font-size: 1.1rem;
  white-space: nowrap;
}

html[lang="en"] .nav-menu {
  gap: 2rem;
}

html[lang="en"] .header-utils {
  gap: 1rem;
}

html[lang="en"] .hero h1 {
  font-size: 3.0rem;
}

/* English version mobile adjustments */
@media (max-width: 768px) {
  html[lang="en"] .logo-text .main {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Ensure nav and utils are hidden for English version too */
  html[lang="en"] .nav-menu {
    display: none !important;
  }
  
  html[lang="en"] .header-utils {
    display: none !important;
  }
  
  html[lang="en"] .mobile-menu-btn {
    display: block !important;
  }
}

@media (max-width: 480px) {
  html[lang="en"] .logo-text .main {
    font-size: 0.75rem;
  }
  
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header Styles */
.header {
  background: #fff;
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
}

.logo img {
  height: 3rem;
  margin-right: 1rem;
}

.logo-text {
  font-weight: 700;
  line-height: 1.3;
}

.logo-text .main {
  display: block;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.logo-text .sub {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color) !important;
}

/* Navigation */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 3rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu > li > a:hover {
  color: var(--primary-color);
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-menu > li > a:hover::after {
  width: 100%;
}

/* Dropdown menus */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  padding: 1rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

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

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Utility Buttons */
.header-utils {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

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

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

.language-switch {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border: 2px solid var(--border-color);
  color: var(--text-light);
  background: white;
  transition: all 0.3s ease;
}

.language-switch:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--secondary-color);
  transform: translateY(-1px);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
  background-color: var(--secondary-color);
}

/* Mobile Navigation Menu */
.mobile-nav {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  width: 100%;
  background: white;
  box-shadow: var(--shadow);
  z-index: 1001;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  border-top: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease-out;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.mobile-nav-menu {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

/* Mobile menu item with submenu */
.mobile-menu-item {
  border-bottom: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
  background: white;
}

.mobile-menu-item:last-child {
  border-bottom: 1px solid var(--border-color);
}

/* Main menu link container */
.mobile-menu-header {
  display: flex;
  align-items: center;
  background: white;
  width: 100%;
}

.mobile-menu-link {
  flex: 1;
  display: block;
  padding: 0.875rem 2rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Submenu toggle button */
.mobile-submenu-toggle {
  background: none;
  border: none;
  padding: 0.875rem 1rem;
  color: var(--text-light);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
}

.mobile-submenu-toggle:hover {
  color: var(--primary-color);
  background-color: var(--secondary-color);
}

.mobile-submenu-toggle.active {
  color: var(--primary-color);
}

.mobile-submenu-toggle.active i {
  transform: rotate(180deg);
}

/* Submenu styles */
.mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: var(--secondary-color);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-submenu.active {
  max-height: 300px;
}

.mobile-submenu li {
  border-bottom: 1px solid var(--border-color);
}

.mobile-submenu li:last-child {
  border-bottom: none;
}

.mobile-submenu a {
  display: block;
  padding: 0.75rem 3rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-submenu a:before {
  content: '•';
  position: absolute;
  left: 2.5rem;
  color: var(--primary-color);
  font-weight: bold;
}

.mobile-submenu a:hover,
.mobile-submenu a:active {
  background-color: white;
  color: var(--primary-color);
  padding-left: 3.5rem;
}

/* Mobile utilities */
.mobile-utils {
  padding: 1.5rem 2rem;
  border-top: 2px solid var(--border-color);
  background-color: var(--secondary-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-utils .btn,
.mobile-utils .language-switch {
  justify-self: stretch;
  text-align: center;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 12rem 0 8rem;
  margin-top: 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,0 1000,300 1000,1000 0,700"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

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

.hero-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255,255,255,0.3);
}

.hero-btn-outline {
  border: 2px solid white;
  color: white;
  background: transparent;
}

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

/* Section Styles */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Card Styles */
.card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  display: block;
}

.card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* Statistics Section */
.stats {
  background: var(--secondary-color);
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Footer */
.footer {
  background-color: var(--text-color);
  color: #ccc;
  padding: 3rem 0 1rem;
}

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

.footer-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid #555;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Header scroll state */
.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Scroll animation */
.card,
.stat-item,
.section-header {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.animate-in,
.stat-item.animate-in,
.section-header.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 968px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Header adjustments for tablet */
  .header-container {
    gap: 1.5rem;
  }
  
  .nav-menu {
    gap: 2rem;
  }
  
  .header-utils {
    gap: 1rem;
  }
  
  /* Logo text adjustments for better mobile display */
  .logo-text .main {
    font-size: 1.2rem;
  }
  
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
    gap: 1rem;
    position: relative;
  }
  
  /* Force hide navigation and utilities on mobile */
  .nav-menu {
    display: none !important;
  }
  
  .header-utils {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: block !important;
  }
  
  /* Logo adjustments for mobile */
  .logo {
    flex: 1;
    max-width: calc(100% - 60px);
  }
  
  .logo img {
    height: 2.5rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }
  
  .logo-text {
    font-size: 1rem;
    overflow: hidden;
  }
  
  .logo-text .main {
    font-size: 1rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .hero {
    padding: 8rem 0 5rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  /* Extra small mobile adjustments */
  .header-container {
    padding: 0.75rem 1rem;
  }
  
  .logo img {
    height: 2rem;
    margin-right: 0.5rem;
  }
  
  .logo-text {
    font-size: 0.9rem;
  }
  
  .logo-text .main {
    font-size: 0.9rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
}