/* Goodtech HK - Main Stylesheet */
:root {
  --primary: #1e4d9c;
  --primary-dark: #163a78;
  --primary-light: #e8eef8;
  --accent: #2a5db0;
  --text: #333333;
  --text-light: #555555;
  --white: #ffffff;
  --bg: #f8fafa;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

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

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

a:hover {
  color: var(--accent);
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  gap: 16px;
}

.logo img {
  height: 70px;
  width: auto;
}

.nav-whatsapp {
  display: flex;
  align-items: center;
  padding: 4px !important;
}

.nav-whatsapp img {
  width: 36px;
  height: 36px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: var(--transition);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  z-index: 2000;
  border-radius: 6px;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* Homepage */
body.home {
  background: var(--white);
}

.hero-banner {
  background: #fff;
  border-top: 10px solid #9fdce3;
  border-bottom: 10px solid #9fdce3;
}

.hero-banner-desktop {
  width: 100%;
  height: auto;
  display: block;
}

.hero-banner-mobile {
  display: none;
  padding: 28px 20px 36px;
  text-align: center;
  background:
    radial-gradient(circle at 12% 20%, rgba(159, 220, 227, 0.35) 0 40px, transparent 41px),
    radial-gradient(circle at 88% 80%, rgba(159, 220, 227, 0.3) 0 36px, transparent 37px),
    #fff;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 16px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.hero-banner-mobile h1 {
  color: var(--primary-dark);
  font-size: clamp(1.7rem, 8vw, 2.2rem);
  margin-bottom: 8px;
  line-height: 1.25;
}

.hero-banner-mobile img {
  width: 100%;
  max-width: 520px;
  margin: 16px auto;
  border-radius: 12px;
}

.hero-lead {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.hero-en {
  color: var(--primary-dark);
  font-style: italic;
  margin-top: 4px;
  opacity: 0.85;
}

.hero-points {
  list-style: none;
  margin: 12px auto 20px;
  padding: 16px 18px;
  max-width: 320px;
  background: var(--primary-dark);
  color: #fff;
  border-radius: 12px;
  display: grid;
  gap: 8px;
}

.hero-points li:nth-child(3) {
  background: #fff;
  color: #c4122f;
  font-weight: 700;
  border-radius: 6px;
  padding: 6px 8px;
}

.hero-note {
  color: var(--text);
  margin: 8px 0 20px;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

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

.btn-outline-blue:hover {
  background: var(--primary);
  color: #fff;
}

.stats-bar {
  background: var(--primary-dark);
  color: #fff;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.stat span {
  font-size: 0.85rem;
  opacity: 0.9;
}

.home-section {
  padding: 72px 0;
}

.home-section.tint {
  background: var(--primary-light);
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2 {
  color: var(--primary-dark);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split-copy h2 {
  color: var(--primary-dark);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 16px;
}

.split-copy p {
  color: var(--text-light);
  margin-bottom: 14px;
}

.split-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-cta {
  text-align: center;
  margin-top: 36px;
}

.home-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.home-product {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: transform var(--transition);
}

.home-product:hover {
  transform: translateY(-4px);
  color: var(--primary);
}

.home-product img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 12px;
}

.home-product h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.home-product p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.cta-band {
  position: relative;
  background: var(--primary) url("../images/page-bg.jpg") center / cover no-repeat;
  color: #fff;
  padding: 56px 0;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 58, 120, 0.78);
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.cta-band p {
  opacity: 0.95;
}

/* Homepage — original layout */
body.home .site-header {
  background: #fff;
}

.home-main {
  position: relative;
  z-index: 1;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 300;
  min-height: 180px;
  max-height: 560px;
  overflow: hidden;
  background: #fff;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.hero-slide picture,
.hero-slide img {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-slide img {
  object-fit: cover;
  object-position: center;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  color: #555;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hero-nav:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.hero-dot.active {
  background: var(--white);
  transform: scale(1.2);
}

/* Legacy hero (used on other pages) */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(26, 122, 109, 0.85), rgba(44, 181, 160, 0.75)),
    url("../images/hero-bg.jpg") center/cover no-repeat;
  color: var(--white);
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: var(--primary-dark);
}

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

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

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

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

/* Inner-page sections */
body:not(.home) section {
  padding: 80px 0;
}

body:not(.home) section:nth-of-type(even) {
  background: var(--bg);
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.05rem;
}

.section-title .subtitle {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

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

.feature-card h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.feature-card p {
  color: var(--text-light);
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.two-col img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Promise grid */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.promise-item {
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.promise-item .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.promise-item h3,
.promise-item h4 {
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.promise-item p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.promises-image {
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Application grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
}

.app-item {
  display: block;
  text-align: center;
  padding: 20px 12px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  color: var(--text);
}

.app-item:hover {
  transform: translateY(-4px);
}

.app-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.app-item span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* Product cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: var(--bg);
  padding: 20px;
}

.product-card .product-info {
  padding: 24px;
}

.product-card h3 {
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.product-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.product-card .tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Product detail */
.product-detail {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.product-detail-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

.product-detail img {
  border-radius: var(--radius);
  background: var(--bg);
  padding: 16px;
}

.product-detail h3 {
  color: var(--primary-dark);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.product-detail .highlight {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

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

.product-detail li {
  margin-bottom: 6px;
  color: var(--text-light);
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 600px;
}

.faq-answer p {
  padding: 0 24px 20px;
  color: var(--text-light);
}

/* Certification */
.cert-section {
  margin-bottom: 40px;
}

.cert-section h3 {
  color: var(--primary-dark);
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-tag {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Purchase */
.purchase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.purchase-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}

.purchase-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.purchase-card .purchase-info {
  padding: 24px;
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 600;
}

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  transition: transform var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand img {
  height: 50px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-links h3,
.footer-links h4 {
  color: var(--white);
  margin-bottom: 16px;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Page header */
.page-header {
  background: linear-gradient(135deg, rgba(26, 122, 109, 0.9), rgba(44, 181, 160, 0.8)),
    url("../images/hero-bg.jpg") center/cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 80px 24px;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.page-header p {
  opacity: 0.9;
  font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    display: none;
    max-height: min(80vh, 520px);
    overflow-y: auto;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 12px 16px 20px;
  }

  .logo img {
    height: 52px;
  }
}

@media (max-width: 900px) {
  .home-products,
  .promise-grid,
  .stats-inner {
    grid-template-columns: 1fr 1fr;
  }

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

  .cta-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    aspect-ratio: 16 / 9;
    max-height: 280px;
  }

  .hero-nav {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

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

  .two-col,
  .product-detail-inner,
  .promise-grid,
  .home-products,
  .stats-inner,
  .split,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    text-align: center;
  }

  body:not(.home) section,
  .home-section {
    padding: 48px 0;
  }

  .whatsapp-float {
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
  }
}

@media (max-width: 480px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

  .container {
    padding: 0 16px;
  }
}
