/* ====================================
   SERVICES.CSS - IMPROVED VERSION
   ====================================*/

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

:root {
  /* Primary Colors - Clean Energy Theme */
  --primary-green: #2ECC71;
  --primary-dark: #27AE60;
  --accent-blue: #3498DB;
  --accent-orange: #F39C12;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --light-gray: #F8F9FA;
  --medium-gray: #6C757D;
  --dark-gray: #343A40;
  --black: #1A1A1A;
  
  /* Typography */
  --font-primary: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 80px 0;
  --border-radius: 12px;
  --border-radius-small: 6px;
  
  /* Shadows */
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Typography Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Body Styles */
body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
  overflow-x: hidden;
}

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

/* ====================================
   HEADER & NAVIGATION
   ====================================*/

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #000;
  color: #fff;
  z-index: 1000;
  transition: all var(--transition-medium);
}

nav.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-image {
  height: 40px;
  width: auto;
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 15px;
  transition: all var(--transition-fast);
  position: relative;
  padding: 8px 0;
}

.nav-links a:hover {
  color: var(--accent-blue);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: width var(--transition-medium);
}

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

.cta-nav {
  background: var(--accent-blue) !important;
  color: var(--white) !important;
  padding: 12px 24px !important;
  border-radius: var(--border-radius-small);
  font-weight: 600;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-medium);
}

.cta-nav::after {
  display: none !important;
}

.cta-nav:hover {
  background: #2980b9 !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 32px;
  height: 24px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 1100;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ====================================
   MAIN CONTENT SECTIONS
   ====================================*/

main {
  padding-top: 70px; /* Account for fixed header */
}

/* Hero Section */
.hero-secondary {
  background: url('assets/services-hero.jpg') center center / cover no-repeat;
  color: white;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-secondary::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 24px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  margin-bottom: 40px;
  opacity: 0.9;
}

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

.hero-stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-orange);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Services Overview */
.services-overview {
  padding: 80px 0;
  background: #fff;
}

.services-intro {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.services-intro h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 800;
  color: var(--dark-gray);
}

.services-intro p {
  color: var(--medium-gray);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Main Services */
.main-services {
  padding: 80px 0;
  background: var(--light-gray);
}

.main-services .container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.service-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: #fff;
  border-radius: 20px;
  padding: 50px;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-medium);
  align-items: center;
}

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

.service-card.featured {
  border: 3px solid var(--accent-blue);
  position: relative;
}

.service-card.featured::before {
  content: '熱門服務';
  position: absolute;
  top: -12px;
  left: 40px;
  background: var(--accent-blue);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.service-content {
  order: 1;
}

.service-card:nth-child(even) .service-content {
  order: 2;
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.service-content h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--dark-gray);
}

.service-content p {
  color: var(--medium-gray);
  margin-bottom: 24px;
  line-height: 1.7;
  font-size: 1.1rem;
}

.service-features {
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.service-features li {
  margin: 8px 0;
  color: var(--dark-gray);
  font-size: 15px;
}

.service-pricing {
  font-weight: 700;
  margin: 24px 0;
  font-size: 1.2rem;
  color: var(--primary-green);
}

.price-from {
  margin-right: 8px;
}

.price-note {
  font-weight: 400;
  color: var(--medium-gray);
  font-size: 14px;
  display: block;
  margin-top: 4px;
}

/* Service Images */
.service-image {
  position: relative;
}

.service-image-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  height: 300px;
}

.placeholder-image {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--medium-gray);
  font-size: 16px;
  transition: all var(--transition-medium);
}

.placeholder-image.premium {
  background: linear-gradient(135deg, var(--primary-green), var(--primary-dark));
  color: #fff;
}

.placeholder-image.tech {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #fff;
}

.placeholder-image:hover {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.image-overlay span {
  font-size: 18px;
  font-weight: 600;
}

.image-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-features span {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

/* Additional Services */
.additional-services {
  padding: 80px 0;
  background: #fff;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 800;
  color: var(--dark-gray);
  position: relative;
  text-align: center;
}

.title-decoration {
  position: relative;
}

.title-decoration::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-blue));
  border-radius: 2px;
}

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

.additional-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-medium);
}

.additional-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-blue);
}

.additional-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
}

.additional-card h4 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--dark-gray);
}

.additional-card p {
  color: var(--medium-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-link {
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.card-link:hover {
  color: var(--primary-dark);
}

/* Pricing Info */
.pricing-info {
  background: var(--light-gray);
  padding: 80px 0;
}

.pricing-wrapper {
  display: grid;
  gap: 60px;
  grid-template-columns: 1fr 400px;
  align-items: center;
}

.pricing-content h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  font-weight: 800;
  color: var(--dark-gray);
}

.pricing-content p {
  color: var(--medium-gray);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 40px;
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pricing-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pricing-icon {
  font-size: 1.5rem;
  margin-top: 4px;
}

.pricing-item h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--dark-gray);
}

.pricing-item p {
  color: var(--medium-gray);
  margin: 0;
}

.pricing-cta {
  background: linear-gradient(135deg, var(--accent-blue), #2980b9);
  color: #fff;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-medium);
}

.pricing-cta h3 {
  margin-bottom: 16px;
  font-size: 1.6rem;
  font-weight: 700;
}

.pricing-cta p {
  opacity: 0.9;
  margin-bottom: 24px;
  font-size: 1rem;
}

/* Service Guarantee */
.service-guarantee {
  padding: 80px 0;
  background: #fff;
}

.guarantee-content {
  text-align: center;
  margin-bottom: 60px;
}

.guarantee-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.guarantee-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-medium);
}

.guarantee-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-green);
}

.guarantee-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
}

.guarantee-item h4 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--dark-gray);
}

.guarantee-item p {
  color: var(--medium-gray);
  line-height: 1.6;
}

/* ====================================
   BUTTON STYLES
   ====================================*/

.btn {
  display: inline-block;
  padding: 16px 32px;
  border: 0;
  border-radius: var(--border-radius-small);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-medium);
  cursor: pointer;
  font-size: 16px;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

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

.btn-large {
  padding: 18px 40px;
  font-size: 1.1rem;
}

/* ====================================
   FOOTER
   ====================================*/

footer {
  background: linear-gradient(135deg, #1A1A1A 0%, #2C3E50 100%);
  color: var(--white);
  padding: 60px 0 30px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

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

.footer-section h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-section p,
.footer-section a {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-links {
  list-style: none;
  padding: 0;
}

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

.footer-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  transition: padding-left var(--transition-fast);
}

.footer-links a:hover {
  padding-left: 5px;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all var(--transition-medium);
  backdrop-filter: blur(10px);
  color: #fff;
}

.social-link:hover {
  background: var(--accent-blue);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ====================================
   ANIMATIONS
   ====================================*/

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

.animate-on-scroll {
  animation: fadeInUp 0.8s ease-out;
}

/* ====================================
   RESPONSIVE DESIGN
   ====================================*/

/* Tablet */
@media (max-width: 968px) {
  .service-card {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 30px;
  }
  
  .service-content {
    order: 1 !important;
  }
  
  .pricing-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-stats {
    gap: 30px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Mobile Navigation */
  nav.container {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    padding: 12px 16px !important;
    position: relative;
    z-index: 1200;
  }

  .nav-toggle {
    display: flex !important;
    z-index: 1300;
  }

  .nav-links {
    display: none !important;
  }

  /* Mobile Drawer */
  #primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 75%;
    max-width: 320px;
    background: #111;
    padding: 96px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1250;
  }

  #primary-nav.open {
    display: flex !important;
    transform: translateX(0);
  }

  #primary-nav a {
    color: #fff;
    font-size: 18px;
  }

  /* Mobile Backdrop */
  #nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1240;
  }

  #nav-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* Mobile Content */
  main {
    padding-top: 60px;
  }

  .hero-secondary {
    padding: 80px 0 60px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .additional-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .guarantee-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .service-card {
    padding: 30px 20px;
  }

  .additional-card,
  .guarantee-item {
    padding: 30px 20px;
  }

  .pricing-cta {
    padding: 30px 20px;
  }
}

/* ====================================
   ACCESSIBILITY
   ====================================*/

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
a:focus,
button:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

.certification-badges {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.certification-badges img {
  height: 40px;
  object-fit: contain;
  filter: grayscale(0%);
  transition: transform 0.3s ease;
}

.certification-badges img:hover {
  transform: scale(1.05);
}

.boat-type-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
  border-bottom: 2px solid #ddd;
  padding-bottom: 8px;
}

.boat-type-button {
  border: none;
  background-color: #f5f5f5;
  color: #333;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.boat-type-button:hover {
  background-color: #e0e0e0;
}

.boat-type-button.active {
  background-color: #0a74da;
  color: white;
  font-weight: 600;
  border: 1px solid #0a74da;
}
