/* Venus Operational View – brochure-style module page */

html {
  scroll-behavior: smooth;
}

/* Offset anchor scroll for fixed header so content is not hidden */
#sample-management,
#multi-bom,
#streamlined-ta,
#color-size-entry,
#job-order-consolidation,
#fabric-planning,
#fabric-marker-planning,
#shopfloor-management {
  scroll-margin-top: 80px;
}

.venus-op-page {
  background: #fff;
  min-height: 100vh;
  color: #1a202c;
}

/* Hero */
.op-hero {
  padding: 3.5rem 0 3rem;
  text-align: center;
  background: #fff;
}

/* Hero background: exact container = section.op-hero.hero-operational */
.op-hero.hero-operational {
  background-color: transparent;
  background-image: url('/images/operational/operational-bg.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.op-hero.hero-operational .op-hero-title {
  color: #90D2B5;
}

.op-hero.hero-operational .op-hero-subtitle,
.op-hero.hero-operational .op-hero-intro {
  color: #FFFFFF;
}

.op-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0d3d38;
}

.op-hero-subtitle {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a202c;
}

.op-hero-intro {
  margin: 1rem auto 0;
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.6;
  color: #4a5568;
}

/* Two-column layout: left nav, right content */
.op-page-layout {
  display: flex;
  min-height: 0;
}

.op-sidebar {
  flex-shrink: 0;
  width: 260px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  align-self: flex-start;
  z-index: 50;
}

.op-sidebar-nav {
  padding: 1.5rem 0 2rem 0;
}

.menu-section-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #1f7a6b;
  margin: 0 0 1rem;
  padding: 0 1rem 0 1.25rem;
}

.op-sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.op-sidebar-list li {
  margin: 0;
  border-bottom: 1px solid #E6E6E6;
}

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

.op-section-nav-link {
  display: block;
  padding: 0.5rem 1rem 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #4a5568;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}

.op-section-nav-link:hover {
  color: #0d3d38;
  background: #f9fafb;
  padding-left: calc(1.25rem + 4px);
}

.op-section-nav-link.is-active {
  color: #1f7a6b;
  border-left-color: #1f7a6b;
  background: #f0f7f6;
}

.op-main {
  flex: 1;
  min-width: 0;
}

/* Scroll progress divider between sidebar and content */
.operational-divider {
  flex-shrink: 0;
  width: 5px;
  align-self: stretch;
  position: relative;
  background: #E5E7EB;
}

.scroll-progress-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: var(--scroll-progress, 0%);
  max-height: 100%;
  background: #1f7a6b;
  transition: height 0.2s ease;
}

/* Mobile: hide divider when nav is on top */
@media (max-width: 900px) {
  .operational-divider {
    display: none;
  }
}

/* Mobile: horizontal nav on top */
@media (max-width: 900px) {
  .op-page-layout {
    flex-direction: column;
  }

  .op-sidebar {
    width: 100%;
    position: sticky;
    top: 0;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
  }

  .op-sidebar-nav {
    padding: 0.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .op-sidebar-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 1rem;
  }

  .op-sidebar-list li {
    flex-shrink: 0;
    border-bottom: none;
  }

  .op-section-nav-link {
    padding: 0.5rem 1rem;
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .op-section-nav-link.is-active {
    border-left: none;
    border-bottom-color: #1f7a6b;
    background: transparent;
  }
}

/* Module sections */
.op-module {
  padding: 3.5rem 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.op-module:nth-child(even) {
  background: #fafbfc;
}

.op-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.op-module-grid-reverse .op-module-content {
  order: 2;
}

.op-module-grid-reverse .op-module-visual {
  order: 1;
}

@media (max-width: 900px) {
  .op-module-grid,
  .op-module-grid-reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .op-module-grid-reverse .op-module-content,
  .op-module-grid-reverse .op-module-visual {
    order: unset;
  }
}

.op-module-content {
  min-width: 0;
}

.op-module-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0d3d38;
}

.op-module-headline {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #374151;
}

.op-module-content p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #4a5568;
}

.op-module-highlights-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: #1a202c;
}

.op-module-highlights {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #4a5568;
}

.op-module-highlights li {
  margin-bottom: 0.35rem;
}

.op-module-highlights .highlight-title {
  font-weight: 600;
  color: #0d3d38;
}

/* Visual column */
.op-module-visual {
  min-width: 0;
}

.op-screenshot-placeholder {
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.op-screenshot-placeholder img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.op-screenshot-16x9 {
  width: 100%;
}

.op-screenshot-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #6b7280;
}

.op-screenshot-caption {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
}

.op-testimonial {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #1f7a6b;
  background: #f0f7f6;
  border-radius: 0 8px 8px 0;
}

.op-testimonial p {
  margin: 0;
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.5;
  color: #374151;
}

/* CTA */
.op-cta {
  padding: 3.5rem 0;
  text-align: center;
  background: #fafbfc;
  border-top: 1px solid #e5e7eb;
}

.op-cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  color: #0d3d38;
}

.op-cta-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  background: #1f7a6b;
  color: #fff;
  border: none;
}

.op-cta-btn:hover {
  background: #2bb673;
  color: #fff;
  text-decoration: none;
}

/* ========== Mobile: header 固定、submenu fixed 置頂、不遮內容 (max-width: 768px) ========== */
@media (max-width: 768px) {
  /* header 固定 */
  .venus-site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }

  /* submenu 固定定位，緊貼 header 下方（top = header 高度 72px） */
  .operational-tabs,
  .operational-submenu,
  .core-module-nav,
  .op-sidebar {
    position: fixed !important;
    top: 72px !important;
    left: 0;
    width: 100%;
    z-index: 999;
    background: #fff;
  }

  /* 主內容區塊預留 header + submenu 高度，避免被遮住 */
  .operational-view-section {
    margin-top: 120px !important;
    overflow: visible !important;
  }

  /* 實際主內容 .op-main 預留 submenu 高度（header 72px 已由 body padding 處理） */
  .op-main {
    padding-top: 48px !important;
  }

  body {
    padding-top: 72px !important;
  }

  .core-workflow-section .highlight-block,
  .operational-view-section .highlight-block,
  .section-highlight,
  .full-width-block {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    border-radius: 0 !important;
  }

  .core-workflow-section .container,
  .operational-view-section .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
