/* Tavitool Unified Site Framework v1.0.0
 * Swiss Minimalist Design System (#0F2942 Deep Navy + #0F766E Nordic Teal)
 * Shared across all Tavitool pages & products (Header, Footer, High-Conversion Landing/Hub UI)
 */
:root {
  --tv-navy: #0F2942;
  --tv-navy-2: #163a5c;
  --tv-teal: #0F766E;
  --tv-teal-dark: #0b5d57;
  --tv-teal-soft: #f0fdfa;
  --tv-bg: #f8fafc;
  --tv-surface: #ffffff;
  --tv-border: #e2e8f0;
  --tv-text: #0f172a;
  --tv-muted: #475569;
  --tv-radius: 14px;
  --tv-shadow: 0 4px 20px rgba(15, 41, 66, 0.06);
}

.tv-page {
  margin: 0;
  font-family: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  background: var(--tv-bg);
  color: var(--tv-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.tv-page *, .tv-page *::before, .tv-page *::after { box-sizing: border-box; }
.tv-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Sticky Footer across ALL Tavitool pages */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#tavitool-site-footer {
  margin-top: auto;
}
@media print {
  body { display: block !important; min-height: auto !important; }
  .tv-header, .tv-footer, .no-print { display: none !important; }
}

/* ========== UNIFIED HEADER ========== */
.tv-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tv-border);
}
.tv-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tv-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--tv-navy);
  flex-shrink: 0;
}
.tv-brand-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.tv-brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--tv-navy); }
.tv-sub-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tv-teal);
  background: var(--tv-teal-soft);
  border: 1px solid #99f6e4;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.tv-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tv-nav-link {
  text-decoration: none;
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 9px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tv-nav-link:hover { background: #f1f5f9; color: var(--tv-navy); }
.tv-nav-link.active { background: #eef6ff; color: var(--tv-navy); }

.tv-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.tv-lang-select {
  appearance: auto;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--tv-navy);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.tv-menu-btn {
  display: none;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
  color: var(--tv-navy);
  cursor: pointer;
}

@media (max-width: 900px) {
  .tv-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .tv-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--tv-border);
    padding: 10px 16px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: 0 12px 24px rgba(15, 41, 66, 0.08);
  }
  .tv-nav.open { display: flex; }
  .tv-nav-link { padding: 10px 12px; }
  .tv-sub-pill { display: none; }
}

/* ========== UNIFIED FOOTER ========== */
.tv-footer {
  margin-top: 56px;
  border-top: 1px solid var(--tv-border);
  background: #ffffff;
  color: var(--tv-muted);
  font-size: 13px;
}
.tv-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.tv-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.tv-footer a { color: #334155; text-decoration: none; font-weight: 500; }
.tv-footer a:hover { color: var(--tv-teal); text-decoration: underline; }

/* ========== SHARED LANDING & HUB COMPONENTS ========== */
.tv-hero {
  padding: 52px 0 36px;
  text-align: center;
}
.tv-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tv-teal);
  background: var(--tv-teal-soft);
  border: 1px solid #99f6e4;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.tv-hero h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--tv-navy);
  margin: 0 auto 16px;
  max-width: 840px;
}
.tv-hero-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--tv-muted);
  max-width: 720px;
  margin: 0 auto 26px;
}
.tv-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.tv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s;
}
.tv-btn:hover { transform: translateY(-1px); }
.tv-btn-primary { background: var(--tv-navy); color: #fff; }
.tv-btn-primary:hover { background: var(--tv-navy-2); }
.tv-btn-accent { background: var(--tv-teal); color: #fff; }
.tv-btn-accent:hover { background: var(--tv-teal-dark); }
.tv-btn-ghost { background: #fff; color: var(--tv-navy); border-color: #cbd5e1; }
.tv-btn-ghost:hover { border-color: var(--tv-navy); background: #f8fafc; }

.tv-section { padding: 34px 0; }
.tv-section-head { text-align: center; margin-bottom: 26px; }
.tv-section-head h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  color: var(--tv-navy);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.tv-section-head p { margin: 0 auto; max-width: 660px; color: var(--tv-muted); font-size: 15px; }

.tv-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.tv-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .tv-grid-2, .tv-grid-3 { grid-template-columns: 1fr; } }

.tv-card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 24px;
  box-shadow: var(--tv-shadow);
  display: flex;
  flex-direction: column;
}
.tv-product-card {
  padding: 28px;
  transition: border-color .15s, box-shadow .15s;
}
.tv-product-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 10px 28px rgba(15, 41, 66, 0.09);
}
.tv-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--tv-teal);
  background: var(--tv-teal-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.tv-card h3 { font-size: 19px; color: var(--tv-navy); margin: 0 0 8px; }
.tv-card p { margin: 0 0 14px; color: var(--tv-muted); font-size: 14.5px; }

.tv-check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #334155;
}
.tv-check-list li::before {
  content: "✓";
  color: var(--tv-teal);
  font-weight: 800;
  margin-right: 8px;
}
.tv-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Pain-Point Contrast Cards */
.tv-pain-card {
  border-radius: var(--tv-radius);
  padding: 24px 26px;
  border: 1px solid var(--tv-border);
}
.tv-pain-old { background: #fff; border-color: #fecaca; }
.tv-pain-new { background: linear-gradient(135deg, #f0fdfa 0%, #eff6ff 100%); border-color: #99f6e4; }
.tv-x-list {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: #475569;
}
.tv-x-list li::before { content: "✕"; color: #dc2626; font-weight: 800; margin-right: 8px; }

/* Alternating Visual Feature Showcase Rows */
.tv-feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--tv-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--tv-shadow);
  margin-bottom: 20px;
}
.tv-feature-row.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.tv-feature-row.reverse .tv-feature-media { order: 2; }
@media (max-width: 860px) {
  .tv-feature-row, .tv-feature-row.reverse { grid-template-columns: 1fr; padding: 18px; }
  .tv-feature-row.reverse .tv-feature-media { order: 0; }
}
.tv-feature-copy h3 { font-size: 21px; color: var(--tv-navy); margin: 0 0 10px; line-height: 1.3; }
.tv-feature-copy p { font-size: 14.5px; color: var(--tv-muted); margin: 0 0 14px; }

.tv-preview-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 1px solid var(--tv-border);
  margin-bottom: 14px;
  display: block;
  background: #f8fafc;
}
.tv-feature-media .tv-preview-img { margin-bottom: 0; }

.tv-compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--tv-radius);
  overflow: hidden;
  border: 1px solid var(--tv-border);
  font-size: 14px;
}
.tv-compare-table th, .tv-compare-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.tv-compare-table th { background: #f8fafc; color: var(--tv-navy); font-weight: 700; }
.tv-compare-table tr:last-child td { border-bottom: none; }

.tv-faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.tv-faq-item {
  background: #fff;
  border: 1px solid var(--tv-border);
  border-radius: 12px;
  padding: 16px 20px;
}
.tv-faq-item summary {
  font-weight: 700;
  color: var(--tv-navy);
  cursor: pointer;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.tv-faq-item summary::after { content: "▾"; color: var(--tv-teal); font-size: 14px; }
.tv-faq-item[open] summary::after { content: "▴"; }
.tv-faq-item p { margin: 10px 0 0; color: var(--tv-muted); font-size: 14px; }

.tv-promo-strip {
  background: linear-gradient(135deg, #f0fdfa 0%, #eff6ff 100%);
  border: 1px solid #bae6fd;
  border-radius: 16px;
  padding: 26px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.tv-prose-card {
  background: #fff;
  border: 1px solid var(--tv-border);
  border-radius: 16px;
  padding: 32px;
  max-width: 880px;
  margin: 28px auto 0;
  box-shadow: var(--tv-shadow);
}
.tv-prose-card h1 { font-size: clamp(24px, 3vw, 32px); color: var(--tv-navy); margin: 0 0 10px; }
.tv-prose-card h2 { font-size: 19px; color: var(--tv-navy); margin: 26px 0 10px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.tv-prose-card p, .tv-prose-card li { font-size: 15px; color: #334155; }
.tv-prose-card ul { padding-left: 20px; }
.tv-prose-card li { margin-bottom: 8px; }


/* ========== UNIVERSAL CLICK-TO-ZOOM IMAGE LIGHTBOX ========== */
.tv-zoom-wrap {
  position: relative;
  display: block;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.tv-feature-media .tv-zoom-wrap { margin-bottom: 0; }
.tv-zoom-wrap .tv-preview-img { margin-bottom: 0; transition: transform .22s ease; }
.tv-zoom-wrap:hover .tv-preview-img { transform: scale(1.015); }
.tv-zoom-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 41, 66, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.tv-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.tv-lightbox-backdrop.hidden { display: none !important; }
.tv-lightbox-frame {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tv-lightbox-img {
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.tv-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #0F2942;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.tv-lightbox-close:hover { background: #0F766E; }
.tv-lightbox-caption {
  margin-top: 10px;
  color: #e2e8f0;
  font-size: 13.5px;
  text-align: center;
  max-width: 80vw;
}
