/* Hiblab tenant — overrides that fix conflicts caused by loading hiblab.com's
 * global style.css alongside our own design system. Loaded LAST so the rules
 * here win in specificity ties.
 *
 * Goals:
 *   1. Constrain the Hiblab brand logo so it doesn't blow up the header
 *      (the file is 887×330, ~2.7:1, much taller than Wesemann's 5:1 logo).
 *   2. Force header nav links / CTAs back to white text on the dark gradient.
 *   3. Force footer text + footer links back to white on the petrol bg.
 */

/* 1. Header logo — cap height regardless of aspect ratio */
header a img,
header img[alt*="HIBLAB" i],
header img[alt*="Hiblab" i] {
  height: 32px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
}
@media (min-width: 768px) {
  header a img,
  header img[alt*="HIBLAB" i],
  header img[alt*="Hiblab" i] {
    height: 36px !important;
  }
}

/* 2. Header nav — links must stay white on the dark gradient */
header,
header a,
header a:link,
header a:visited,
header a:hover,
header a:focus,
header nav a,
header nav a:link,
header nav a:visited,
header nav a:hover,
header nav a:focus,
header [class*="text-white"],
header [class*="text-white"]:hover {
  color: #ffffff !important;
}

/* 3. Header dropdown / sub-menu — preserve dark text on white panels */
header .group-hover\:visible a,
header .group-hover\:pointer-events-auto a {
  color: inherit !important;
}

/* 5. Hero animation — smooth fade between fixed and relative positioning */
.control-anim .cabecera-intro {
  transition: opacity 200ms linear;
  will-change: opacity, transform;
}
.control-anim .cabecera-intro.position-relative {
  /* Stop transforming once dropped into normal flow */
  transform: none !important;
  opacity: 1 !important;
}

/* 6. Modal (Ver vídeo button → YouTube iframe) — show only when JS toggles is-open */
.modal-home,
.bg-modal-home {
  display: none;
}
.modal-home.is-open,
.bg-modal-home.is-open {
  display: block;
}

/* 7. Constrain images inside imported Hiblab content (was blowing up at full
 * width because hiblab.com's grid CSS isn't fully wired up here). Cap height
 * and let aspect ratio take over. */
.html-block-frame--hiblab img {
  max-width: 100% !important;
  max-height: 480px !important;
  height: auto !important;
  width: auto !important;
  object-fit: cover !important;
  display: block;
  margin-inline: auto;
}
.html-block-frame--hiblab figure,
.html-block-frame--hiblab .wp-block-image {
  max-width: 720px;
  margin-inline: auto;
}
.html-block-frame--hiblab .wp-block-columns img,
.html-block-frame--hiblab .wp-block-column img {
  max-height: 320px !important;
}

/* 8. Hide the duplicated hero from the imported HTML on the home page —
 * Hiblab home now uses Wesemann's HighImpact hero with the intro-hiblab.mp4
 * as a background. Leaving the imported `.control-anim` in would render a
 * second copy of the video below the fold. */
body[data-hiblab-home="true"] .html-block-frame--hiblab .control-anim,
body[data-hiblab-home="true"] .html-block-frame--hiblab .modal-home,
body[data-hiblab-home="true"] .html-block-frame--hiblab .bg-modal-home,
body[data-hiblab-home="true"] .html-block-frame--hiblab .control-height {
  display: none !important;
}

/* 4. Footer — all white text + white links on petrol background */
footer,
footer *,
footer a,
footer a:link,
footer a:visited,
footer a:hover,
footer a:focus,
footer h4,
footer p,
footer address,
footer nav a {
  color: #ffffff !important;
}
footer a:hover,
footer a:focus {
  /* allow lime hover to still come through where we have it */
  color: var(--wes-lime, #acc961) !important;
}
