/**
 * Technology Hub — shared layout (aligned with Our Projects / showcase)
 */

.tech-hub-page-main {
  --tech-hub-accent: #1e4d6d;
  --tech-hub-accent-soft: #e8f1f6;
  --tech-hub-ink: #1a2430;
  --tech-hub-muted: #5c6b7a;
  --tech-hub-line: #dde4ec;
  --tech-hub-card-bg: #ffffff;
  --tech-hub-radius: 14px;
  --tech-hub-shadow: 0 4px 24px rgba(26, 36, 48, 0.07);
  --tech-hub-shadow-hover: 0 14px 40px rgba(26, 36, 48, 0.12);
}

body.tech-hub-page-body #main-wrapper.tech-hub-page-main {
  min-height: calc(100vh - 7rem);
  padding-bottom: 14rem;
  box-sizing: border-box;
}

/* Breadcrumb */
.tech-hub-breadcrumb {
  margin: 0 0 1.25rem;
  padding: 0;
}

.tech-hub-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

.tech-hub-breadcrumb-item {
  margin: 0;
  padding: 0;
}

.tech-hub-breadcrumb-item a {
  color: var(--tech-hub-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tech-hub-breadcrumb-item a:hover,
.tech-hub-breadcrumb-item a:focus-visible {
  color: var(--tech-hub-accent);
  text-decoration: none;
}

.tech-hub-breadcrumb-item a:focus-visible {
  outline: 2px solid var(--tech-hub-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.tech-hub-breadcrumb-sep {
  color: #9aa8b5;
  font-size: 1rem;
  user-select: none;
}

.tech-hub-breadcrumb-item--current {
  color: var(--tech-hub-ink);
  font-weight: 600;
}

/* Page hero */
.tech-hub-hero {
  margin: 0 0 2rem;
  padding: 0 0 1.75rem;
  border-bottom: 1px solid var(--tech-hub-line);
  max-width: 52rem;
}

.tech-hub-home-hero {
  margin-bottom: 2.5rem;
}

.tech-hub-title {
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--tech-hub-ink);
  border: none;
}

.tech-hub-lead {
  margin: 0;
  max-width: 38rem;
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 400;
  color: var(--tech-hub-muted);
}

.tech-hub-lead a {
  color: var(--tech-hub-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Hub landing — category cards */
.tech-hub-cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.tech-hub-cat-grid-item {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.tech-hub-cat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: var(--tech-hub-ink) !important;
  background: var(--tech-hub-card-bg);
  border: 1px solid var(--tech-hub-line);
  border-radius: var(--tech-hub-radius);
  overflow: hidden;
  box-shadow: var(--tech-hub-shadow);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.tech-hub-cat-card:hover,
.tech-hub-cat-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--tech-hub-shadow-hover);
  border-color: #b8c9d8;
  color: var(--tech-hub-ink) !important;
}

.tech-hub-cat-card:focus-visible {
  outline: 3px solid var(--tech-hub-accent);
  outline-offset: 3px;
}

.tech-hub-cat-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.tech-hub-cat-card-media--ai {
  background: linear-gradient(135deg, #e8f1f6 0%, #c5dce8 100%);
}

.tech-hub-cat-card-media--news {
  background: linear-gradient(135deg, #f0f4f8 0%, #d4e2ed 100%);
}

.tech-hub-cat-card-media--lab {
  background: linear-gradient(135deg, #eef5f0 0%, #c8e0d4 100%);
}

.tech-hub-cat-card-icon {
  font-size: 3.25rem;
  color: var(--tech-hub-accent);
  opacity: 0.85;
  z-index: 1;
  transition: transform 0.35s ease;
}

.tech-hub-cat-card:hover .tech-hub-cat-card-icon,
.tech-hub-cat-card:focus-visible .tech-hub-cat-card-icon {
  transform: scale(1.08);
}

.tech-hub-cat-card-media-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26, 36, 48, 0.12) 100%);
  pointer-events: none;
}

.tech-hub-cat-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  padding: 1.25rem 1.35rem 1.35rem;
}

.tech-hub-cat-card-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tech-hub-ink);
}

.tech-hub-cat-card-desc {
  display: block;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--tech-hub-muted);
  flex: 1;
}

.tech-hub-cat-card-cta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tech-hub-accent);
}

.tech-hub-cat-card:hover .tech-hub-cat-card-cta,
.tech-hub-cat-card:focus-visible .tech-hub-cat-card-cta {
  color: #163a52;
}

/* Tabs (AI models page) */
.tech-hub-tabs {
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tech-hub-tab {
  padding: 0.55rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--tech-hub-line);
  border-radius: 999px;
  background-color: var(--tech-hub-card-bg);
  color: var(--tech-hub-ink);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tech-hub-tab:hover {
  border-color: #b8c5d4;
  background-color: var(--tech-hub-accent-soft);
  color: var(--tech-hub-accent);
}

.tech-hub-tab.active {
  background-color: #e64626;
  border-color: #e64626;
  color: #fff;
  box-shadow: 0 2px 10px rgba(230, 70, 38, 0.25);
}

.tech-hub-tab.active:hover {
  background-color: #cf3f22;
  border-color: #cf3f22;
  color: #fff;
}

/* Technology / newsletter subpages */
.technology-page .technology-page-header,
.technology-detail-page .technology-detail-header {
  margin: 0 0 2rem;
  padding: 0 0 1.75rem;
  border-bottom: 1px solid var(--tech-hub-line);
  max-width: 52rem;
}

.technology-page .technology-page-header .section-title,
.technology-detail-page .technology-detail-header .section-title {
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--tech-hub-ink, #1a2430);
  border: none;
}

.technology-page .technology-page-header .intro-paragraph,
.technology-detail-page .technology-detail-header .intro-paragraph {
  margin: 0;
  max-width: 38rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--tech-hub-muted, #5c6b7a);
}

/* --------------------------------------------------------------------------
   Lab Technologies — category grid, cards, and instruction detail content
   -------------------------------------------------------------------------- */

.technology-page,
.technology-detail-page {
  --tech-lab-line: var(--tech-hub-line, #dde4ec);
  --tech-lab-ink: var(--tech-hub-ink, #1a2430);
  --tech-lab-muted: var(--tech-hub-muted, #5c6b7a);
  --tech-lab-accent: var(--tech-hub-accent, #1e4d6d);
  --tech-lab-radius: var(--tech-hub-radius, 14px);
  --tech-lab-shadow: var(--tech-hub-shadow, 0 4px 24px rgba(26, 36, 48, 0.07));
}

/* Override main.css gradient header — match tech hub */
.technology-page .technology-page-header {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--tech-lab-line);
  border-radius: 0;
  padding: 0 0 1.75rem;
  box-shadow: none;
  max-width: 52rem;
}

/* Category / lab home card grid */
.technology-page .technology-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.technology-page .technology-card {
  padding: 0;
  border-radius: var(--tech-lab-radius);
  border: 1px solid var(--tech-lab-line);
  box-shadow: var(--tech-lab-shadow);
  overflow: hidden;
  gap: 0;
}

.technology-page .technology-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--tech-hub-shadow-hover, 0 14px 40px rgba(26, 36, 48, 0.12));
  border-color: #b8c9d8;
}

.technology-page .technology-thumb {
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 0;
  background: linear-gradient(135deg, #eef2f6 0%, #dce6ef 100%);
}

.technology-page .technology-thumb img {
  object-fit: cover;
}

.technology-page .technology-card h3,
.technology-page .technology-card .tech-short-description,
.technology-page .technology-card .tech-card-cta {
  padding-left: 1.35rem;
  padding-right: 1.35rem;
}

.technology-page .technology-card h3 {
  margin-top: 1.15rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tech-lab-ink);
}

.technology-page .technology-card .tech-short-description {
  font-weight: 400;
  color: var(--tech-lab-muted);
  -webkit-line-clamp: 4;
  padding-bottom: 0.25rem;
}

.technology-page .technology-card .tech-card-cta {
  margin: 0.5rem 1.35rem 1.35rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tech-lab-accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.technology-page .technology-card:hover .tech-card-cta {
  background: transparent;
  transform: none;
  color: #163a52;
}

.technology-page .technology-empty-state {
  border-radius: var(--tech-lab-radius);
  border: 1px dashed var(--tech-lab-line);
  background: #f8fafc;
  box-shadow: none;
}

/* Detail page layout */
.technology-detail-page {
  max-width: 56rem;
  margin: 0 auto;
}

.technology-detail-page .technology-detail-single-column {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.technology-detail-page .technology-section {
  margin-bottom: 0;
}

.technology-detail-page .technology-section h2 {
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--tech-lab-ink);
  border: none;
  letter-spacing: -0.02em;
}

.technology-detail-page .technology-section-centered {
  text-align: left;
}

.technology-detail-page .technology-instruction-guide-title {
  text-decoration: none;
  font-size: 1.35rem;
}

/* Instruction content panel */
.technology-detail-page .technology-instruction-guide {
  background: #fff;
  border: 1px solid var(--tech-lab-line);
  border-radius: var(--tech-lab-radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--tech-lab-shadow);
}

.technology-detail-page .tech-instructions {
  max-width: none;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--tech-lab-ink);
}

.technology-detail-page .tech-instructions > *:first-child {
  margin-top: 0;
}

.technology-detail-page .tech-instructions > *:last-child {
  margin-bottom: 0;
}

.technology-detail-page .tech-instructions p {
  margin: 0 0 1.15rem;
}

.technology-detail-page .tech-instructions h2,
.technology-detail-page .tech-instructions h3,
.technology-detail-page .tech-instructions h4 {
  margin: 1.75rem 0 0.75rem;
  color: var(--tech-lab-ink);
  line-height: 1.3;
  border: none;
}

.technology-detail-page .tech-instructions h2 {
  font-size: 1.25rem;
}

.technology-detail-page .tech-instructions h3 {
  font-size: 1.1rem;
}

.technology-detail-page .tech-instructions ul,
.technology-detail-page .tech-instructions ol {
  margin: 0 0 1.15rem;
  padding-left: 1.5rem;
}

.technology-detail-page .tech-instructions li {
  margin-bottom: 0.35rem;
}

.technology-detail-page .tech-instructions a {
  color: var(--tech-lab-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.technology-detail-page .tech-instructions strong {
  font-weight: 700;
  color: var(--tech-lab-ink);
}

/* Images in CKEditor instruction guides */
.technology-detail-page .tech-instructions figure,
.technology-detail-page .tech-instructions .image {
  max-width: 100%;
  margin: 1.5rem 0;
}

.technology-detail-page .tech-instructions img,
.technology-detail-page .tech-instructions figure img,
.technology-detail-page .tech-instructions .image img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(26, 36, 48, 0.1);
}

.technology-detail-page .tech-instructions figure.image-style-side,
.technology-detail-page .tech-instructions .image.image-style-side {
  max-width: min(48%, 420px);
  margin-right: 1.5rem;
}

.technology-detail-page .tech-instructions figcaption {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--tech-lab-muted);
  line-height: 1.45;
}

/* Tables in instruction guides */
.technology-detail-page .tech-instructions table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  border: 1px solid #c5d0dc;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.5;
  box-shadow: 0 2px 12px rgba(26, 36, 48, 0.06);
}

.technology-detail-page .tech-instructions table tr {
  border-top: 1px solid #d4dde6;
}

.technology-detail-page .tech-instructions table tr:first-child {
  border-top: none;
}

.technology-detail-page .tech-instructions table th,
.technology-detail-page .tech-instructions table td {
  padding: 0.75rem 1rem;
  border-right: 1px solid #d4dde6;
  vertical-align: top;
  text-align: left;
}

.technology-detail-page .tech-instructions table th:last-child,
.technology-detail-page .tech-instructions table td:last-child {
  border-right: none;
}

.technology-detail-page .tech-instructions table thead {
  background: var(--tech-lab-accent);
  color: #fff;
}

.technology-detail-page .tech-instructions table thead th {
  font-weight: 600;
  border-right-color: rgba(255, 255, 255, 0.2);
}

.technology-detail-page .tech-instructions table tbody tr:nth-child(even) {
  background: #f4f8fb;
}

.technology-detail-page .tech-instructions table tbody tr:hover {
  background: #eaf2f8;
}

/* Video & PDF */
.technology-detail-page .video-wrapper {
  max-width: 100%;
  margin: 0;
  border-radius: var(--tech-lab-radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(26, 36, 48, 0.12);
}

.technology-detail-page .video-wrapper video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.technology-detail-page .tech-pdf-iframe {
  border: 1px solid var(--tech-lab-line);
  border-radius: var(--tech-lab-radius);
  box-shadow: var(--tech-lab-shadow);
}

.technology-detail-page .tech-no-content {
  padding: 2rem;
  text-align: center;
  color: var(--tech-lab-muted);
  background: #f8fafc;
  border-radius: var(--tech-lab-radius);
  border: 1px dashed var(--tech-lab-line);
  font-style: normal;
}

@media screen and (max-width: 736px) {
  .technology-detail-page .technology-instruction-guide {
    padding: 1.25rem 1.15rem;
  }

  .technology-detail-page .tech-instructions figure.image-style-side,
  .technology-detail-page .tech-instructions .image.image-style-side {
    max-width: 100%;
    margin-right: 0;
    float: none;
  }

  .technology-detail-page .tech-instructions table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
