/* ========================================
   BEEMYE - Common Styles
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
}

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

ul, ol {
  list-style: none;
}

/* ========================================
   Header
   ======================================== */
.header {
  background: linear-gradient(90deg, #1a2744 0%, #243451 50%, #1a2744 100%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon img {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.logo-divider {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.3);
  margin: 0 8px;
}

.logo-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.95);
  font-weight: 400;
  transition: color 0.2s;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.nav-link.active {
  color: #fff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  background: #4a90d9;
}

.nav-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.nav-link .search-emoji {
  font-size: 14px;
}

.nav-search {
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-search:hover {
  background: rgba(255,255,255,0.08);
}

.nav-search svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,0.9);
}

/* Dropdown Menu */
.nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

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

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 0.9rem;
  color: #333;
  transition: background 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

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

.nav-dropdown a:hover {
  background: #f8f8f8;
}

.nav-dropdown a svg {
  width: 16px;
  height: 16px;
  stroke: #666;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0;
}

.search-overlay.active {
  display: flex;
}

.search-overlay-inner {
  width: 100%;
  max-width: 100%;
  background: #f5f5f5;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.search-back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-back svg {
  width: 24px;
  height: 24px;
  stroke: #333;
}

.search-input-wrapper {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.search-input-wrapper input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  font-size: 1rem;
  border: none;
  border-radius: 30px;
  background: #fff;
  outline: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.search-input-wrapper input::placeholder {
  color: #999;
}

.search-input-wrapper svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #999;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s;
}

/* ========================================
   Footer Upper Section
   ======================================== */
.footer-upper {
  background: #fff;
  padding: 60px 24px 40px;
}

.footer-upper-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-contact {
  flex: 1;
  max-width: 500px;
}

.footer-brand {
  font-size: 0.95rem;
  color: #1a2744;
  margin-bottom: 24px;
}

.footer-brand span {
  color: #4a90d9;
  font-style: italic;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #333;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer-address {
  margin-top: 20px;
}

.footer-address p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 8px;
}

.footer-certifications {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.footer-cert-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.footer-nav {
  display: flex;
  gap: 60px;
}

.footer-nav-column h4 {
  font-size: 0.9rem;
  color: #1a2744;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-nav-column a {
  display: block;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.footer-nav-column a:hover {
  color: #4a90d9;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s;
}

.footer-social a:hover {
  transform: scale(1.1);
}

.footer-social svg {
  width: 28px;
  height: 28px;
}

/* ========================================
   Footer Lower Section
   ======================================== */
.footer-lower {
  background: linear-gradient(135deg, #0d1321 0%, #1a2744 50%, #0d1321 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200'%3E%3Cdefs%3E%3CradialGradient id='a' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23fff' stop-opacity='.3'/%3E%3Cstop offset='100%25' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='%230d1321' width='400' height='200'/%3E%3Ccircle fill='%23fff' cx='50' cy='30' r='1' opacity='.6'/%3E%3Ccircle fill='%23fff' cx='120' cy='80' r='.8' opacity='.5'/%3E%3Ccircle fill='%23fff' cx='200' cy='40' r='1.2' opacity='.7'/%3E%3Ccircle fill='%23fff' cx='280' cy='90' r='.6' opacity='.4'/%3E%3Ccircle fill='%23fff' cx='350' cy='50' r='1' opacity='.6'/%3E%3Ccircle fill='%23fff' cx='80' cy='120' r='.7' opacity='.5'/%3E%3Ccircle fill='%23fff' cx='160' cy='150' r='1' opacity='.6'/%3E%3Ccircle fill='%23fff' cx='240' cy='130' r='.5' opacity='.4'/%3E%3Ccircle fill='%23fff' cx='320' cy='160' r='.9' opacity='.5'/%3E%3Ccircle fill='%23fff' cx='380' cy='110' r='.7' opacity='.6'/%3E%3C/svg%3E");
  background-size: cover;
  padding: 32px 24px;
  color: #fff;
}

.footer-lower-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-lower-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-lower-logo svg {
  width: 48px;
  height: 48px;
}

.footer-lower-logo span {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.footer-lower-info {
  text-align: right;
}

.footer-lower-links {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.footer-lower-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
  transition: color 0.2s;
}

.footer-lower-links a:hover {
  color: #fff;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}

.footer-license {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* ========================================
   Common Components
   ======================================== */

/* Page Title */
.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a2744;
  text-align: center;
  padding: 100px 24px 40px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1a2744;
  color: #fff;
  padding: 14px 40px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #2a3a5a;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: #1a2744;
  padding: 14px 40px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid #1a2744;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #1a2744;
  color: #fff;
}

.btn-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #e67e22;
  color: #fff;
  padding: 12px 32px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-orange:hover {
  background: #d35400;
}

/* ========================================
   Responsive - Tablet
   ======================================== */
@media (max-width: 992px) {
  .logo-subtitle {
    display: none;
  }

  .logo-divider {
    display: none;
  }

  .nav-link {
    padding: 0 12px;
    font-size: 0.85rem;
  }

  .footer-upper-inner {
    flex-direction: column;
  }

  .footer-nav {
    flex-direction: row;
    gap: 40px;
    width: 100%;
  }
}

/* ========================================
   Responsive - Mobile
   ======================================== */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a2744;
    flex-direction: column;
    padding: 16px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    height: auto;
  }

  .nav.active {
    display: flex;
  }

  .nav-item {
    width: 100%;
    height: auto;
  }

  .nav-link {
    padding: 14px 16px;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-search {
    padding: 14px 16px;
    justify-content: flex-start;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-upper-inner {
    flex-direction: column;
  }

  .footer-nav {
    flex-direction: column;
    gap: 32px;
    width: 100%;
  }

  .footer-lower-inner {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .footer-lower-info {
    text-align: center;
  }

  .page-title {
    font-size: 1.8rem;
    padding: 80px 24px 30px;
  }
}
