/* Dr. Norman P. Johnson — responsive-only corrections v47.6.
   Scoped strictly to the homepage hero and Kokopelli page. */

/* 1. Homepage: permit the headline to occupy the intended hero width.
   WordPress may have saved the hero as a columns block, not the original pattern. */
body.home .dnj-homepage .dnj-hero,
body.home .dnj-homepage .dnj-hero-content,
body.home .dnj-homepage .wp-block-group:has(.dnj-responsive-home-title),
body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title),
body.home .dnj-homepage .wp-block-column:has(.dnj-responsive-home-title) {
  min-width: 0 !important;
  box-sizing: border-box;
}
body.home .dnj-hero:has(.dnj-responsive-home-title),
body.home .dnj-homepage .wp-block-group:has(> .wp-block-columns:has(.dnj-responsive-home-title)) {
  width: 100% !important;
  max-width: none !important;
}
body.home .dnj-hero:has(.dnj-responsive-home-title) > .dnj-hero-content,
body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title) {
  width: min(calc(100% - 2.5rem), 1200px) !important;
  max-width: 1200px !important;
  margin-inline: auto !important;
}
body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title) > .wp-block-column:has(.dnj-responsive-home-title) {
  flex: 1.3 1 0 !important;
  max-width: none !important;
}
body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title) > .wp-block-column:not(:has(.dnj-responsive-home-title)) {
  flex: 1 1 0 !important;
  min-width: 0 !important;
}
body.home :is(.dnj-responsive-home-title,.dnj-hero-title) {
  font-size: clamp(2.25rem, 3.7vw, 3.65rem) !important;
  line-height: 1.13 !important;
  letter-spacing: -.035em !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  text-wrap: balance;
  white-space: normal !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title) img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
}

/* Scale and stack at tablet widths before a long word becomes cramped. */
@media (max-width: 1050px) {
  body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title) {
    flex-direction: column !important;
    align-items: center !important;
    gap: clamp(1.5rem, 5vw, 3rem) !important;
  }
  body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title) > .wp-block-column {
    width: 100% !important;
    flex-basis: auto !important;
    flex-grow: 0 !important;
    max-width: 750px !important;
  }
  body.home :is(.dnj-responsive-home-title,.dnj-hero-title) {
    font-size: clamp(2.15rem, 5vw, 3.4rem) !important;
  }
}
@media (max-width: 600px) {
  body.home .dnj-hero:has(.dnj-responsive-home-title) > .dnj-hero-content,
  body.home .dnj-homepage .wp-block-columns:has(.dnj-responsive-home-title) {
    width: calc(100% - 2rem) !important;
  }
  body.home :is(.dnj-responsive-home-title,.dnj-hero-title) {
    font-size: clamp(1.85rem, 8vw, 2.65rem) !important;
    line-height: 1.13 !important;
    letter-spacing: -.035em !important;
  }
  body.home .dnj-homepage .wp-block-buttons {flex-wrap: wrap !important;}
}

/* 2. Kokopelli: never reserve a large empty video area. Thumbnail appears
   immediately; click swaps it for a real YouTube iframe (JS is progressive). */
body.page .dnj-koko-responsive-embed,
body.page .dnj-koko-2026-published .dnj-koko-responsive-embed {
  width: min(100%, 950px) !important;
  max-width: 950px !important;
  margin: 1.5rem auto !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}
body.page .dnj-koko-responsive-embed .dnj-koko-player {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(103,232,249,.28);
  border-radius: 14px;
  background: #070b1d;
  box-shadow: 0 18px 42px rgba(0,0,0,.25);
}
body.page .dnj-koko-responsive-embed :is(.dnj-koko-play-trigger,iframe) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box;
  border: 0;
}
body.page .dnj-koko-responsive-embed .dnj-koko-play-trigger {
  cursor: pointer;
  text-decoration: none;
  color: #fff !important;
}
body.page .dnj-koko-responsive-embed .dnj-koko-video-poster {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
}
body.page .dnj-koko-responsive-embed .dnj-koko-play-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  color: #fff;
  background: linear-gradient(to top, rgba(3,6,18,.35), transparent 48%);
  font-size: clamp(.95rem,2vw,1.25rem);
  font-weight: 700;
  text-shadow: 0 2px 10px #050510;
}
body.page .dnj-koko-responsive-embed .dnj-koko-play-icon {
  display: grid;
  place-items: center;
  width: clamp(3.5rem,6vw,4.8rem);
  height: clamp(3.5rem,6vw,4.8rem);
  font-size: clamp(1.25rem,2.3vw,1.7rem);
  border-radius: 25%;
  background: #e11d48;
  box-shadow: 0 7px 26px #0008;
}
body.page .dnj-koko-responsive-embed .dnj-koko-play-trigger:is(:hover,:focus-visible) .dnj-koko-play-icon {background:#fb3359}
body.page .dnj-koko-responsive-embed .dnj-koko-video-fallback {
  text-align: center;
  margin: .6rem auto 0;
  font-size: .95rem;
  line-height: 1.45;
  color: #cbd5e1;
}
body.page .dnj-koko-responsive-embed .dnj-koko-video-fallback a{color:#67e8f9;text-decoration:underline}
@media (max-width: 600px) {
  body.page .dnj-koko-responsive-embed .dnj-koko-play-label {flex-direction: column;gap:.3rem}
  body.page .dnj-koko-responsive-embed .dnj-koko-player {border-radius: 9px}
  body.page .dnj-koko-2026-published > .dnj-card {padding: clamp(1rem, 4vw, 1.5rem) !important}
}
