/* Egységes telefonos és tabletes megjelenés */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
}

.editable,
h1,
h2,
h3,
h4,
p,
a,
span {
  overflow-wrap: anywhere;
}

@media (max-width: 800px) {
  .logo-strip {
    padding: 2px 20px;
  }

  .logo-strip-inner {
    min-height: 110px;
  }

  .logo-display {
    width: min(92vw, 340px);
    height: 110px;
    min-width: 0;
    min-height: 0;
  }

  .logo-display img {
    max-height: 96px;
  }

  .logo-display img.mw-logo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .editing .logo-strip-inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .editing .logo-display,
  .editing .logo-editor {
    grid-column: 1;
  }

  .editing .logo-editor {
    position: static;
    justify-self: center;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    padding: 10px 20px 9px;
  }

  .topbar .brand {
    min-width: 0;
    margin: 0;
    white-space: normal;
    line-height: 1.25;
  }

  .topbar .edit-toggle {
    justify-self: end;
    padding: 9px 13px;
    font-size: .9rem;
    white-space: nowrap;
  }

  .topbar nav {
    grid-column: 1 / -1;
    order: initial;
    display: flex;
    width: 100%;
    gap: 0;
    padding: 10px 0 3px;
    overflow-x: visible;
    flex-wrap: nowrap;
    justify-content: space-between;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar nav::-webkit-scrollbar {
    display: none;
  }

  .topbar nav a {
    flex: 1 1 0;
    font-size: 1.05rem;
    font-weight: 850;
    text-align: center;
    white-space: nowrap;
  }

  .topbar nav a:first-child { text-align: left; }
  .topbar nav a:last-child { text-align: right; }

  .hero {
    width: 100%;
    padding: 64px 20px 70px;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.7rem, 12vw, 4.6rem);
    line-height: .96;
    letter-spacing: -.05em;
  }

  .hero .lead {
    max-width: 660px;
    font-size: 1.05rem;
  }

  .video-slot,
  .video-placeholder,
  .video-player {
    width: 100%;
    min-width: 0;
  }

  .video-placeholder {
    min-height: 220px;
    padding: 22px 16px;
  }

  .section,
  .contact {
    width: 100%;
    padding: 68px 20px;
  }

  .section h2,
  .contact h2,
  .testimonials-heading h2,
  .home-story-heading h3 {
    max-width: 100%;
    font-size: clamp(2.25rem, 10vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -.04em;
  }

  .home-about-head,
  .home-about-layout,
  .testimonials-heading,
  .contact-layout {
    width: 100%;
    min-width: 0;
  }

  .home-about-layout {
    gap: 28px;
    padding: 42px 0;
  }

  .home-about .about-services-title {
    font-size: clamp(2.6rem, 11vw, 4.2rem);
  }

  .home-about .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    width: 100%;
  }

  .home-about .stats div,
  .home-about .stats div + div {
    min-width: 0;
    padding: 6px 14px 6px 0;
  }

  .home-about .stats div + div {
    padding-right: 0;
    padding-left: 18px;
  }

  .home-about .stats strong {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .home-about .stats span {
    font-size: .88rem;
    line-height: 1.35;
  }

  .service-grid,
  .testimonials-grid,
  .home-story-copy,
  .gallery-grid {
    width: 100%;
    min-width: 0;
  }

  .service-grid article,
  .testimonial-card,
  .story-card,
  .gallery-tile {
    width: 100%;
    min-width: 0;
  }

  .service-grid article {
    min-height: 0;
    padding: 28px 4px;
  }

  .service-grid h3 {
    margin-top: 34px;
  }

  .testimonial-card,
  .story-card {
    min-height: 0;
    padding: 24px 20px;
  }

  .story-card-top {
    align-items: flex-start;
  }

  .story-card-index {
    max-width: calc(100% - 70px);
  }

  .route-fields {
    grid-template-columns: 1fr;
  }

  .contact form {
    width: 100%;
    min-width: 0;
    padding: 22px 18px;
  }

  input,
  textarea,
  button {
    max-width: 100%;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 24px 20px;
  }

  .editor-bar {
    bottom: 12px;
    gap: 8px;
    width: calc(100% - 24px);
  }

  .about-intro {
    min-height: auto;
    padding: 68px 20px 36px;
  }

  .about-intro h1,
  .about-intro .about-services-title {
    max-width: 100%;
    font-size: clamp(2.8rem, 12vw, 4.8rem);
    line-height: .96;
    letter-spacing: -.05em;
  }

  .intro-foot {
    width: 100%;
  }

  .about-narrative {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 68px 20px;
  }

  .narrative-heading,
  .narrative-text {
    width: 100%;
    min-width: 0;
  }

  .about-contact {
    width: 100%;
    padding: 68px 20px;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-inline: 16px;
  }

  .topbar .brand {
    max-width: none;
    font-size: .94rem;
  }

  .topbar .edit-toggle {
    padding: 8px 11px;
    font-size: .82rem;
  }

  .hero,
  .section,
  .contact {
    padding-right: 18px;
    padding-left: 18px;
  }

  .primary-button {
    padding: 13px 18px;
  }
}
