/* Mobile spacing refinements: loaded after the page-specific styles. */
@media (max-width: 600px){
  .corner-frame{inset:8px;}
  .nav-wrap{padding:10px 5vw;}
  .logo-img{height:52px;}
  #mobileNav{gap:1.25rem;}
  .mobile-services{display:flex; flex-direction:column; align-items:center; width:100%;}
  .mobile-services-toggle{
    appearance:none; border:0; background:transparent; padding:6px 0; cursor:pointer;
    font-family:'IBM Plex Mono', monospace; font-size:1.1rem; letter-spacing:.08em;
    line-height:1.4; text-transform:uppercase; color:var(--ink);
  }
  .mobile-services-toggle.active{color:var(--signal);}
  .mobile-services-toggle .caret{display:inline-block; margin-left:6px; transition:transform .25s ease;}
  .mobile-services.open .caret{transform:rotate(180deg);}
  .mobile-services-links{
    display:flex; flex-direction:column; align-items:center; gap:10px;
    max-height:0; margin-top:0; overflow:hidden; opacity:0;
    transition:max-height .28s ease, opacity .2s ease, margin-top .28s ease;
  }
  .mobile-services.open .mobile-services-links{max-height:180px; margin-top:12px; opacity:1;}
  #mobileNav .mobile-services-links a{font-size:.88rem; color:var(--muted);}
  #mobileNav .mobile-services-links a.active{color:var(--signal);}
  #backToTop{right:16px; bottom:16px; width:40px; height:40px;}

  /* Pages that keep their content inside <main>. */
  main > section{padding-top:52px !important; padding-bottom:52px !important;}

  /* The service pages use full-width sections directly under <body>. */
  body > section{padding:56px 5vw !important;}
  body > section.hero{min-height:auto !important; padding-top:48px !important; padding-bottom:48px !important;}

  .hero-grid,.split,.contact-grid,.why-grid{gap:32px;}
  .hero-grid > :last-child{margin-top:0;}
  .topo-wrap,.screen-wrap,.ledger-wrap{margin-top:0 !important;}
  .section-head{margin-bottom:32px;}
  /* A főoldal elsődleges szolgáltatáscsempéi: mobilon teljes szélesség,
     a nagyobb képhez igazított magassággal. */
  .primary-services{padding-top:28px !important; padding-bottom:32px !important;}
  .primary-service-grid{grid-template-columns:1fr;}
  .primary-service-card{min-height:300px;}
  .primary-service-content{padding:22px;}
  .services .section-head[style]{padding:0 !important;}
  .service-grid[style]{margin:32px 0 0 !important;}
  .gallery-grid,.room-grid,.process-grid,.jelut-track{margin-top:32px;}
  .partner-strip{margin-top:32px; padding:20px; align-items:flex-start; flex-direction:column; gap:12px;}
  .service-card{padding:28px 24px;}
  .room-card{padding:22px 18px;}
  .partner-badge{padding:24px;}
  .why-list{gap:20px; margin-top:24px;}
  .cta p{margin-bottom:28px;}
  .btn-row{gap:10px;}
  .btn{padding:12px 18px;}
  .info-block{padding:24px 20px; margin-bottom:14px;}
  .contact-grid{gap:32px;}
  footer{padding:28px 5vw; margin-top:0;}

  /* The SVG dash animation is unstable on some mobile browsers. */
  #pathSvg .trace{animation:none; stroke-dasharray:none; stroke-dashoffset:0;}
  #pathSvg .node-dot{animation:none; opacity:1;}
}

@media (max-width: 380px){
  .btn-row .btn{width:100%; justify-content:center; text-align:center;}
  .room-grid{grid-template-columns:1fr !important;}
}
