/* Mobile-first refinement layer: preserves the original visual identity while
   separating imagery from copy on smaller screens. */

@media (max-width: 860px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  body:not(.course-body) {
    background-attachment: scroll;
  }

  body.course-body {
    background-attachment: scroll;
  }

  .site-header .nav-inner {
    min-height: 76px;
  }

  .site-header .main-nav {
    inset: 86px 12px auto;
    max-height: calc(100svh - 102px);
    overflow-y: auto;
    border-color: rgba(216, 164, 65, 0.42);
    background: rgba(255, 250, 241, 0.99);
    box-shadow: 0 22px 48px rgba(7, 9, 8, 0.22);
  }

  .site-header .main-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .site-header .main-nav a::after {
    display: none;
  }

  .site-header .main-nav a:hover,
  .site-header .main-nav a:focus-visible {
    border-radius: 6px;
    background: #e7f4df;
  }

  .page-nav .nav-inner {
    min-height: 76px;
    gap: 10px;
  }

  .page-nav .nav-links {
    top: 84px;
    left: 12px;
    right: 12px;
    max-height: calc(100svh - 102px);
    overflow-y: auto;
    border-color: rgba(216, 164, 65, 0.42);
    box-shadow: 0 22px 48px rgba(7, 9, 8, 0.22);
  }

  .page-nav .nav-links a {
    min-height: 52px;
  }

  .page-nav .nav-button,
  .site-header .menu-toggle {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .page-nav .nav-language-slot .language-trigger,
  .site-header .nav-language-slot .language-trigger {
    min-height: 46px;
  }

  .page-nav .nav-language-slot .language-menu,
  .site-header .nav-language-slot .language-menu {
    right: 0;
    left: auto;
  }

  .hero,
  .hero-page,
  .course-hero {
    background-position: 62% center;
  }

  .hero-inner,
  .hero-page .hero-inner {
    gap: 24px;
  }

  .section-head h2,
  .live-copy h2,
  .mentor-card h2,
  .certificate-actions h2 {
    line-height: 1.16;
  }

  .section-head p,
  .live-copy p:not(.eyebrow),
  .mentor-card p:not(.eyebrow),
  .panel p,
  .story-card p,
  .course-card p,
  .quiz-card p {
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .hero-page::after {
    height: 18%;
  }

  .footer-inner,
  .footer-bottom {
    row-gap: 8px;
  }
}

/* This mirrors the phone layout at the regular breakpoint. It also prevents
   wide grid tracks from creating a blank horizontal canvas in mobile browsers. */
@media (max-width: 860px) {
  .field-layout,
  .service-shell,
  .service-panel,
  .analysis-grid,
  .team-layout,
  .contact-inner,
  .direct-quote-inner,
  .footer-grid,
  .institutional-live,
  .focus-stage,
  .history-layout,
  .lab-origin,
  .mission-vision,
  .register-panel,
  .mentor-card,
  .certificate-grid,
  .quiz-stack,
  .module-path-grid,
  .module-scenario,
  .grid.two,
  .grid.three,
  .course-board,
  .lesson-grid,
  .didactic-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-layout > *,
  .service-shell > *,
  .service-panel > *,
  .analysis-grid > *,
  .team-layout > *,
  .contact-inner > *,
  .direct-quote-inner > *,
  .footer-grid > *,
  .institutional-live > *,
  .focus-stage > *,
  .history-layout > *,
  .lab-origin > *,
  .mission-vision > *,
  .register-panel > *,
  .mentor-card > *,
  .certificate-grid > *,
  .quiz-stack > *,
  .module-path-grid > *,
  .module-scenario > *,
  .grid.two > *,
  .grid.three > *,
  .course-board > *,
  .lesson-grid > *,
  .didactic-strip > * {
    min-width: 0;
  }

  .check-list li,
  .module-checklist li {
    min-width: 0;
    width: 100%;
    overflow-wrap: anywhere;
  }

  .check-list .notranslate,
  .module-checklist .notranslate,
  .check-list [data-protected-term],
  .module-checklist [data-protected-term] {
    display: inline !important;
  }

  .focus-thumbs,
  .focus-thumbs button {
    min-width: 0;
  }

  .focus-thumbs button {
    overflow: hidden;
  }

  .focus-thumbs button span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  /* Match the compact phone composition even in mobile emulators that do not
     expose a phone user agent to the page. */
  .field-band {
    padding-block: 40px;
  }

  .field-layout {
    gap: 22px;
    align-items: start;
  }

  .field-copy h2 {
    font-size: clamp(1.7rem, 7.2vw, 2.05rem);
    line-height: 1.15;
  }

  .field-copy p {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .field-copy .check-list {
    gap: 12px;
    margin-top: 18px;
  }

  .field-copy .check-list li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    font-size: 0.92rem;
    line-height: 1.48;
  }

  .field-copy .check-list .check-list-copy {
    grid-column: 2;
    min-width: 0;
  }

  .field-copy .check-list .notranslate,
  .field-copy .check-list [data-protected-term] {
    display: inline !important;
  }

  .field-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 8px;
    align-items: stretch;
  }

  .field-gallery > img,
  .field-gallery .gallery-stack img {
    min-height: 0;
    height: 154px;
    object-fit: cover;
    border-radius: 7px;
  }

  .field-gallery .gallery-stack {
    gap: 8px;
  }

  .field-gallery .gallery-stack img {
    height: 73px;
  }

  .services .center-head {
    margin-bottom: 20px;
  }

  .services .center-head h2 {
    font-size: clamp(1.65rem, 7vw, 2rem);
    line-height: 1.15;
  }

  .service-shell {
    gap: 16px;
  }

  .service-tabs {
    display: flex;
    gap: 8px;
    padding: 0 0 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .service-tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.88rem;
    scroll-snap-align: start;
  }

  .service-tab.active {
    transform: none;
  }

  .service-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 14px;
  }

  .service-panel img {
    min-height: 0;
    width: 100%;
    height: clamp(112px, 34vw, 138px);
    aspect-ratio: auto;
    object-fit: cover;
  }

  .service-panel > div,
  .service-panel .check-list-copy {
    min-width: 0;
  }

  .service-panel .check-list-copy {
    overflow-wrap: break-word;
  }

  .service-panel h3 {
    font-size: 1.15rem;
    line-height: 1.18;
  }

  .service-panel p {
    margin: 7px 0 9px;
    font-size: 0.86rem;
    line-height: 1.42;
  }

  .service-panel .check-list {
    gap: 6px;
    margin-top: 0;
    font-size: 0.84rem;
    line-height: 1.38;
  }

  .service-panel .check-list li {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 7px;
    align-items: start;
  }

  .service-panel .check-list li > :not(svg) {
    grid-column: 2;
  }

  .service-panel .check-list .notranslate,
  .service-panel .check-list [data-protected-term] {
    display: inline !important;
  }

  .service-panel .check-list svg {
    width: 15px;
    height: 15px;
  }

  .analysis-grid {
    gap: 18px;
  }

  .analysis-card {
    padding: 20px;
  }

  .analysis-card h2 {
    font-size: clamp(1.7rem, 7.3vw, 2.08rem);
    line-height: 1.14;
  }

  .analysis-card p {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .parameter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .parameter {
    min-height: 40px;
    padding: 8px 9px;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .parameter svg {
    width: 14px;
    height: 14px;
  }

  .analysis-note {
    margin-top: 14px;
    padding-top: 13px;
  }

  .lab-process {
    gap: 10px;
  }

  .process-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 11px;
    padding: 10px;
  }

  .process-card img {
    width: 96px;
    height: 78px;
  }

  .process-card h3 {
    font-size: 1rem;
  }

  .process-card p {
    font-size: 0.82rem;
    line-height: 1.36;
  }
}

/* A phone can report a much wider layout viewport after browser zoom changes.
   This explicit class keeps the compact layout stable on iPhone and Android. */
html.device-phone {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

html.device-phone body {
  min-width: 0;
  overflow-x: clip;
  background-attachment: scroll;
}

html.device-phone .site-header,
html.device-phone .page-nav {
  backdrop-filter: none;
}

html.device-phone .site-header .nav-inner,
html.device-phone .page-nav .nav-inner {
  min-height: 74px;
  gap: 8px;
}

html.device-phone .site-header .nav-inner {
  grid-template-columns: minmax(0, 1fr) auto;
}

html.device-phone .site-header .brand-logo {
  width: 50px;
  height: 50px;
}

html.device-phone .site-header .brand-name,
html.device-phone .page-nav .brand-title {
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
}

html.device-phone .site-header .brand-name {
  font-size: 0.82rem;
  line-height: 1.12;
}

html.device-phone .page-nav .brand-duo {
  flex: 1 1 auto;
  gap: 9px;
  min-width: 0;
}

html.device-phone .page-nav .brand-duo img {
  width: 48px;
  height: 48px;
}

html.device-phone .page-nav .brand-duo .municipal-logo,
html.device-phone .page-nav .brand-title span {
  display: none;
}

html.device-phone .page-nav .brand-title strong {
  font-size: 0.83rem;
  line-height: 1.12;
}

html.device-phone .nav-actions {
  gap: 6px;
  flex: 0 0 auto;
}

html.device-phone .site-header .menu-toggle,
html.device-phone .page-nav .nav-button {
  display: grid;
  width: 46px;
  min-width: 46px;
  height: 46px;
}

html.device-phone .site-header .main-nav,
html.device-phone .page-nav .nav-links {
  position: fixed;
  top: 82px;
  right: 12px;
  left: 12px;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 12px;
  border: 1px solid rgba(216, 164, 65, 0.42);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.99);
  box-shadow: 0 22px 48px rgba(7, 9, 8, 0.22);
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) scale(0.98);
  transform-origin: top right;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
  visibility: hidden;
  z-index: 80;
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

html.device-phone .site-header .main-nav {
  inset: 82px 12px auto;
}

html.device-phone .site-header .main-nav a,
html.device-phone .page-nav .nav-links a {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid rgba(18, 23, 17, 0.08);
}

html.device-phone .site-header .main-nav a:last-of-type,
html.device-phone .page-nav .nav-links a:last-of-type {
  border-bottom: 0;
}

html.device-phone body.menu-open .site-header .main-nav,
html.device-phone .page-nav .nav-links.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

html.device-phone .nav-language-slot .language-menu {
  width: min(244px, calc(100vw - 24px));
  min-width: min(244px, calc(100vw - 24px));
  max-height: min(68svh, 330px);
}

html.device-phone .nav-language-slot .language-trigger {
  min-width: 54px;
  padding: 0 10px;
}

html.device-phone .hero,
html.device-phone .hero-page,
html.device-phone .course-hero {
  min-height: clamp(500px, 74svh, 620px);
  background-attachment: scroll;
}

html.device-phone .hero {
  align-items: end;
  background-position: 61% center;
}

html.device-phone .hero-page,
html.device-phone .course-hero {
  align-items: end;
  background-position: 58% center;
}

html.device-phone .hero-inner,
html.device-phone .hero-page .hero-inner {
  width: min(100% - 24px, 1180px);
  padding: 44px 0 38px;
}

html.device-phone .hero h1,
html.device-phone .hero-page h1,
html.device-phone .course-hero h1 {
  max-width: 100%;
  font-size: clamp(1.9rem, 8.6vw, 2.25rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

html.device-phone .hero-copy,
html.device-phone .hero-page p,
html.device-phone .course-hero p {
  font-size: 1rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

html.device-phone .section-inner,
html.device-phone .hero-inner,
html.device-phone .hero-stats,
html.device-phone .contact-inner,
html.device-phone .direct-quote-inner,
html.device-phone .footer-grid,
html.device-phone .footer-bottom,
html.device-phone .page-nav .nav-inner,
html.device-phone .section,
html.device-phone .footer-inner {
  width: min(100% - 24px, 1180px);
}

html.device-phone section {
  padding-inline: 0;
}

html.device-phone .hero-actions .btn,
html.device-phone .direct-quote-actions .btn,
html.device-phone .page-nav .btn {
  width: 100%;
}

html.device-phone .product-grid,
html.device-phone .parameter-grid,
html.device-phone .team-notes,
html.device-phone .field-layout,
html.device-phone .service-shell,
html.device-phone .service-panel,
html.device-phone .analysis-grid,
html.device-phone .team-layout,
html.device-phone .contact-inner,
html.device-phone .direct-quote-inner,
html.device-phone .footer-grid,
html.device-phone .institutional-live,
html.device-phone .focus-stage,
html.device-phone .history-layout,
html.device-phone .lab-origin,
html.device-phone .mission-vision,
html.device-phone .register-panel,
html.device-phone .mentor-card,
html.device-phone .certificate-grid,
html.device-phone .quiz-stack,
html.device-phone .module-path-grid,
html.device-phone .module-scenario,
html.device-phone .grid.two,
html.device-phone .grid.three,
html.device-phone .course-board,
html.device-phone .lesson-grid,
html.device-phone .didactic-strip {
  grid-template-columns: minmax(0, 1fr);
}

html.device-phone .focus-main,
html.device-phone .focus-main img,
html.device-phone .gallery-focus .focus-main,
html.device-phone .focus-main.aula-focus {
  min-height: 0;
}

html.device-phone .focus-main,
html.device-phone .gallery-focus .focus-main,
html.device-phone .focus-main.aula-focus {
  display: grid;
  grid-template-rows: clamp(210px, 46vw, 280px) auto;
  background: #062817;
}

html.device-phone .focus-main img,
html.device-phone .focus-main.aula-focus img.aula-focus-image {
  width: 100%;
  height: clamp(210px, 46vw, 280px);
  min-height: 0;
  object-fit: cover;
}

html.device-phone .focus-main.aula-focus img.aula-focus-image {
  object-fit: contain;
  object-position: center top;
  background: #fffaf1;
}

html.device-phone .focus-copy,
html.device-phone .focus-main.aula-focus .focus-copy,
html.device-phone .module-visual .caption {
  position: static;
  min-height: 0;
  padding: 16px;
  border-radius: 0;
  backdrop-filter: none;
  background: linear-gradient(135deg, #082915, #123e22);
}

html.device-phone .live-visual-stack,
html.device-phone .lab-stack {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

html.device-phone .live-main,
html.device-phone .lab-stack .live-main,
html.device-phone .live-float.one,
html.device-phone .live-float.two,
html.device-phone .live-float.three,
html.device-phone .lab-stack .live-float.one,
html.device-phone .lab-stack .live-float.two {
  position: static;
  width: 100%;
  height: 118px;
  min-height: 0;
  margin: 0;
  transform: none;
  animation: none;
}

html.device-phone .live-main,
html.device-phone .lab-stack .live-main {
  grid-column: 1 / -1;
  height: clamp(210px, 58vw, 245px);
}

html.device-phone .history-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

html.device-phone .history-gallery figure,
html.device-phone .history-gallery img {
  min-height: 130px;
}

html.device-phone .history-gallery figure:last-child {
  grid-column: 1 / -1;
}

html.device-phone .course-hero {
  min-height: clamp(520px, 76svh, 640px);
}

html.device-phone .module-menu {
  display: flex;
  position: static;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

html.device-phone .module-tab {
  flex: 0 0 85%;
}

html.device-phone .module-visual,
html.device-phone .module-visual img {
  min-height: 0;
}

html.device-phone .module-visual img {
  height: clamp(205px, 56vw, 240px);
  object-fit: cover;
}

html.device-phone .focus-thumbs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

html.device-phone .focus-thumbs button {
  min-height: 92px;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 9px;
  padding: 8px;
  font-size: 0.82rem;
  line-height: 1.16;
}

html.device-phone .focus-thumbs img {
  width: 66px;
  height: 72px;
}

html.device-phone .service-tabs,
html.device-phone .field-gallery {
  position: static;
}

html.device-phone .field-gallery {
  grid-template-columns: minmax(0, 1fr);
}

/* Compact reading layout for the institutional summary on phones. */
html.device-phone .field-band {
  padding-block: 40px;
}

html.device-phone .field-layout {
  gap: 22px;
  align-items: start;
}

html.device-phone .field-copy h2 {
  font-size: clamp(1.7rem, 7.2vw, 2.05rem);
  line-height: 1.15;
}

html.device-phone .field-copy p {
  margin-top: 12px;
  font-size: 0.98rem;
  line-height: 1.55;
}

html.device-phone .field-copy .check-list {
  gap: 12px;
  margin-top: 18px;
}

html.device-phone .field-copy .check-list li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.48;
}

html.device-phone .field-copy .check-list li > :not(svg) {
  grid-column: 2;
}

html.device-phone .field-copy .check-list .notranslate,
html.device-phone .field-copy .check-list [data-protected-term] {
  display: inline !important;
}

html.device-phone .field-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 8px;
  align-items: stretch;
}

html.device-phone .field-gallery > img,
html.device-phone .field-gallery .gallery-stack img {
  min-height: 0;
  height: 154px;
  object-fit: cover;
  border-radius: 7px;
}

html.device-phone .field-gallery .gallery-stack {
  gap: 8px;
}

html.device-phone .field-gallery .gallery-stack img {
  height: 73px;
}

/* Service information is easier to scan when image and message share the card. */
html.device-phone .services .center-head {
  margin-bottom: 20px;
}

html.device-phone .services .center-head h2 {
  font-size: clamp(1.65rem, 7vw, 2rem);
  line-height: 1.15;
}

html.device-phone .service-shell {
  gap: 16px;
}

html.device-phone .service-tabs {
  display: flex;
  gap: 8px;
  padding: 0 0 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

html.device-phone .service-tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.88rem;
  scroll-snap-align: start;
}

html.device-phone .service-tab.active {
  transform: none;
}

html.device-phone .service-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 14px;
}

html.device-phone .service-panel img {
  min-height: 0;
  width: 100%;
  height: clamp(112px, 34vw, 138px);
  aspect-ratio: auto;
  object-fit: cover;
}

html.device-phone .service-panel > div,
html.device-phone .service-panel .check-list-copy {
  min-width: 0;
}

html.device-phone .service-panel .check-list-copy {
  overflow-wrap: break-word;
}

html.device-phone .service-panel h3 {
  font-size: 1.15rem;
  line-height: 1.18;
}

html.device-phone .service-panel p {
  margin: 7px 0 9px;
  font-size: 0.86rem;
  line-height: 1.42;
}

html.device-phone .service-panel .check-list {
  gap: 6px;
  margin-top: 0;
  font-size: 0.84rem;
  line-height: 1.38;
}

html.device-phone .service-panel .check-list li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

html.device-phone .service-panel .check-list li > :not(svg) {
  grid-column: 2;
}

html.device-phone .service-panel .check-list .notranslate,
html.device-phone .service-panel .check-list [data-protected-term] {
  display: inline !important;
}

html.device-phone .service-panel .check-list svg {
  width: 15px;
  height: 15px;
}

/* Keep the parameter card informative without turning the screen into one long list. */
html.device-phone .analysis-grid {
  gap: 18px;
}

html.device-phone .analysis-card {
  padding: 20px;
}

html.device-phone .analysis-card h2 {
  font-size: clamp(1.7rem, 7.3vw, 2.08rem);
  line-height: 1.14;
}

html.device-phone .analysis-card p {
  font-size: 0.94rem;
  line-height: 1.5;
}

html.device-phone .parameter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

html.device-phone .parameter {
  min-height: 40px;
  padding: 8px 9px;
  font-size: 0.78rem;
  line-height: 1.25;
}

html.device-phone .parameter svg {
  width: 14px;
  height: 14px;
}

html.device-phone .analysis-note {
  margin-top: 14px;
  padding-top: 13px;
}

html.device-phone .lab-process {
  gap: 10px;
}

html.device-phone .process-card {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 11px;
  padding: 10px;
}

html.device-phone .process-card img {
  width: 96px;
  height: 78px;
}

html.device-phone .process-card h3 {
  font-size: 1rem;
}

html.device-phone .process-card p {
  font-size: 0.82rem;
  line-height: 1.36;
}

html.device-phone .certificate-preview {
  overflow: auto;
}

html.device-phone .footer-inner,
html.device-phone .footer-bottom {
  align-items: flex-start;
  text-align: left;
}

html.device-phone .footer-bottom {
  flex-direction: column;
}

/* Protected proper names are injected by the translation helper. They must
   remain inline inside paragraphs and list items so they can wrap naturally. */
.notranslate:not(.language-switcher),
[data-protected-term] {
  display: inline !important;
}

@media (max-width: 640px) {
  body {
    background-size: auto, auto 100%;
  }

  .site-header .nav-inner {
    min-height: 74px;
    gap: 8px;
  }

  .site-header .brand-logo {
    width: 50px;
    height: 50px;
  }

  .site-header .brand-name {
    max-width: 46vw;
    font-size: 0.82rem;
    line-height: 1.12;
  }

  .site-header .main-nav {
    inset: 82px 12px auto;
  }

  .hero {
    min-height: 680px;
    align-items: end;
    background-image:
      linear-gradient(180deg, rgba(4, 10, 6, 0.78) 0%, rgba(4, 10, 6, 0.68) 50%, rgba(4, 10, 6, 0.94) 100%),
      url("hero-olivar.webp");
    background-position: 61% center;
  }

  .hero::before {
    background: linear-gradient(135deg, rgba(216, 164, 65, 0.12), transparent 45%, rgba(47, 138, 69, 0.14));
    animation: none;
  }

  .hero-inner {
    padding: 44px 0 38px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 2.2rem;
    line-height: 1.1;
    text-wrap: balance;
  }

  .hero-copy {
    margin: 18px 0 24px;
    font-size: 1rem;
    line-height: 1.58;
  }

  .hero .eyebrow {
    margin-bottom: 14px;
    font-size: 0.7rem;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn,
  .direct-quote-actions .btn {
    min-height: 50px;
  }

  .slogan-panel {
    width: 100%;
    padding: 18px;
    border-color: rgba(216, 164, 65, 0.54);
    background: rgba(5, 13, 7, 0.9);
    animation: none;
  }

  .slogan-panel strong {
    font-size: 1.42rem;
  }

  .hero-stats {
    gap: 10px;
    padding-top: 12px;
  }

  .stat-card {
    min-height: 0;
    padding: 16px;
  }

  .stat-card strong {
    font-size: 2rem;
  }

  .site-header + main section:not(.hero) {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .page-nav .nav-inner,
  .hero-inner,
  .section,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .page-nav .nav-inner {
    min-height: 74px;
    gap: 8px;
  }

  .page-nav .brand-duo {
    gap: 9px;
  }

  .page-nav .brand-duo img {
    width: 48px;
    height: 48px;
  }

  .page-nav .brand-title {
    max-width: calc(100vw - 166px);
  }

  .page-nav .brand-title strong {
    font-size: 0.83rem;
    line-height: 1.12;
  }

  .page-nav .nav-actions {
    gap: 6px;
  }

  .page-nav .nav-links {
    top: 82px;
  }

  .hero-page,
  .course-hero {
    min-height: 590px;
    align-items: end;
    background-position: 58% center;
  }

  .hero-page::before,
  .hero-institutional::before,
  .hero-gallery::before {
    background: linear-gradient(180deg, rgba(3, 9, 5, 0.78) 0%, rgba(6, 23, 12, 0.62) 48%, rgba(4, 13, 7, 0.94) 100%);
  }

  .hero-page::after {
    height: 8%;
    background: linear-gradient(0deg, rgba(247, 241, 230, 0.7), rgba(247, 241, 230, 0));
  }

  .hero-page .hero-inner {
    padding: 88px 0 46px;
  }

  .hero-page h1,
  .course-hero h1 {
    max-width: 100%;
    font-size: 2.05rem;
    line-height: 1.13;
    text-wrap: balance;
  }

  .hero-page p,
  .course-hero p {
    margin-top: 14px;
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .hero-page .eyebrow,
  .course-hero .eyebrow {
    margin-bottom: 14px;
    font-size: 0.7rem;
  }

  .content {
    padding: 34px 0 54px;
  }

  .section {
    margin-top: 38px;
  }

  .section-head {
    gap: 10px;
    margin-bottom: 18px;
  }

  .section-head h2 {
    font-size: 1.75rem;
  }

  .panel,
  .quiz-card {
    padding: 18px;
  }

  .story-card div {
    padding: 16px;
  }

  .focus-stage {
    gap: 12px;
  }

  .focus-main,
  .gallery-focus .focus-main,
  .focus-main.aula-focus {
    display: grid;
    min-height: 0;
    grid-template-rows: 244px auto;
    background: #062817;
    box-shadow: 0 16px 32px rgba(7, 9, 8, 0.16);
  }

  .focus-main img,
  .focus-main.aula-focus img.aula-focus-image {
    width: 100%;
    height: 244px;
    min-height: 0;
    object-fit: cover;
    object-position: center;
  }

  .focus-main.aula-focus img.aula-focus-image {
    object-fit: contain;
    object-position: center top;
    background: #fffaf1;
  }

  .focus-copy,
  .focus-main.aula-focus .focus-copy {
    position: static;
    padding: 17px;
    border-radius: 0;
    background: linear-gradient(135deg, #082915, #123e22);
    backdrop-filter: none;
  }

  .focus-main.aula-focus .focus-copy {
    padding: 17px;
    border-radius: 0;
  }

  .focus-copy h3,
  .focus-main.aula-focus .focus-copy h3 {
    font-size: 1.4rem;
    line-height: 1.18;
  }

  .focus-copy p {
    font-size: 0.93rem;
    line-height: 1.55;
  }

  .focus-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .focus-thumbs button {
    min-height: 92px;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
    font-size: 0.82rem;
    line-height: 1.16;
  }

  .focus-thumbs button:hover,
  .focus-thumbs button.active {
    transform: none;
  }

  .focus-thumbs img {
    width: 66px;
    height: 72px;
  }

  .field-band {
    padding-block: 34px;
  }

  .field-layout {
    gap: 20px;
  }

  .field-copy h2 {
    font-size: 1.72rem;
  }

  .field-copy p {
    font-size: 0.95rem;
  }

  .field-copy .check-list li {
    font-size: 0.89rem;
  }

  .field-gallery > img {
    height: 142px;
  }

  .field-gallery .gallery-stack img {
    height: 67px;
  }

  .service-tabs {
    gap: 7px;
  }

  .service-tab {
    min-height: 42px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .service-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .service-panel img {
    height: 108px;
  }

  .service-panel h3 {
    font-size: 1.08rem;
  }

  .service-panel p {
    font-size: 0.82rem;
  }

  .service-panel .check-list {
    font-size: 0.8rem;
  }

  .analysis-card {
    padding: 18px;
  }

  .parameter-grid {
    gap: 7px;
  }

  .parameter {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 0.73rem;
  }

  .process-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
  }

  .process-card img {
    width: 82px;
    height: 70px;
  }

  .process-card p {
    font-size: 0.78rem;
  }

  .institutional-live {
    gap: 18px;
  }

  .live-copy {
    padding: 19px;
  }

  .live-copy h2 {
    font-size: 1.82rem;
  }

  .badge-row {
    gap: 7px;
  }

  .badge {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .live-visual-stack,
  .lab-stack {
    display: grid;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .live-main,
  .lab-stack .live-main,
  .live-float.one,
  .live-float.two,
  .live-float.three,
  .lab-stack .live-float.one,
  .lab-stack .live-float.two {
    position: static;
    width: 100%;
    height: 118px;
    min-height: 0;
    margin: 0;
    border: 3px solid #fffaf1;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: 0 10px 22px rgba(7, 9, 8, 0.15);
    animation: none;
    transform: none;
  }

  .live-main,
  .lab-stack .live-main {
    grid-column: 1 / -1;
    height: 224px;
    object-position: center top;
  }

  .history-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .history-gallery figure,
  .history-gallery img {
    min-height: 130px;
  }

  .history-gallery figure:last-child {
    grid-column: 1 / -1;
  }

  .history-gallery figcaption {
    left: 8px;
    bottom: 8px;
    padding: 5px 8px;
    font-size: 0.76rem;
  }

  .timeline article {
    padding: 18px 16px 18px 58px;
  }

  .timeline article::before {
    left: 14px;
    top: 18px;
    width: 30px;
    height: 30px;
  }

  .origin-visual img {
    min-height: 228px;
  }

  .origin-copy h3 {
    font-size: 1.55rem;
  }

  .mission-vision {
    gap: 14px;
  }

  .mission-avatar {
    width: 132px;
    height: 132px;
    margin: 0 auto;
  }

  .mission-avatar img {
    width: 104px;
    height: 104px;
  }

  .activity-track {
    animation-duration: 44s;
  }

  .activity-track figure {
    width: min(282px, 78vw);
  }

  .activity-track figcaption {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .course-hero {
    min-height: 620px;
    background-image:
      linear-gradient(180deg, rgba(4, 11, 6, 0.8) 0%, rgba(4, 11, 6, 0.62) 48%, rgba(4, 11, 6, 0.94) 100%),
      url("IMAGEN SUBPAGINA.webp");
  }

  .register-panel {
    gap: 20px;
  }

  .register-panel h2 {
    font-size: 1.86rem;
  }

  .register-form {
    gap: 14px;
  }

  .register-form label {
    gap: 6px;
  }

  .register-form input,
  .register-form select {
    min-height: 50px;
    font-size: 16px;
  }

  .register-form .consent-check {
    align-items: flex-start;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .course-choice-grid,
  .course-progress-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .course-choice-card > div {
    padding: 16px;
  }

  .module-menu {
    display: flex;
    gap: 10px;
    padding: 2px 0 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .module-tab {
    flex: 0 0 85%;
    min-height: 58px;
    scroll-snap-align: start;
  }

  .module-visual,
  .module-visual img {
    min-height: 0;
  }

  .module-visual img {
    height: 228px;
    object-fit: cover;
    animation: none;
  }

  .module-visual .caption {
    position: static;
    min-height: 0;
    padding: 14px 16px;
    border-radius: 0;
    background: #082915;
    line-height: 1.5;
  }

  .module-path,
  .module-scenario,
  .quiz-card {
    padding: 18px;
  }

  .lesson-step,
  .mini-card {
    min-height: 0;
    padding: 16px;
  }

  .quiz-options button {
    min-height: 50px;
    padding: 12px;
    line-height: 1.4;
  }

  .certificate-grid {
    gap: 16px;
  }

  .certificate-preview {
    overflow: auto;
  }

  .site-footer .footer-inner,
  .footer .footer-bottom {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-track,
  .slogan-panel,
  .live-float,
  .module-visual img,
  .quiz-exit-chrys img {
    animation: none !important;
  }
}

/* Professional mobile classroom layout. */
@media (max-width: 640px) {
  .course-body .section,
  .course-body .hero-inner,
  .course-body .footer-inner {
    width: min(100% - 32px, 1180px);
  }

  .course-body .course-board {
    padding: 12px;
    gap: 14px;
  }

  .course-body .course-run-toolbar {
    position: sticky;
    top: 82px;
    z-index: 20;
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px;
  }

  .course-body .course-back-btn {
    width: 100%;
    min-height: 46px;
  }

  .course-body .course-run-toolbar > span {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .course-body .course-module {
    gap: 14px;
  }

  .course-body .module-visual,
  .course-body .module-visual img {
    width: 100%;
    min-height: 0;
  }

  .course-body .module-visual {
    height: clamp(190px, 54vw, 225px);
    aspect-ratio: auto;
  }

  .course-body .module-visual img {
    height: 100%;
    object-fit: cover;
  }

  .course-body .module-visual .caption {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .course-body .detail-trigger::after {
    top: 10px;
    right: 10px;
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .course-body .module-detail,
  .course-body .module-path,
  .course-body .module-flow-actions,
  .course-body .quiz-control,
  .course-body .quiz-submit-panel,
  .course-body .module-finished,
  .course-body .quiz-card {
    padding: 16px;
  }

  .course-body .module-detail p,
  .course-body .module-path > p,
  .course-body .path-card p,
  .course-body .module-lab-note p,
  .course-body .scenario-head p,
  .course-body .quiz-card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .course-body .module-path h3 {
    font-size: 1.55rem;
    line-height: 1.18;
  }

  .course-body .module-path-grid,
  .course-body .lesson-grid,
  .course-body .didactic-strip,
  .course-body .module-scenario,
  .course-body .quiz-stack {
    grid-template-columns: 1fr;
  }

  .course-body .path-card {
    min-height: 0;
    padding: 15px;
  }

  .course-body .module-checklist {
    display: grid;
  }

  .course-body .module-checklist span {
    min-height: 38px;
    border-radius: 6px;
  }

  .course-body .quiz-control,
  .course-body .quiz-submit-panel,
  .course-body .module-flow-actions,
  .course-body .module-finished {
    display: grid;
  }

  .course-body .quiz-timer,
  .course-body .quiz-submit-panel .btn,
  .course-body .module-flow-actions .btn,
  .course-body .module-finished .btn {
    width: 100%;
  }

  .course-body .quiz-options button {
    min-height: 48px;
    padding: 11px 12px;
    font-size: 0.88rem;
  }

  body.quiz-focus-mode.course-body .course-board {
    display: block;
    padding: 12px;
    scroll-margin-top: 78px;
  }

  body.quiz-focus-mode.course-body .course-run-toolbar {
    position: static;
  }

}

html.device-phone .course-body .section,
html.device-phone .course-body .hero-inner,
html.device-phone .course-body .footer-inner {
  width: min(100% - 32px, 1180px);
}

html.device-phone .course-body .module-visual,
html.device-phone .course-body .module-visual img {
  min-height: 0;
}

html.device-phone .course-body .module-visual {
  height: clamp(190px, 54vw, 225px);
  aspect-ratio: auto;
}

html.device-phone .course-body .module-visual img {
  height: 100%;
  object-fit: cover;
}

html.device-phone .course-body .module-visual .caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.3;
}

/* Mobile analysis selector: choose an image first, then read its details directly below. */
@media (max-width: 640px) {
  .analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .analysis .lab-process {
    order: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .analysis .analysis-card {
    order: 2;
    width: 100%;
    padding: 17px;
  }

  .analysis .process-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    padding: 7px;
    overflow: hidden;
    border-radius: 8px;
  }

  .analysis .process-card img {
    width: 100%;
    height: 86px;
    border-radius: 5px;
    object-fit: cover;
  }

  .analysis .process-card div {
    min-width: 0;
  }

  .analysis .process-card h3 {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.16;
    text-wrap: balance;
  }

  .analysis .process-card p {
    display: none;
  }

  .analysis .analysis-card .eyebrow {
    margin-bottom: 8px !important;
    font-size: 0.67rem;
  }

  .analysis .analysis-card h2 {
    font-size: clamp(1.52rem, 7vw, 1.9rem);
    line-height: 1.14;
  }

  .analysis .analysis-card p {
    margin-top: 9px;
    font-size: 0.88rem;
    line-height: 1.43;
  }

  .analysis .parameter-grid {
    gap: 7px;
    margin-top: 13px;
  }

  .analysis .parameter {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.71rem;
    line-height: 1.18;
  }

  .analysis .analysis-note {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 0.84rem;
    line-height: 1.4;
  }
}

/* Safari and Android browsers can report a larger layout viewport after zooming. */
html.device-phone .analysis-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html.device-phone .analysis .lab-process {
  order: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

html.device-phone .analysis .analysis-card {
  order: 2;
  width: 100%;
  padding: 17px;
}

html.device-phone .analysis .process-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  overflow: hidden;
  border-radius: 8px;
}

html.device-phone .analysis .process-card img {
  width: 100%;
  height: 86px;
  border-radius: 5px;
  object-fit: cover;
}

html.device-phone .analysis .process-card div {
  min-width: 0;
}

html.device-phone .analysis .process-card h3 {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.16;
  text-wrap: balance;
}

html.device-phone .analysis .process-card p {
  display: none;
}

html.device-phone .analysis .analysis-card .eyebrow {
  margin-bottom: 8px !important;
  font-size: 0.67rem;
}

html.device-phone .analysis .analysis-card h2 {
  font-size: clamp(1.52rem, 7vw, 1.9rem);
  line-height: 1.14;
}

html.device-phone .analysis .analysis-card p {
  margin-top: 9px;
  font-size: 0.88rem;
  line-height: 1.43;
}

html.device-phone .analysis .parameter-grid {
  gap: 7px;
  margin-top: 13px;
}

html.device-phone .analysis .parameter {
  min-height: 36px;
  padding: 7px 8px;
  font-size: 0.71rem;
  line-height: 1.18;
}

html.device-phone .analysis .analysis-note {
  margin-top: 12px;
  padding-top: 12px;
  font-size: 0.84rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .quiz-exit-modal {
    align-items: center;
    padding: 12px;
  }

  .quiz-exit-dialog {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px 18px 18px;
  }

  .quiz-exit-chrys {
    width: 116px;
    margin: 0 auto;
  }

  .quiz-exit-copy {
    text-align: center;
  }

  .quiz-exit-copy .eyebrow {
    justify-content: center;
  }

  .quiz-exit-copy h2 {
    font-size: 1.55rem;
  }

  .quiz-exit-copy > p:not(.eyebrow) {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .quiz-exit-warning {
    text-align: left;
    font-size: 0.78rem;
  }

  .quiz-exit-actions {
    display: grid;
  }

  .quiz-exit-actions .btn {
    width: 100%;
    min-height: 48px;
  }
}

/* Final compact treatment for the mobile analysis cards. */
@media (max-width: 640px) {
  .analysis .process-card {
    gap: 7px;
  }

  .analysis .process-card div {
    order: -1;
    padding: 1px 2px 0;
  }

  .analysis .process-card img {
    height: 102px;
  }

  .analysis .process-card h3 {
    font-size: 0.79rem;
    line-height: 1.13;
  }

  .analysis .analysis-card .eyebrow {
    display: none;
  }

  .analysis .analysis-card h2 {
    font-size: clamp(1.38rem, 6.4vw, 1.7rem);
    line-height: 1.12;
  }

  .analysis .analysis-card p {
    margin-top: 8px;
    font-size: 0.83rem;
    line-height: 1.38;
  }

  .analysis .parameter {
    min-height: 35px;
    padding: 6px 7px;
    font-size: 0.68rem;
    line-height: 1.14;
  }

  .analysis .analysis-note {
    font-size: 0.8rem;
    line-height: 1.35;
  }
}

html.device-phone .analysis .process-card {
  gap: 7px;
}

html.device-phone .analysis .process-card div {
  order: -1;
  padding: 1px 2px 0;
}

html.device-phone .analysis .process-card img {
  height: 102px;
}

html.device-phone .analysis .process-card h3 {
  font-size: 0.79rem;
  line-height: 1.13;
}

html.device-phone .analysis .analysis-card .eyebrow {
  display: none;
}

html.device-phone .analysis .analysis-card h2 {
  font-size: clamp(1.38rem, 6.4vw, 1.7rem);
  line-height: 1.12;
}

html.device-phone .analysis .analysis-card p {
  margin-top: 8px;
  font-size: 0.83rem;
  line-height: 1.38;
}

html.device-phone .analysis .parameter {
  min-height: 35px;
  padding: 6px 7px;
  font-size: 0.68rem;
  line-height: 1.14;
}

html.device-phone .analysis .analysis-note {
  font-size: 0.8rem;
  line-height: 1.35;
}
