/* Form pages: white + scrollable */
body.page-lock {
  background: #ffffff !important;
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100%;
  -webkit-overflow-scrolling: touch;
}

body.page-lock .page-screen {
  background: #ffffff;
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

/* Full mobile cleanup  -  simple scroll */

@media (max-width: 900px) {
  :root {
    --gutter: 1.15rem;
    --header-h: 72px;
  }

  body {
    font-size: 15.5px;
    line-height: 1.55;
    padding-bottom: 0;
  }

  h1 {
    font-size: clamp(1.9rem, 7.2vw, 2.4rem);
    letter-spacing: -0.03em;
  }

  h2 {
    font-size: clamp(1.4rem, 5vw, 1.75rem);
  }

  h3 {
    font-size: 1.05rem;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.14em;
    margin-bottom: 0.5rem;
  }

  .container {
    padding-inline: 1.15rem;
    width: 100%;
    box-sizing: border-box;
  }

  /*  -  Header  -  */
  .site-header {
    height: 72px;
  }

  .site-header.is-scrolled {
    height: 68px;
  }

  .header-inner {
    gap: 0.65rem;
  }

  .logo-img {
    height: 30px;
    max-width: min(140px, 48vw);
  }

  .header-ctas {
    margin-left: auto;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: transparent !important;
    color: #C8102E;
  }

  .menu-toggle:hover {
    background: transparent !important;
  }

  /* Hero: white hamburger lines */
  body.has-hero .site-header:not(.is-scrolled) .menu-toggle,
  body.has-hero .site-header:not(.is-scrolled) .menu-toggle:hover {
    color: #ffffff !important;
    background: transparent !important;
  }

  /* Scrolled / other pages: red lines only */
  .site-header.is-scrolled .menu-toggle,
  body:not(.has-hero) .site-header .menu-toggle {
    color: #C8102E !important;
    background: transparent !important;
  }

  .nav-mobile {
    width: 98%;
    max-width: none;
    min-width: 0;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.25rem
      calc(1.5rem + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }

  .nav-mobile-top {
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
  }

  .nav-mobile-links {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body.nav-is-open {
    overflow: hidden;
    touch-action: none;
  }

  body.nav-is-open .nav-mobile,
  body.nav-is-open .nav-mobile-links {
    touch-action: pan-y;
  }

  .nav-backdrop {
    background: rgba(7, 29, 51, 0.72);
  }

  .nav-mobile-links a {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.85rem 0;
  }

  .nav-mobile-links a.nav-link-detail {
    font-size: 1.05rem;
    font-weight: 500;
  }

  .nav-group-label {
    margin-top: 1.1rem;
  }

  .nav-mobile-ctas .btn {
    min-height: 48px;
  }

  .nav-mobile-ctas-row .btn {
    font-size: 0.78rem;
    padding-inline: 0.45rem;
  }

  /*  -  Hero  -  */
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    height: auto;
  }

  html {
    scroll-behavior: auto;
    overscroll-behavior-y: auto;
  }

  body {
    overscroll-behavior-y: auto;
  }

  .hero-content {
    padding-top: 5.5rem;
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  .hero-content .container {
    padding-inline: 1.15rem;
  }

  .hero-danfoss {
    height: 26px;
    margin-bottom: 0.75rem;
  }

  .hero-content .eyebrow {
    color: rgba(255, 255, 255, 0.8);
  }

  .hero-content h1 {
    max-width: 12ch;
    margin-bottom: 1.15rem;
    line-height: 1.08;
    color: #fff;
  }

  .hero-content .btn {
    min-height: 48px;
    border-radius: 8px;
    font-weight: 600;
  }

  .hero-controls {
    left: 1.15rem;
    right: 1.15rem;
    bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
  }

  /*  -  Shared sections  -  */
  .section,
  .section--screen {
    padding-block: 3rem !important;
  }

  .section--screen > .container,
  .section--bg .screen-content {
    display: block !important;
    flex: none !important;
    min-height: 0 !important;
  }

  .section-intro {
    margin-bottom: 1.35rem;
    max-width: none;
    text-align: left;
  }

  .section-intro--center {
    text-align: left;
    margin-inline: 0;
  }

  .section-intro p {
    margin-top: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  /*  -  Trust / stats  -  */
  .trust-strip {
    padding-block: 2.75rem !important;
    background: #fff !important;
  }

  .trust-intro {
    margin-bottom: 1.1rem;
  }

  .trust-intro h2 {
    color: var(--navy);
  }

  .trust-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 !important;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 24px rgba(11, 42, 74, 0.06);
  }

  .trust-item {
    text-align: center;
    padding: 1.05rem 0.65rem !important;
    border-right: 1px solid var(--hairline) !important;
    border-bottom: 1px solid var(--hairline) !important;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
  }

  .trust-item:nth-child(2n) {
    border-right: none !important;
  }

  .trust-item--logo {
    grid-column: 1 / -1;
    order: -1;
    padding: 1.2rem 1rem !important;
    border-right: none !important;
    background: #f7fafc;
  }

  .trust-item:nth-last-child(-n + 2) {
    border-bottom: none !important;
  }

  .trust-danfoss {
    height: 30px;
    margin: 0 auto 0.25rem;
  }

  .trust-num {
    font-size: 1.65rem !important;
    color: var(--navy) !important;
  }

  .trust-num--text {
    font-size: 1.2rem !important;
  }

  .trust-label {
    font-size: 0.74rem;
    color: var(--ink-muted) !important;
    line-height: 1.3;
  }

  /*  -  Solutions  -  */
  .solutions-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    margin-top: 0;
  }

  .solution-card {
    display: grid !important;
    grid-template-columns: 104px 1fr;
    gap: 0 !important;
    padding: 0 !important;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--hairline);
    box-shadow: 0 2px 12px rgba(11, 42, 74, 0.05);
  }

  /* Applications section: image on top, info below (mobile only) */
  #solutions .solution-card,
  #solutions .solution-card--link {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
  }

  #solutions .solution-card .img-frame {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10 !important;
    order: 0;
  }

  #solutions .solution-card-body {
    order: 1;
    padding: 1rem 1rem 1.1rem;
  }

  #solutions .install-card {
    display: flex;
    flex-direction: column;
  }

  #solutions .install-card .img-frame {
    width: 100%;
    order: 0;
  }

  .solution-card .img-frame {
    aspect-ratio: auto !important;
    height: 100%;
    min-height: 124px;
    border-radius: 0 !important;
    margin: 0;
  }

  .solution-card .img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .solution-card-body {
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .solution-card h3 {
    margin: 0;
    font-size: 1rem;
  }

  .solution-card-body > p {
    font-size: 0.84rem;
    line-height: 1.45;
    margin: 0;
  }

  .benefit-list--compact {
    gap: 0.3rem;
  }

  .benefit-list--compact li {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .solution-card--table {
    display: none !important;
  }

  /*  -  Projects  -  */
  .projects-grid,
  .projects-grid--compact,
  .section--screen .projects-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  #projects .projects-grid--home {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .project-card {
    margin: 0;
  }

  .project-card .img-frame,
  .section--screen .project-card .img-frame {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.45rem;
  }

  #projects .project-card--overlay .img-frame,
  #projects .projects-grid--home .project-card .img-frame {
    aspect-ratio: 1 / 1 !important;
    margin-bottom: 0 !important;
    border-radius: var(--radius);
  }

  .project-card figcaption {
    font-size: 0.74rem;
    line-height: 1.35;
    padding-inline: 0.1rem;
  }

  .project-card figcaption strong {
    display: block;
    font-size: 0.8rem;
    color: var(--navy);
    margin-bottom: 0.1rem;
  }

  /*  -  Danfoss section  -  */
  .section--bg {
    position: relative;
  }

  .section-danfoss-logo {
    height: 32px;
    margin: 0 0 0.85rem;
  }

  .section--bg .section-intro {
    text-align: left;
  }

  .section--bg .section-intro p {
    color: rgba(255, 255, 255, 0.86);
    max-width: none;
  }

  .process-steps,
  .process-steps--light,
  .section--screen .process-steps {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem 0.75rem !important;
  }

  .process-steps::before,
  .process-steps--light::before {
    display: none !important;
  }

  .process-step {
    display: block !important;
    text-align: left;
    padding: 0.85rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
  }

  .process-step .step-num,
  .process-steps--light .step-num,
  .step-num {
    display: inline-flex !important;
    margin: 0 0 0.55rem !important;
    grid-row: auto !important;
  }

  .process-step h3 {
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
  }

  .process-step p {
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0;
  }

  .section--bg .btn-group {
    margin-top: 1.35rem !important;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .section--bg .btn {
    min-height: 44px;
    flex: 1 1 auto;
  }

  /*  -  Contact  -  */
  .contact-grid,
  .section--screen .contact-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .contact-details {
    gap: 0.75rem;
  }

  .contact-item {
    padding: 0.9rem 0.95rem;
    background: var(--ice);
    border-radius: 12px;
    align-items: flex-start;
  }

  .contact-item strong {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.2rem;
  }

  .contact-item a,
  .contact-item span {
    font-size: 0.92rem;
    word-break: break-word;
  }

  .faq-mini {
    display: none !important;
  }

  .map-embed,
  #contact .map-embed {
    min-height: 200px !important;
    max-height: none !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--hairline);
  }

  #contact .btn-group {
    margin-top: 0.35rem;
    gap: 0.55rem;
  }

  #contact .btn-group .btn {
    min-height: 46px;
    flex: 1 1 auto;
    text-align: center;
  }

  /*  -  Footer  -  */
  .site-footer {
    padding-top: 2.75rem;
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--navy);
  }

  /* Prevent white strip under navy footer (FAB clearance lives in footer padding) */
  body {
    background: var(--white);
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding-bottom: 1.75rem;
  }

  .footer-brand p {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-top: 0.85rem;
  }

  .footer-danfoss {
    height: 32px;
    margin-top: 1rem;
    border-radius: 3px;
  }

  .footer-col h4 {
    margin-bottom: 0.9rem;
    font-size: 0.78rem;
  }

  .footer-col ul,
  .footer-services {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .footer-services li,
  .footer-col li {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding-block: 1.25rem;
  }

  .footer-disclaimer {
    text-align: left;
    font-size: 0.74rem;
    line-height: 1.55;
  }

  /*  -  FAB  -  */
  .contact-fab-wrap {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .contact-fab-actions {
    gap: 0.55rem;
  }

  .whatsapp-fab {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: 48px;
    height: 48px;
  }

  .whatsapp-fab-icon,
  .whatsapp-fab-icon svg {
    width: 22px;
    height: 22px;
  }

  body.page-consultation .whatsapp-fab {
    right: calc(1rem + 7.25rem);
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .contact-fab-popup {
    font-size: 0.78rem;
    padding: 0.65rem 0.8rem;
    max-width: min(250px, 78vw);
    gap: 0.45rem;
  }

  .contact-fab-wave {
    font-size: 1.15rem;
  }

  .contact-fab {
    width: auto !important;
    height: auto !important;
    min-height: 52px;
    padding: 0.8rem 1.15rem 0.8rem 0.9rem !important;
    border-radius: 999px !important;
    font-size: 0.88rem;
    gap: 0.55rem;
  }

  .contact-fab-label {
    display: inline-block !important;
  }

  .contact-fab-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .contact-fab-icon svg {
    width: 15px !important;
    height: 15px !important;
    display: block !important;
  }

  /*  -  Cookie  -  */
  .cookie-banner {
    padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }

  .cookie-banner-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
  }

  .cookie-banner p {
    font-size: 0.72rem;
    line-height: 1.35;
    flex: 1 1 auto;
    min-width: 0;
  }

  .cookie-actions {
    flex-shrink: 0;
    gap: 0.4rem;
  }

  .cookie-actions .btn {
    min-height: 34px;
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
  }

  .btn {
    border-radius: 8px;
  }

  .btn-group {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }

  .hero-content h1 {
    font-size: 1.85rem;
  }

  .solution-card {
    grid-template-columns: 88px 1fr;
  }

  .solution-card .img-frame {
    min-height: 112px;
  }

  .projects-grid--compact .project-card:nth-child(n + 5) {
    display: none;
  }

  /* Homepage / full projects grid: show all project cards */
  #projects .projects-grid .project-card,
  .projects-grid--linked .project-card {
    display: flex;
  }

  #projects .projects-grid--home .project-card--overlay {
    display: block;
  }

  .section--bg .btn-group {
    flex-direction: column;
  }

  .section--bg .btn-group .btn {
    width: 100%;
  }
}
