/* Technology (CPT) – Page-specific styles */

/* Float header over hero (no background fill) */
body.post-type-archive-technology #header-section { position: absolute; left: 0; right: 0; top: 0; background: transparent !important; }
body.post-type-archive-technology #header-section .site-header { background: transparent !important; box-shadow: none !important; position: relative; z-index: 1000; }
/* Remove spacer height so hero touches top */
body.post-type-archive-technology .followWrap { height: 0 !important; }
/* Make nav readable over photo */
/* Keep header links/toggle white only on desktop overlay; do not force white in mobile menu */
@media (min-width: 1141px) {
  body.post-type-archive-technology #header-section .onepress-menu > li > a { color: #fff; }
  body.post-type-archive-technology #header-section #nav-toggle,
  body.post-type-archive-technology #header-section .nav-toggle-subarrow i { color: #fff; }
}

/* Hero: align title to bottom-right, image flows under header */
body.post-type-archive-technology .page-header.page--cover {
  position: relative;
  min-height: 600px;
  padding: 0;
  display: flex;
  align-items: flex-end;
}
/* No dark overlay on Technology hero */
body.post-type-archive-technology .page-header.page--cover:before {
  background: none !important;
}
body.post-type-archive-technology .page-header.page--cover .entry-title {
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
body.post-type-archive-technology .page-header.page--cover .entry-tagline {
  margin-top: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* Align container behavior with other pages: anchor absolute children */
body.post-type-archive-technology .page-header .container { position: relative; }

/* Nudge hero title up by ~50px on Technology archive */
body.post-type-archive-technology .evntry-title { bottom: 100px; }

/* Page header (light variant aligned to theme palette) */
.technology-archive .page--cover-light,
.technology-single .page--cover-light {
  background: linear-gradient(0deg, #f8f9fb, #ffffff);
  border-bottom: 1px solid #e9e9e9;
}
.page--cover-light .entry-title { margin: 0; font-weight: 700; }
.page--cover-light .entry-tagline { margin-top: 8px; color: #666; }

/* Archive: grid */
.technology-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 32px 0 8px;
}
@media (max-width: 992px) { .technology-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .technology-grid { grid-template-columns: 1fr; gap: 20px; } }

.tech-card {
  background: #011936; /* dark card to match overall design */
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.tech-card:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.28); }

.tech-card__thumb { position: relative; display: block; width: 100%; padding-top: 56.25%; border-bottom: 1px solid rgba(255,255,255,0.12); }
.tech-card__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Placeholder logo: reduce size and center so full logo is visible (higher specificity than .tech-card__thumb img) */
.tech-card__thumb img.tech-card__thumb--placeholder {
  top: 50%; left: 50%; right: auto; bottom: auto;
  width: 70%; height: 70%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  background: transparent;
}
@media (max-width: 480px) {
  .tech-card__thumb img.tech-card__thumb--placeholder { width: 60%; height: 60%; }
}

.tech-card__body { padding: 16px 16px 18px; }
.tech-card__title { font-size: 1.05rem; margin: 0 0 8px; line-height: 1.4; }
.tech-card__title a { color: #ffffff; text-decoration: none; }
.tech-card__title a:hover { color: #39eecd; }
.tech-card__excerpt { color: #e6eef7; font-size: .95rem; min-height: 3.6em; }

.tech-card__more {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  border: 2px solid #ffffff;
  color: #ffffff;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}
.tech-card__more:hover { background: #ffffff; color: #011936; }

.technology-pagination { margin: 24px 0 40px; text-align: center; }

/* Single */
.tech-entry__title { text-align: center; margin: 14px 0 18px; }
.technology-single .tech-entry__title,
body.single-technology .tech-entry__title { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.tech-entry__hero img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.tech-entry__content { margin-top: 22px; }
.tech-entry__content img { max-width: 100%; height: auto; }
.tech-entry__footer { margin: 28px 0 8px; text-align: center; }
.tech-entry__back { color: #03c4eb; font-weight: 600; text-decoration: none; }
.tech-entry__back:hover { text-decoration: underline; }

/* Improve readability on dark background */
body.single-technology .site-main,
body.single-technology .entry-content,
body.single-technology .tech-entry__content { color: #e6eef7; }
body.single-technology .entry-content h2,
body.single-technology .entry-content h3,
body.single-technology .entry-content h4,
body.single-technology .entry-content h5 { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
body.single-technology .entry-content a { color: #39eecd; }
body.single-technology .entry-content a:hover { color: #a9fff2; }
/* Generic images: white card background for transparency */
body.single-technology .entry-content .wp-block-image {
  background: #ffffff;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
body.single-technology .entry-content .wp-block-image img { border-radius: 6px; box-shadow: none; background: transparent; }
/* Hero image: wrap with white background */
body.single-technology .tech-entry__hero { background: #ffffff; padding: 6px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
body.single-technology .tech-entry__hero img { border-radius: 6px; box-shadow: none; background: transparent; }
body.single-technology .entry-content figcaption { color: #d4deea; }
body.single-technology .entry-content hr { border-color: rgba(255,255,255,0.15); }

/* Embed: spacing and responsiveness */
body.single-technology .entry-content .wp-block-embed { margin: 20px 0; }
body.single-technology .entry-content .wp-block-embed.is-provider-youtube iframe,
body.single-technology .entry-content .wp-block-video video { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }

/* Force YouTube embeds to 16:9 and scale nicely */
body.single-technology .entry-content .wp-block-embed.is-provider-youtube .wp-block-embed__wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  height: auto;
}
body.single-technology .entry-content .wp-block-embed.is-provider-youtube .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important; /* override inline height like 150 */
}

/* Tech works grid: fix uniform image height */
body.single-technology .entry-content .tech-works__grid .wp-block-image { overflow: hidden; border-radius: 8px; background: #ffffff; padding: 0; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
body.single-technology .entry-content .tech-works__grid .wp-block-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
@media (max-width: 992px) {
  body.single-technology .entry-content .tech-works__grid .wp-block-image img { height: 200px; }
}
@media (max-width: 600px) {
body.single-technology .entry-content .tech-works__grid .wp-block-image img { height: 180px; }
}

/* Specs + first Diagram: two-column layout */
body.single-technology .entry-content .tech-specs,
body.single-technology .entry-content .tech-specs + .tech-diagram { box-sizing: border-box; }
@media (min-width: 768px) {
  body.single-technology .entry-content .tech-specs { width: 50%; float: left; padding-right: 16px; }
  body.single-technology .entry-content .tech-specs + .tech-diagram { width: 50%; float: right; padding-left: 16px; }
  /* Clear floats after the paired diagram */
  body.single-technology .entry-content .tech-specs + .tech-diagram::after { content: ""; display: block; clear: both; }
}
@media (max-width: 767.98px) {
  body.single-technology .entry-content .tech-specs,
  body.single-technology .entry-content .tech-specs + .tech-diagram { width: 100%; float: none; padding: 0; }
}

/* Intro icons: align to original 4-up grid (940x228 total => ~235x228 each) */
.technology-intro .row.icons-fixed {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
}
.technology-intro .row.icons-fixed > [class*="col-"] {
  flex: 0 0 25%;
  max-width: 25%;
  padding-left: 0;
  padding-right: 0;
}
.technology-intro .strength-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 235 / 228;
}
.technology-intro .strength-icon img {
  width: 45%;
  height: auto;
  object-fit: contain;
}
@media (max-width: 992px) {
  .technology-intro .row.icons-fixed { width: 100%; max-width: 100%; flex-wrap: nowrap; }
}
@media (max-width: 600px) {
  .technology-intro .row.icons-fixed { width: 100%; }
  .technology-intro .strength-icon img { width: 30%; }
}

/* Intro section full-bleed (break out of container) */
body.post-type-archive-technology .technology-intro .ssgbgbx {
  position: relative;
  box-sizing: content-box; /* neutralize global box-sizing inheritance */
  width: auto;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* On Technology pages, reset .ssgbgbx background alignment (keep global 8% for others) */
body.post-type-archive-technology .ssgbgbx,
body.single-technology .ssgbgbx {
  background-position: left center !important;
}
