@charset "utf-8";

/* ===== CSS Custom Properties ===== */
:root {
  --primary: #341283;
  --primary-light: #5a3daa;
  --primary-dark: #220b5e;
  --text: #252525;
  --text-light: #333333;
  --bg: #FFFFFF;
  --white: #FFFFFF;
  --red: #FF0000;
  --hover-blue: #0033CC;
  --border-light: #B9AED7;
  --bg-light: #E0DCED;
  --bg-lighter: #FBFBFB;
  --max-width: 100%;
  --sidebar-width: 160px;
  --gap: 32px;
  --font-stack: 'Noto Sans TC', 'Roboto', Arial, Helvetica, "Microsoft JhengHei", "PingFang TC", sans-serif;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 28px rgba(52, 18, 131, 0.10);
  --radius-lg: 1.2rem;
  --radius-md: 0.8rem;
  --radius-sm: 0.4rem;
  --transition: 0.3s cubic-bezier(.4, 0, .2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ===== Typography (backward-compatible with word.css classes) ===== */
.h11 {
  font-family: var(--font-stack);
  font-size: 26px;
  line-height: 38px;
  color: var(--primary);
  font-weight: 700;
}

.h1 {
  font-family: var(--font-stack);
  font-size: 18px;
  line-height: 26px;
  color: var(--primary);
  font-weight: 600;
}

.h2 {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 35px;
  color: var(--text);
}

.h3 {
  font-family: var(--font-stack);
  font-size: 15px;
  color: var(--text);
  line-height: 30px;
}

.h4 {
  font-family: var(--font-stack);
  font-size: 15px;
  color: var(--text);
  line-height: 25px;
}

.h5 {
  font-family: var(--font-stack);
  font-size: 15px;
  color: var(--red);
  line-height: 22px;
}

.h6 {
  font-family: var(--font-stack);
  font-size: 15px;
  color: var(--primary);
  line-height: 30px;
}

.h7 {
  font-family: var(--font-stack);
  font-size: 13px;
  color: var(--text-light);
  line-height: 30px;
}

.h8 {
  font-family: var(--font-stack);
  font-size: 13px;
  color: var(--text-light);
  line-height: 20px;
}

.h9 {
  font-size: 12px;
  font-family: var(--font-stack);
}

/* ===== Site Wrapper (full-width layout) ===== */
.site-wrapper {
  width: 100%;
  margin: 0 auto;
  background-color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.site-header {
  padding: 18px 0;
  border-bottom: 1px solid #eee;
  background: var(--white);
}

.header-inner {
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.logo img {
  max-height: 100px;
  width: auto;
}

/* ===== Text Logo ===== */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.logo-zh {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.logo-en {
  font-size: 28px;
  font-weight: 700;
  color: #c8602a;
  margin-left: 6px;
}

.logo-sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 1px;
}

.logo:hover .logo-text {
  opacity: 0.85;
}

.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.lang-switcher a {
  padding: 5px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  transition: all var(--transition);
  font-weight: 500;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ===== Hamburger Menu ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
  background: none;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}

.hamburger:hover {
  border-color: var(--primary);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition: all 0.3s;
}

/* ===== Top Navigation ===== */
.site-nav {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  width: 100%;
}

.nav-inner {
  padding: 0;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.nav-list li {
  flex: 1;
}

.nav-list a {
  display: block;
  text-align: center;
  padding: 14px 10px;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  transition: background-color var(--transition), transform var(--transition);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  letter-spacing: 0.3px;
}

.nav-list li:last-child a {
  border-right: none;
}

.nav-list a:hover {
  background-color: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.nav-list a.active {
  background-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
  font-weight: 700;
}

/* ===== Content Layout ===== */
.content-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--gap);
  padding: 28px 20px;
  flex: 1;
  width: 100%;
}

.content-layout.no-sidebar {
  grid-template-columns: 1fr;
}

/* ===== Sidebar ===== */
.sidebar {
  min-width: 0;
}

.sidebar-nav {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(185, 174, 215, 0.25);
}

.sidebar-nav h3 {
  margin: 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  border-radius: 0;
  letter-spacing: 0.3px;
}

.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border: none;
  border-top: none;
  border-radius: 0;
}

.sidebar-nav li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background-color: #f5f3fa;
  color: var(--primary);
  border-left-color: var(--primary-light);
}

.sidebar-nav a.active {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 600;
  border-left-color: var(--primary);
}

/* ===== Main Content ===== */
.main-content {
  min-width: 0;
  line-height: 1.7;
}

.main-content p {
  margin: 0 0 16px 0;
}

.main-content .banner-img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
}

/* ===== Link color override for patent/trademark sections ===== */
.link-red a {
  color: var(--red);
  transition: color var(--transition);
}
.link-red a:hover {
  color: var(--hover-blue);
}
.link-red a:visited {
  color: var(--red);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 40%, #7c5cbf 100%);
  color: var(--white);
  padding: 52px 40px 48px;
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: var(--radius-md);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

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

.hero-tagline {
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 12px 0;
}

.hero-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 12px 0;
  letter-spacing: 1px;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 500;
  opacity: 0.92;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--white);
  transition: background var(--transition);
}

.hero-badge:hover {
  background: rgba(255,255,255,0.28);
}

.hero-badge-icon {
  font-size: 15px;
}

@media (max-width: 768px) {
  .hero {
    padding: 36px 24px 32px;
    margin-bottom: 20px;
  }
  .hero-badges {
    gap: 8px;
  }
  .hero-badge {
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* ===== Force old tables/images to full width ===== */
.main-content table {
  max-width: 100%;
}

.main-content img {
  max-width: 100%;
  height: auto;
}

.main-content iframe {
  max-width: 100%;
}

/* ===== Data Tables ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  font-size: 15px;
  line-height: 25px;
  background: var(--white);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border: 1px solid #e8e4f0;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.data-table tr:nth-child(even) td {
  background-color: #f8f6fc;
}

.data-table tr:hover td {
  background-color: #f0edf8;
  transition: background-color var(--transition);
}

/* ===== Footer ===== */
.site-footer {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 36px 40px;
  margin-top: auto;
  width: 100%;
}

.footer-inner {
  padding: 0 20px;
  text-align: center;
}

.footer-name {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px 0;
  letter-spacing: 0.3px;
}

.footer-links {
  margin: 12px 0;
  font-size: 14px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 8px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  margin: 14px 0 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

/* ===== Contact Layout (map + form side by side) ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.contact-info {
  font-size: 15px;
  line-height: 1.8;
}

.contact-info h2 {
  color: var(--primary);
  font-size: 20px;
  margin: 0 0 12px 0;
}

.contact-map iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: var(--radius-sm);
}

.contact-form-wrap {
  background: #f9f7fc;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid #e8e4f0;
}

.contact-form-wrap h3 {
  color: var(--primary);
  font-size: 18px;
  margin: 0 0 16px 0;
  text-align: center;
}

.contact-form-wrap label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-form-wrap input[type="text"],
.contact-form-wrap textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-stack);
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.contact-form-wrap input[type="text"]:focus,
.contact-form-wrap textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.contact-form-wrap .form-group {
  margin-bottom: 12px;
}

.contact-form-wrap .form-services {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.contact-form-wrap .form-services strong {
  color: var(--primary);
}

.contact-form-wrap .btn-submit {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.contact-form-wrap .btn-submit:hover {
  background: var(--primary-light);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-map iframe {
    height: 300px;
  }
}

/* ===== Slogan (bottom of content) ===== */
.slogan {
  text-align: center;
  color: var(--primary);
  font-size: 17px;
  font-weight: 700;
  line-height: 32px;
  margin: 36px 0 18px 0;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 12px;
}

.slogan::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

/* ===== Team Member Cards ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-card {
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.team-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 18px 24px;
}

.team-card-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.team-card-name small {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.85;
  margin-left: 8px;
}

.team-card-title {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

.team-card-body {
  padding: 20px 24px;
}

.team-card-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0edf8;
  font-size: 14px;
}

.team-card-contact span {
  color: var(--text-light);
}

.team-card-contact .label {
  font-weight: 600;
  color: var(--primary);
  margin-right: 4px;
}

.team-card-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.team-card-details dl {
  margin: 0;
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 0;
}

.team-card-details dt {
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #f5f3fa;
}

.team-card-details dd {
  margin: 0;
  padding: 6px 0 6px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  border-bottom: 1px solid #f5f3fa;
}

.team-card-details dl > dt:last-of-type,
.team-card-details dl > dd:last-of-type {
  border-bottom: none;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-red { color: var(--red); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.rounded { border-radius: var(--radius-md); }
.shadow { box-shadow: var(--shadow); }
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ===== Responsive: Team Cards (768px) ===== */
@media (max-width: 768px) {
  .team-card-header {
    padding: 14px 18px;
  }

  .team-card-name {
    font-size: 18px;
  }

  .team-card-name small {
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }

  .team-card-body {
    padding: 14px 18px;
  }

  .team-card-contact {
    flex-direction: column;
    gap: 6px;
  }

  .team-card-details dl {
    grid-template-columns: 1fr;
  }

  .team-card-details dt {
    padding: 6px 0 2px 0;
    border-bottom: none;
  }

  .team-card-details dd {
    padding: 0 0 8px 0;
  }
}

/* ===== Responsive: General (768px) ===== */
@media (max-width: 768px) {
  .site-header {
    padding: 12px 0;
  }

  .header-inner {
    padding: 0 16px;
  }

  .logo img {
    max-height: 60px;
  }

  .logo-zh, .logo-en {
    font-size: 20px;
  }
  .logo-sub {
    font-size: 12px;
  }

  .lang-switcher {
    font-size: 12px;
    gap: 4px;
  }

  .lang-switcher a {
    padding: 3px 6px;
  }

  .hamburger {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  }

  .nav-open .site-nav {
    display: block;
    position: relative;
  }

  .nav-list {
    flex-direction: column;
  }

  .nav-list a {
    text-align: left;
    padding: 14px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-list li:last-child a {
    border-bottom: none;
  }

  .content-layout {
    grid-template-columns: 1fr;
    padding: 16px 16px;
    gap: 20px;
  }

  .site-footer {
    padding: 28px 16px;
  }

  .sidebar {
    order: -1;
  }

  .sidebar-nav h3 {
    font-size: 14px;
    padding: 10px 14px;
  }

  .sidebar-nav a {
    padding: 8px 14px;
    font-size: 13px;
  }

  .main-content {
    font-size: 14px;
  }

  .h11 { font-size: 20px; }
  .h1 { font-size: 16px; }
  .h2 { font-size: 15px; }
  .h3, .h4, .h5, .h6 { font-size: 14px; line-height: 26px; }

  .footer-links a {
    display: inline-block;
    margin: 3px 5px;
  }

  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .slogan {
    font-size: 15px;
  }

  .slogan::after {
    width: 40px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .logo {
    order: 1;
    flex: 1;
  }

  .hamburger {
    order: 2;
  }

  .lang-switcher {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
  }
}

/* ===== Hamburger Animation ===== */
.nav-open .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-open .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Print ===== */
@media print {
  .site-header,
  .site-nav,
  .sidebar,
  .site-footer,
  .hamburger {
    display: none !important;
  }

  .content-layout {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  .site-wrapper {
    max-width: 100%;
    background: none;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
  }

  body {
    background: none;
  }
}
