/* Responsive refinements for iOS Safari and Android Chrome */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
  overflow-x: clip;
  scroll-padding-top: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

/* The source banner is 1200 x 400 (3:1). Keep its natural ratio so the
   entire artwork remains visible on both iPhone and Android screens. */
.hero {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  overflow: hidden;
}
.hero-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center;
}

img, video, iframe { max-width: 100%; }
button, a { touch-action: manipulation; }
button { -webkit-appearance: none; }

@media screen and (max-width: 768px) {
  .hero-banner {
    width: 100%;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
  .hero-content { padding: 22px 16px 28px; }
  .hero p { font-size: 1rem; }
  main { width: calc(100% - 24px); margin: 16px auto 32px; }
  .section { padding: 20px 16px; border-radius: 13px; }
  nav a, .nav-toggle { min-height: 46px; }
  .nav-wrap { position: sticky; top: 0; }
  .about-grid { gap: 18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 420px; }
}

@media screen and (max-width: 480px) {
  .hero-banner {
    /* Natural image height is essential: do not crop the left/right edges. */
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
  .hero-content { padding: 20px 14px 24px; }
  .hero h1 { font-size: clamp(1.55rem, 7vw, 2rem); }
  .hero p { font-size: .96rem; line-height: 1.55; }
  .actions { gap: 10px; }
  .btn { min-height: 44px; padding: 11px 16px; }
  .language-bar { flex-wrap: wrap; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: auto; max-height: 300px; object-fit: cover; }
  .section { margin: 14px 0; padding: 19px 14px; }
  .card, .notice { padding: 16px; }
  footer { padding-bottom: max(26px, env(safe-area-inset-bottom)); }
}

@supports (padding: max(0px)) {
  .language-bar {
    padding-left: max(4%, env(safe-area-inset-left));
    padding-right: max(4%, env(safe-area-inset-right));
  }
}
