/* Globální styly webu 1. Pelhřimovská s.r.o. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  color: #14181f;
  background: #eae3d6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #1230b8; text-decoration: none; }
a:hover { color: #0b2280; }
h1, h2, h3 { font-family: 'Archivo', 'Instrument Sans', sans-serif; margin: 0; }
::placeholder { color: #9aa2ad; }

/* Položky hlavního menu s animovaným podtržením */
.pnav {
  position: relative;
  display: inline-block;
  padding: 8px 14px 14px;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  color: #3c4451;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.pnav::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 7px;
  height: 2px;
  border-radius: 2px;
  background: #c98a2e;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
}
.pnav:hover { color: #0b2280; }
.pnav:hover::after { transform: scaleX(1); }
.pnav.is-active { color: #0b2280; font-weight: 600; }
.pnav.is-active::after { transform: scaleX(1); background: #1230b8; }

/* Tlačítko hamburger menu (jen na mobilu) */
.hamburger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  color: #14181f;
  cursor: pointer;
  line-height: 0;
}

/* ===================== RESPONZIVITA ===================== */
/* Web má vše v inline stylech, proto přepisujeme přes atributové selektory + !important. */

/* Tablet a menší */
@media (max-width: 900px) {
  /* Neprůhledná hlavička na mobilu (tmavé logo musí být čitelné) */
  #hlavicka { background: #faf6ee !important; }

  /* Hamburger místo vodorovného menu */
  .hamburger { display: inline-flex; margin-left: auto; }
  .menu-obal {
    display: none !important;
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 6px !important;
    background: rgba(250, 246, 238, 0.98);
    backdrop-filter: blur(10px);
    padding: 14px 24px 20px;
    border-bottom: 1px solid rgba(15, 24, 40, 0.09);
    box-shadow: 0 14px 26px rgba(15, 24, 40, 0.10);
  }
  #hlavicka.menu-otevreno .menu-obal { display: flex !important; }
  .hlavni-menu { flex-direction: column; align-items: stretch !important; gap: 2px !important; }
  .hlavni-akce { flex-direction: column; align-items: stretch !important; padding-left: 0 !important; margin-top: 8px; }
  .pnav { padding: 11px 6px !important; }

  /* Mřížky: 5/4 sloupce -> 2, 3 sloupce -> 2, dvousloupcové layouty -> 1 */
  [style*="grid-template-columns:repeat(5,1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:1.5fr 1fr 1fr 1fr"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:1fr 1.15fr"],
  [style*="grid-template-columns:1fr 1.35fr"],
  [style*="grid-template-columns:1.35fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Mobil */
@media (max-width: 600px) {
  /* Všechny mřížky do jednoho sloupce */
  [style*="grid-template-columns:repeat(5,1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns:1.5fr 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Zmenšení velkých nadpisů */
  h1 { font-size: 28px !important; line-height: 1.15 !important; overflow-wrap: break-word; }
  h2 { font-size: 24px !important; line-height: 1.2 !important; overflow-wrap: break-word; }

  /* Menší svislé odsazení hero a sekcí */
  [style*="padding:96px 24px 104px"] { padding: 52px 20px 60px !important; }
  [style*="padding:72px 24px 84px"]  { padding: 48px 20px 56px !important; }
  [style*="padding:56px 44px"]       { padding: 40px 24px !important; }
  [style*="padding:56px 48px"]       { padding: 36px 24px !important; }
  [style*="padding:52px 48px"]       { padding: 34px 22px !important; }
}

/* Ochrana proti vodorovnému přetečení na malých displejích */
@media (max-width: 900px) {
  img, video, iframe, picture { max-width: 100%; }
}
