/* DOMATOR — warstwa responsywna (mobile / tablet) */

/* ——— TABLET ——— */
@media (max-width: 1024px) {
  .wrap, .wrap-md, .wrap-lg { padding-left: 20px; padding-right: 20px; }
  section { padding: 64px 0; }
}

@media (max-width: 900px) {
  div[style*="grid-template-columns"],
  ul[style*="grid-template-columns"] { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-services { grid-template-columns: 1fr 1fr !important; }
}

/* ——— MOBILE ——— */
@media (max-width: 768px) {
  .wrap, .wrap-md, .wrap-lg { padding-left: 16px; padding-right: 16px; }
  section { padding: 44px 0 !important; }

  /* jedna kolumna wszędzie */
  div[style*="grid-template-columns"],
  ul[style*="grid-template-columns"],
  .grid-services { grid-template-columns: 1fr !important; }

  /* nagłówek: logo + mail w jednym rzędzie, nawigacja pod nimi */
  header.wrap-lg {
    flex-wrap: wrap !important;
    row-gap: 10px;
    padding-top: 16px !important;
  }
  header.wrap-lg > nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px !important;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  header.wrap-lg > nav::-webkit-scrollbar { display: none; }
  header.wrap-lg > nav a {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 12px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  /* długi e-mail w headerze → tylko ikona */
  header a[href^="mailto"] { font-size: 0 !important; gap: 0 !important; padding: 8px; }
  header a[href^="mailto"] i, header a[href^="mailto"] svg { width: 20px; height: 20px; }

  /* typografia */
  h1 { font-size: clamp(1.9rem, 9vw, 3rem) !important; letter-spacing: -0.02em !important; }
  h2 { font-size: clamp(1.65rem, 7.5vw, 2.4rem) !important; letter-spacing: -0.02em !important; }
  h3 { font-size: 18px !important; }
  p, li, blockquote, summary { text-wrap: pretty; }

  /* hero */
  section.sky-gradient > .wrap-lg { padding: 16px 16px 28px !important; }
  section.sky-gradient img[src*="hero"] {
    height: 78vh !important;
    min-height: 440px !important;
    max-height: 620px;
  }
  section.sky-gradient > .wrap-lg > div:first-child { border-radius: 22px !important; }
  section.sky-gradient > .wrap-lg > div:first-child > div[style*="bottom"] {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    gap: 18px !important;
  }
  section.sky-gradient span[style*="right:24px"][style*="top:24px"] {
    right: 12px !important;
    top: 12px !important;
    font-size: 9px !important;
    padding: 5px 10px !important;
  }

  /* przyciski — pełna szerokość, wygodny target */
  .btn-primary, .btn-outline,
  a[style*="border-radius:999px"][style*="padding:12px 20px"] {
    min-height: 48px;
    justify-content: center;
  }
  div[style*="display:flex"][style*="gap:12px"] > .btn-primary,
  div[style*="display:flex"][style*="gap:12px"] > a[style*="border-radius:999px"] { flex: 1 1 100%; }

  /* karty i kontenery */
  .card { padding: 22px !important; border-radius: 20px !important; }
  div[style*="border-radius:32px"] { border-radius: 22px !important; }
  div[style*="border-radius:28px"] { border-radius: 20px !important; }
  div[style*="padding:56px 40px"] { padding: 32px 20px !important; }
  div[style*="padding:32px"] { padding: 22px !important; }

  /* obrazy dekoracyjne */
  img[src*="courtyard"], img[src*="entrance"] { height: 220px !important; }
  img[src*="panorama"] { height: 240px !important; }
  img[src*="building-facade"] { height: 200px !important; }
  div[style*="left:32px"][style*="bottom:32px"] { left: 18px !important; right: 18px !important; bottom: 18px !important; }

  /* odznaka „20+ lat" na sekcji O nas */
  div[style*="width:144px"][style*="height:144px"] {
    width: 104px !important;
    height: 104px !important;
    right: 8px !important;
    bottom: -16px !important;
  }
  div[style*="width:144px"] p[style*="font-size:36px"] { font-size: 26px !important; }

  /* FAQ */
  details p { padding-left: 0 !important; }
  details summary { font-size: 16px !important; }

  /* stopka */
  footer > .wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  footer p { text-align: left !important; }

  /* nic nie wystaje poza ekran */
  body { overflow-x: hidden; }
  aside { position: static !important; width: auto !important; }
  table { display: block; overflow-x: auto; }
}

@media (max-width: 420px) {
  .card { padding: 18px !important; }
  section.sky-gradient img[src*="hero"] { min-height: 400px !important; }
  p[style*="font-size:36px"] { font-size: 28px !important; }
}
