/* SpeedSync EDA Product Page Styles (scoped under .eda-page) */

.eda-page {
  --eda-navy: #101c32;
  --eda-ink: #182941;
  --eda-muted: #4e5e73;
  --eda-blue: #2353a6;
  --eda-aqua: #9be5e3;
  --eda-line: #d9e1eb;
  --eda-paper: #f3f6fb;
  --eda-white: #ffffff;
  color: var(--eda-ink);
  background: var(--eda-white);
  font-family: var(--font-default, "Roboto", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif);
  line-height: 1.75;
}

.eda-page h1,
.eda-page h2,
.eda-page h3 {
  font-family: var(--font-heading, "Roboto", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif);
  font-weight: 700;
  margin: 0;
}

.eda-page p,
.eda-page figure,
.eda-page dl,
.eda-page dd {
  margin: 0;
}

.eda-page :focus-visible {
  outline: 3px solid #168cbb;
  outline-offset: 4px;
}

.eda-wrap {
  width: min(1180px, calc(100% - 56px));
  margin-inline: auto;
}

/* Sub-navigation bar for EDA sections */
.eda-subnav {
  background: var(--eda-navy);
  color: var(--eda-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.eda-subnav .eda-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 26px;
  padding-block: 14px;
}

.eda-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0.025em;
  white-space: nowrap;
  color: var(--eda-white);
}

.eda-brand img {
  display: block;
  width: 34px;
  height: auto;
  flex-shrink: 0;
}

.eda-brand b {
  color: var(--eda-aqua);
}

.eda-brand-sub {
  font-size: 0.82rem;
  font-weight: 500;
  color: #cfe0f5;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.eda-subnav-links {
  display: flex;
  gap: 6px 22px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.eda-subnav-links a {
  color: #e2edf9;
  text-decoration: none;
  transition: color 0.2s ease;
}

.eda-subnav-links a:hover {
  color: var(--eda-aqua);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Hero section */
.eda-hero {
  background: radial-gradient(ellipse at 82% 15%, #223c62, var(--eda-navy) 63%);
  color: var(--eda-white);
  padding-block: clamp(42px, 6vw, 76px) 38px;
}

.eda-hero-copy {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: end;
  gap: 16px 42px;
  margin-bottom: 27px;
}

.eda-category {
  color: var(--eda-blue);
  font-size: 0.87rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.eda-hero .eda-category {
  color: var(--eda-aqua);
}

.eda-page h1 {
  margin-top: 9px;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.18;
  color: var(--eda-white);
}

.eda-page h2 {
  margin-top: 7px;
  font-size: clamp(1.6rem, 3.1vw, 2.45rem);
  letter-spacing: -0.025em;
  line-height: 1.29;
  color: var(--eda-ink);
}

.eda-page h3 {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--eda-ink);
}

.eda-hero-copy > p {
  color: #dfebfa;
  font-size: 1.03rem;
}

/* Content sections */
.eda-page section.eda-section {
  padding: clamp(46px, 6vw, 76px) 0;
  overflow: visible;
  scroll-margin-top: 92px;
}

.eda-shade {
  background: var(--eda-paper);
  border-block: 1px solid var(--eda-line);
}

.eda-ai-section {
  border-bottom: 1px solid var(--eda-line);
}

.eda-heading {
  max-width: 790px;
  margin-bottom: 24px;
}

.eda-heading > p:last-child {
  margin-top: 11px;
}

.eda-heading > p:last-child,
.eda-detail p,
.eda-cards p,
.eda-page dd,
.eda-page figcaption {
  color: var(--eda-muted);
}

/* Grids */
.eda-figure-grid,
.eda-split,
.eda-cards,
.eda-examples {
  display: grid;
  gap: 20px;
  align-items: start;
}

.eda-figure-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eda-split {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
}

.eda-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 24px;
  align-items: stretch;
}

.eda-examples {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.eda-detail,
.eda-cards article {
  padding: 18px 19px;
  border: 1px solid var(--eda-line);
  background: var(--eda-white);
  border-radius: 12px;
}

.eda-detail + .eda-detail,
.eda-ai-example {
  margin-top: 12px;
}

.eda-detail p,
.eda-cards p {
  margin-top: 7px;
}

/* Screenshots & captions */
.eda-screenshot {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
  border: 1px solid var(--eda-line);
  border-radius: 11px;
  background: var(--eda-white);
  box-shadow: 0 7px 18px rgba(16, 39, 73, 0.05);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.eda-screenshot:hover {
  border-color: #6494cd;
}

.eda-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.eda-hero .eda-screenshot {
  border-color: #526784;
}

.eda-page figcaption {
  margin-top: 9px;
  font-size: 0.88rem;
}

.eda-page figcaption strong {
  margin-right: 0.5em;
  color: var(--eda-ink);
}

.eda-hero figcaption,
.eda-hero figcaption strong {
  color: #e3effc;
}

.eda-examples .eda-screenshot img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--eda-paper);
}

.eda-aux {
  margin-top: 20px;
}

.eda-page details > summary {
  width: fit-content;
  color: var(--eda-blue);
  font-weight: 700;
  cursor: pointer;
}

/* Definition list */
.eda-page dl {
  border-top: 1px solid var(--eda-line);
}

.eda-page dl > div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 6px 18px;
  padding-block: 13px;
  border-bottom: 1px solid var(--eda-line);
}

.eda-page dt {
  font-weight: 700;
  color: var(--eda-ink);
}

/* Bottom CTA & Demo Note */
.eda-cta {
  background: var(--eda-navy);
  color: var(--eda-white);
  padding-block: 42px;
}

.eda-cta .eda-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.eda-cta h2 {
  color: var(--eda-white);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin: 0 0 6px;
}

.eda-cta p {
  color: #dce8f7;
  font-size: 0.94rem;
}

.eda-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.eda-btn-primary,
.eda-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.eda-btn-primary {
  background: var(--eda-aqua);
  color: var(--eda-navy);
}

.eda-btn-primary:hover {
  background: #b9f1ef;
  color: var(--eda-navy);
}

.eda-btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--eda-white);
}

.eda-btn-outline:hover {
  border-color: var(--eda-white);
  background: rgba(255, 255, 255, 0.1);
  color: var(--eda-white);
}

/* Lightbox Dialog */
dialog.eda-viewer {
  width: max-content;
  max-width: min(96vw, 1920px);
  max-height: 94vh;
  padding: 0;
  border: 1px solid #d9e1eb;
  color: #182941;
  border-radius: 12px;
  margin: auto;
  overflow: hidden;
}

dialog.eda-viewer::backdrop {
  background: rgba(8, 19, 36, 0.85);
}

.eda-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 9px 13px;
  background: #ffffff;
  border-bottom: 1px solid #d9e1eb;
}

.eda-viewer-bar button {
  font: inherit;
  color: #182941;
  background: #f3f6fb;
  border: 1px solid #d9e1eb;
  border-radius: 7px;
  padding: 2px 11px;
  cursor: pointer;
}

.eda-viewer-img {
  display: block;
  max-width: 100%;
  max-height: 83vh;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 800px) {
  .eda-wrap {
    width: calc(100% - 32px);
  }
  .eda-subnav .eda-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .eda-subnav-links {
    column-gap: 14px;
  }
  .eda-hero-copy,
  .eda-split,
  .eda-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .eda-figure-grid,
  .eda-examples,
  .eda-page dl > div {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

@page {
  size: A4 portrait;
  margin: 16mm 13mm 16mm 13mm;
  @top-left {
    content: "SpeedSync EDA｜企業資料分析平台";
    font-family: "Roboto", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 8.5pt;
    font-weight: 700;
    color: #182941;
    border-bottom: 0.6pt solid #d9e1eb;
    padding-bottom: 3mm;
    margin-bottom: 3mm;
    vertical-align: bottom;
  }
  @top-right {
    content: "企業 IT 採購評估";
    font-family: "Roboto", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 8.5pt;
    color: #4e5e73;
    border-bottom: 0.6pt solid #d9e1eb;
    padding-bottom: 3mm;
    margin-bottom: 3mm;
    vertical-align: bottom;
  }
  @bottom-left {
    content: "速析科技 SpeedSync Technology  ｜  service@speedsync.com.tw  ｜  www.speedsync.com.tw";
    font-family: "Roboto", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 8pt;
    color: #4e5e73;
    border-top: 0.6pt solid #d9e1eb;
    padding-top: 3mm;
    margin-top: 3mm;
    vertical-align: top;
  }
  @bottom-right {
    content: "第 " counter(page) " 頁，共 " counter(pages) " 頁";
    font-family: "Roboto", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 8pt;
    font-weight: 600;
    color: #182941;
    border-top: 0.6pt solid #d9e1eb;
    padding-top: 3mm;
    margin-top: 3mm;
    vertical-align: top;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  html,
  body {
    font-size: 11.5px;
    background: #ffffff !important;
  }
  #topbar,
  #header,
  #footer,
  .scroll-top,
  #preloader,
  .eda-subnav-links,
  .eda-cta-actions,
  dialog.eda-viewer {
    display: none !important;
  }
  .eda-wrap {
    width: 100% !important;
    max-width: none !important;
  }
  .eda-subnav {
    border-radius: 10px 10px 0 0;
  }
  .eda-subnav .eda-wrap {
    padding: 10px 16px;
  }
  .eda-hero {
    padding: 15px 18px 14px !important;
    border-radius: 0 0 10px 10px;
    margin-bottom: 8px;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .eda-hero-copy {
    grid-template-columns: 1.25fr 1fr;
    gap: 8px 20px;
    margin-bottom: 11px;
  }
  .eda-page h1 {
    font-size: 1.85rem;
    margin-top: 3px;
  }
  .eda-page h2 {
    font-size: 1.4rem;
    margin-top: 3px;
  }
  .eda-page h3 {
    font-size: 1rem;
  }
  .eda-page section.eda-section {
    padding: 12px 0 !important;
    overflow: visible !important;
  }
  #data {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #dashboards {
    break-before: page;
    page-break-before: always;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #ai {
    break-before: page;
    page-break-before: always;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #access {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #delivery {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .eda-shade {
    padding-inline: 14px !important;
    border-radius: 10px;
    border: 1px solid #d9e1eb;
    margin-block: 8px;
  }
  .eda-heading {
    margin-bottom: 12px;
    break-after: avoid;
    page-break-after: avoid;
  }
  .eda-heading > p:last-child {
    margin-top: 5px;
  }
  .eda-figure-grid,
  .eda-examples {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }
  .eda-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px;
    margin-block: 12px;
  }
  .eda-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
    gap: 14px;
  }
  .eda-detail,
  .eda-cards article {
    padding: 10px 12px;
  }
  .eda-detail + .eda-detail,
  .eda-ai-example {
    margin-top: 8px;
  }
  .eda-aux {
    margin-top: 12px;
  }
  .eda-page details {
    display: block !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .eda-page details > summary {
    list-style: none;
    margin-bottom: 8px;
  }
  .eda-page details > summary::-webkit-details-marker {
    display: none;
  }
  .eda-screenshot {
    box-shadow: none;
  }
  .eda-screenshot img {
    max-height: 74mm;
    width: 100%;
    object-fit: contain;
    background: #ffffff;
  }
  .eda-hero .eda-screenshot img {
    max-height: 76mm;
  }
  .eda-figure-grid .eda-screenshot img,
  .eda-examples .eda-screenshot img {
    max-height: 52mm;
  }
  .eda-cta::after {
    content: "聯絡信箱：service@speedsync.com.tw  ｜  官方網站：https://www.speedsync.com.tw";
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #9be5e3;
    font-weight: 600;
  }
  .eda-page figcaption {
    margin-top: 5px;
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .eda-page dl > div {
    grid-template-columns: 9.5rem 1fr;
    gap: 4px 12px;
    padding-block: 7px;
  }
  .eda-cta {
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 12px;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .eda-page h1,
  .eda-page h2,
  .eda-page h3,
  .eda-category {
    break-after: avoid;
    page-break-after: avoid;
  }
  .eda-page figure,
  .eda-detail,
  .eda-cards,
  .eda-cards article,
  .eda-figure-grid,
  .eda-split,
  .eda-page dl > div {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
