/* ============================================================
   apteki-custom.css — nadpisuje Hugo Book dla stron aptek
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --apt-blue:        #2563eb;
  --apt-blue-dark:   #1d4ed8;
  --apt-blue-light:  #eff6ff;
  --apt-blue-border: #bfdbfe;
  --apt-green:       #16a34a;
  --apt-green-bg:    #dcfce7;
  --apt-green-bd:    #bbf7d0;
  --apt-red:         #b91c1c;
  --apt-red-bg:      #fee2e2;
  --apt-red-bd:      #fecaca;
  --apt-text:        #0f172a;
  --apt-muted:       #64748b;
  --apt-border:      #e2e8f0;
  --apt-bg:          #f5f7fb;
  --apt-card:        #ffffff;
  --apt-shadow:      0 2px 12px rgba(15,23,42,.07);
  --apt-shadow-lg:   0 8px 32px rgba(15,23,42,.11);
  --apt-radius:      14px;
  --apt-font:        'DM Sans', system-ui, sans-serif;
  --apt-mono:        'DM Mono', monospace;
}

/* ── Nadpisz font dla całego body ── */
body {
  font-family: var(--apt-font) !important;
  background: var(--apt-bg) !important;
}

/* ── Szersze book-page ── */
.book-page {
  background: var(--apt-bg);
}

.markdown, .book-article {
  font-family: var(--apt-font);
  line-height: 1.6;
}

/* ============================================================
   H1 — tytuł apteki
   ============================================================ */
.book-article h1 {
  color: #0f172a !important;
  font-size: clamp(20px, 2.4vw, 28px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.2 !important;
  margin-bottom: 10px !important;
  border: none !important;
}

/* Ukryj anchor # przy nagłówkach Book */
.book-article h1 .anchor,
.book-article h2 .anchor,
.book-article h3 .anchor {
  display: none !important;
}

/* ── Podtytuł (adres pod h1) ── */
.apt-subtitle {
  color: var(--apt-muted);
  font-size: 16px;
  margin-bottom: 14px;
  font-family: var(--apt-font);
}

/* ============================================================
   Widget otwarte / zamknięte
   ============================================================ */
.apt-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.apt-name-row h2 {
  margin: 0 !important;
  border: none !important;
  padding: 0 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--apt-text) !important;
}

.apt-name-row h3 {
  margin: 0 !important;
  border: none !important;
  padding: 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.apt-name-row h3 a {
  color: var(--apt-blue) !important;
  text-decoration: none;
}
.apt-name-row h3 a:hover { text-decoration: underline; }

.apt-open-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  font-family: var(--apt-font);
}

.apt-open   { background: var(--apt-green-bg); color: #166534; border: 1px solid var(--apt-green-bd); }
.apt-closed { background: var(--apt-red-bg);   color: var(--apt-red); border: 1px solid var(--apt-red-bd); }

.apt-open-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.apt-open .apt-open-dot   { background: var(--apt-green); animation: apt-pulse 2s infinite; }
.apt-closed .apt-open-dot { background: #dc2626; }

@keyframes apt-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .35; }
}

.apt-open-detail {
  font-weight: 500;
  font-size: 12px;
  opacity: .75;
}

/* ============================================================
   Układ dwukolumnowy adres + mapa
   ============================================================ */
.apt-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}

@media (max-width: 680px) {
  .apt-layout { grid-template-columns: 1fr; }
}

.apt-col-left, .apt-col-right { min-width: 0; }

/* ============================================================
   Karty (card)
   ============================================================ */
.apt-card {
  background: var(--apt-card);
  border: 1px solid var(--apt-border);
  border-radius: var(--apt-radius);
  box-shadow: var(--apt-shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.apt-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--apt-text);
  margin-bottom: 16px;
  font-family: var(--apt-font);
}

.apt-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--apt-blue-light);
  color: var(--apt-blue);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* ============================================================
   Tabela godzin otwarcia
   ============================================================ */
.apt-card table,
.apt-hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--apt-font);
}

.apt-card table th,
.apt-hours-table th {
  display: none; /* chowamy nagłówki — niepotrzebne wizualnie */
}

.apt-card table td,
.apt-hours-table td {
  padding: 10px 6px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--apt-muted);
  vertical-align: middle;
}

.apt-card table td:first-child,
.apt-hours-table td:first-child {
  font-weight: 600;
  color: var(--apt-text);
  width: 130px;
}

.apt-card table td:last-child,
.apt-hours-table td:last-child {
  text-align: right;
  font-weight: 600;
  font-family: var(--apt-mono);
  color: var(--apt-text);
}

.apt-card table tr:last-child td,
.apt-hours-table tr:last-child td {
  border-bottom: none;
}

/* Podświetl dzisiejszy dzień */
.apt-card table tr.today td,
.apt-hours-table tr.today td {
  color: var(--apt-blue);
  background: var(--apt-blue-light);
}

/* Uwaga pod tabelą godzin */
.apt-hours-note {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--apt-border);
  font-size: 13px;
  color: var(--apt-muted);
  line-height: 1.65;
  font-family: var(--apt-font);
}

.apt-hours-note strong {
  color: var(--apt-red);
  font-weight: 700;
}

/* ============================================================
   Mapa
   ============================================================ */
.apt-map-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--apt-border);
}

.apt-map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
}

/* Pole adres + kopiuj */
.apt-address-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.apt-address-copy-box {
  flex: 1;
  padding: 10px 13px;
  border: 1px solid var(--apt-border);
  border-radius: 10px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
  font-family: var(--apt-font);
}

.apt-btn-copy {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--apt-blue);
  background: #fff;
  color: var(--apt-blue);
  font-family: var(--apt-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, transform .12s;
  line-height: 1;
}

.apt-btn-copy:hover {
  background: var(--apt-blue);
  color: #fff;
  transform: translateY(-1px);
}

.apt-btn-copy.copied {
  background: var(--apt-green-bg);
  border-color: var(--apt-green-bd);
  color: var(--apt-green);
}

@media (max-width: 480px) {
  .apt-address-copy-row { flex-direction: column; align-items: stretch; }
  .apt-btn-copy { text-align: center; }
}

/* ============================================================
   Info rows — dane kontaktowe, pozostałe informacje
   ============================================================ */
.apt-info-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  font-family: var(--apt-font);
  align-items: flex-start;
}

.apt-info-row:first-child { padding-top: 0; }
.apt-info-row:last-child  { border-bottom: none; padding-bottom: 0; }

.apt-info-label {
  color: var(--apt-muted);
  min-width: 110px;
  flex-shrink: 0;
  font-weight: 500;
  font-size: 13px;
  padding-top: 1px;
}

.apt-info-value {
  color: var(--apt-text);
  font-weight: 600;
  line-height: 1.5;
}

.apt-info-value a {
  color: var(--apt-blue) !important;
  text-decoration: none;
}
.apt-info-value a:hover { text-decoration: underline; }

.apt-phone {
  font-family: var(--apt-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--apt-blue) !important;
  letter-spacing: -0.02em;
}

/* ============================================================
   Apteki w okolicy — siatka kart
   ============================================================ */
.apt-nearby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.apt-nearby-item {
  border: 1px solid var(--apt-border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fafbfd;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}

.apt-nearby-item:hover {
  box-shadow: var(--apt-shadow);
  border-color: var(--apt-blue-border);
  transform: translateY(-1px);
}

.apt-nearby-addr {
  font-size: 13px;
  color: var(--apt-muted);
  line-height: 1.5;
  margin: 4px 0 8px;
  font-family: var(--apt-font);
}

.apt-nearby-tel {
  font-size: 13px;
  font-weight: 700;
  color: var(--apt-text);
  font-family: var(--apt-mono);
}

/* ============================================================
   Blok "Pozostałe informacje" i "Apteki w okolicy" — h2
   ============================================================ */
.book-article h2.apt-section-h2 {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--apt-text) !important;
  margin: 24px 0 14px !important;
  padding: 0 !important;
  border: none !important;
}

.apt-section-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--apt-blue-light);
  color: var(--apt-blue);
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* ============================================================
   Lokalizacje i region pills (dla stron woj/powiat/gmina)
   ============================================================ */
.apt-region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 0 16px;
}

.apt-region-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--apt-blue-light);
  border: 1px solid var(--apt-blue-border);
  color: var(--apt-blue);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background .15s, border-color .15s;
  font-family: var(--apt-font);
}

.apt-region-pill:hover {
  background: var(--apt-blue-border);
  color: var(--apt-blue-dark);
}

/* ============================================================
   HAMBURGER MENU — mobile
   Hugo Book ma już input#menu-control i label.
   Pokazujemy label na małych ekranach i stylujemy topbar.
   ============================================================ */

/* Pokaż hamburger button w book-header na mobile */
@media (max-width: 768px) {

  /* book-header normalnie jest hidden — odkrywamy */
  .book-header {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #071a33;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 0 16px;
    height: 52px;
    align-items: center;
    justify-content: space-between;
  }

  .book-header h3 {
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 120px);
    margin: 0;
    font-family: var(--apt-font);
  }

  /* Hamburger icon — zamień SVG na CSS burger */
  .book-header label[for="menu-control"] {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 8px;
    transition: background .15s;
    flex-shrink: 0;
  }

  .book-header label[for="menu-control"]:hover {
    background: rgba(255,255,255,.1);
  }

  /* Ukryj domyślną ikonę Book i pokaż własne kreski */
  .book-header label[for="menu-control"] img {
    display: none;
  }

  .book-header label[for="menu-control"]::before,
  .book-header label[for="menu-control"]::after,
  .book-header label[for="menu-control"] span {
    content: '';
    display: block;
    height: 2px;
    width: 100%;
    background: #bfdbfe;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }

  /* Animacja do X gdy menu otwarte */
  #menu-control:checked ~ .container .book-header label[for="menu-control"]::before {
    transform: translateY(7px) rotate(45deg);
    background: #fff;
  }
  #menu-control:checked ~ .container .book-header label[for="menu-control"] span {
    opacity: 0;
  }
  #menu-control:checked ~ .container .book-header label[for="menu-control"]::after {
    transform: translateY(-7px) rotate(-45deg);
    background: #fff;
  }
}

/* ============================================================
   Sidebar — stylizacja pod nowy design
   ============================================================ */
.book-menu {
  background: linear-gradient(180deg, #071a33 0%, #0b2444 100%) !important;
}

.book-menu .book-menu-content {
  background: transparent !important;
}

/* Brand / logo */
.book-brand {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #fff !important;
  font-family: var(--apt-font) !important;
  letter-spacing: -0.3px !important;
  margin-bottom: 20px !important;
}

.book-brand a {
  color: #fff !important;
  text-decoration: none !important;
}
.book-brand a:hover { color: #bfdbfe !important; }

/* Wyszukiwarka */
.book-search input {
  background: rgba(255,255,255,.09) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-family: var(--apt-font) !important;
  font-size: 13px !important;
}

.book-search input::placeholder { color: #93c5fd !important; opacity: .8; }
.book-search input:focus {
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(147,197,253,.5) !important;
  outline: none !important;
}

/* Linki w menu */
.book-menu nav ul li a {
  color: #bfdbfe !important;
  font-family: var(--apt-font) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  transition: background .15s, color .15s !important;
}

.book-menu nav ul li a:hover,
.book-menu nav ul li a.active {
  background: rgba(37,99,235,.3) !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Zagnieżdżone listy (apteki, miejscowości) — mniejszy font */
.book-menu nav > ul > li > ul {
  margin-left: 8px;
}

.book-menu nav > ul > li > ul li a {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #93c5fd !important;
  padding: 4px 10px !important;
}

.book-menu nav > ul > li > ul li a:hover,
.book-menu nav > ul > li > ul li a.active {
  color: #fff !important;
  background: rgba(37,99,235,.2) !important;
}

/* ============================================================
   Poprawki finalne
   ============================================================ */

/* Tło strony */
.book-page,
.book-article { background: #f5f7fb !important; }

.book-article {
  padding: 26px 32px !important;
  max-width: 1180px !important;
}

/* Układ kart: lewa szersza */
.apt-layout {
  grid-template-columns: minmax(320px, 40%) 1fr !important;
  gap: 22px !important;
  align-items: stretch !important;
}

/* Karty */
.apt-card {
  border-radius: 18px !important;
  padding: 22px !important;
  border: 1px solid #e5eaf2 !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.07) !important;
  background: #fff !important;
  margin-bottom: 16px !important;
}

.apt-card-title {
  font-size: 13px !important;
  letter-spacing: .05em !important;
  margin-bottom: 18px !important;
}

.apt-card-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

/* Info rows */
.apt-info-row {
  padding: 12px 0 !important;
  gap: 18px !important;
}

.apt-info-label {
  min-width: 85px !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
  letter-spacing: .05em !important;
}

.apt-info-value {
  font-size: 14px !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

.apt-phone {
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  font-family: var(--apt-font) !important;
}

/* Tabela godzin — rozmiar i odstępy */
.apt-card table td,
.apt-hours-table td {
  padding: 11px 8px !important;
  font-size: 14px !important;
}

.apt-card table td:first-child,
.apt-hours-table td:first-child {
  width: 150px !important;
  min-width: 150px !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  padding-left: 0 !important;
}

.apt-card table td:last-child,
.apt-hours-table td:last-child {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  padding-right: 0 !important;
}

/* Uwaga pod godzinami */
.apt-hours-note {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin-top: 16px !important;
  font-size: 12px !important;
}

/* Mapa */
.apt-map-wrap {
  border-radius: 16px !important;
  border: 1px solid #dbe3ef !important;
  overflow: hidden !important;
}

.apt-map-wrap iframe {
  height: 100% !important;
  min-height: 300px !important;
  display: block;
  width: 100%;
}

/* Adres + kopiuj */
.apt-address-copy-row {
  margin-top: 14px !important;
  gap: 10px !important;
}

.apt-address-copy-box {
  padding: 11px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  background: #f8fafc !important;
}

.apt-btn-copy {
  padding: 11px 16px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  white-space: nowrap;
}

/* Sidebar */
.book-menu { width: 255px !important; }
.book-brand { font-size: 22px !important; margin-bottom: 24px !important; }
.book-search input {
  height: 40px !important;
  border-radius: 12px !important;
  padding: 0 14px !important;
}
.book-menu nav ul li a {
  padding: 8px 10px !important;
  margin-bottom: 2px !important;
}

/* Responsive */
@media (max-width: 900px) {
  .apt-layout { grid-template-columns: 1fr !important; }
  .apt-map-wrap iframe { min-height: 280px !important; height: 280px !important; }
  .book-article { padding: 20px 16px !important; }
}

@media (max-width: 600px) {
  .apt-nearby-grid { grid-template-columns: 1fr; }
  .apt-address-copy-row { flex-direction: column; align-items: stretch; }
  .apt-btn-copy { text-align: center; }
}

/* ============================================================
   Korekty widoku pojedynczej apteki
   ============================================================ */

.book-article h1 {
  color: #2563eb !important;
}

.apt-card-title {
  color: #1d4ed8 !important;
  font-size: 18px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.25 !important;
}

.book-article h2.apt-section-h2 {
  color: #1d4ed8 !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
}

.apt-info-label {
  min-width: 96px !important;
  color: #64748b !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.apt-nearby-grid {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
  gap: 14px !important;
}

.apt-nearby-item {
  min-width: 0;
}

.apt-nearby-item .apt-name-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  align-items: start !important;
}

.apt-nearby-item .apt-open-widget,
.apt-nearby-item .apt-open-badge {
  max-width: 100% !important;
  width: 100% !important;
}

.apt-nearby-item .apt-open-badge {
  justify-content: flex-start !important;
  white-space: normal !important;
  flex-wrap: wrap !important;
  row-gap: 3px !important;
  padding: 8px 12px !important;
}

.apt-nearby-item .apt-open-detail {
  min-width: 0 !important;
}

.apt-hours-list {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin: 8px 0 16px;
  background: #fff;
}

.apt-hours-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 50px;
  padding: 13px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.apt-hours-row:nth-child(even) {
  background: #eff6ff;
}

.apt-hours-row:last-child {
  border-bottom: 0;
}

.apt-hours-day {
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
}

.apt-hours-time {
  color: #020617;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.apt-hours-note strong {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

.apt-col-right .apt-card {
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
}

@media (max-width: 520px) {
  .apt-nearby-grid {
    grid-template-columns: 1fr !important;
  }

  .apt-hours-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Hotfix: mocniejsze nagłówki kart po nadpisaniach Hugo Book */
.book-article .apt-card > .apt-card-title,
.markdown.book-article .apt-card > .apt-card-title,
article.book-article .apt-card > .apt-card-title {
  color: #2563eb !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  margin-bottom: 24px !important;
}

.book-article .apt-card > .apt-card-title .apt-card-icon,
.markdown.book-article .apt-card > .apt-card-title .apt-card-icon,
article.book-article .apt-card > .apt-card-title .apt-card-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  font-size: 19px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
}

.book-article h2.apt-section-h2,
.markdown.book-article h2.apt-section-h2,
article.book-article h2.apt-section-h2 {
  color: #2563eb !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.apt-city-search-row {
  padding-top: 16px !important;
}

.apt-city-search-link {
  display: inline-flex;
  align-items: center;
  color: #2563eb !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.apt-city-search-link:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

.apt-location-grid {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
  margin-top: 18px !important;
}

.apt-location-item {
  background: #fff !important;
  padding: 18px !important;
}

.apt-location-item .apt-name-row,
.apt-nearby-item .apt-name-row {
  margin-bottom: 12px !important;
}

.apt-location-item h3,
.apt-nearby-item h3 {
  font-size: 16px !important;
  line-height: 1.3 !important;
}

.apt-location-item .apt-open-badge {
  width: 100% !important;
  max-width: 100% !important;
}

.apt-phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  color: #2563eb;
  font-size: 14px;
  line-height: 1;
}

.apt-nearby-tel {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* ============================================================
   Strona główna
   ============================================================ */

.apt-home {
  width: 100%;
  max-width: 1120px;
}

.apt-home-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  padding: 28px;
}

.apt-home-panel h1 {
  color: #2563eb !important;
  font-size: clamp(32px, 4vw, 48px) !important;
  line-height: 1.05 !important;
  margin: 0 0 18px !important;
}

.apt-home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.apt-home-stats div {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.apt-home-stats strong {
  color: #2563eb !important;
  font-size: 18px;
  font-weight: 800;
}

.apt-home-stats span {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.apt-home-search {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.apt-home-search span {
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
}

.apt-home-search input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 16px;
  padding: 0 16px;
  outline: none;
}

.apt-home-search input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  background: #fff;
}

.apt-home-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.apt-home-list a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #2563eb !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: border-color .15s, background .15s, transform .15s;
}

.apt-home-list a:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  transform: translateY(-1px);
}

/* ============================================================
   Strona główna v2
   ============================================================ */

.apt-home-v2 {
  max-width: 1180px;
}

.apt-home-hero {
  position: relative;
  overflow: visible;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  padding: clamp(28px, 5vw, 56px);
}

.apt-home-hero::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: #dbeafe;
  filter: blur(44px);
  opacity: .78;
}

.apt-home-hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  left: 38%;
  bottom: -160px;
  border-radius: 50%;
  background: #cffafe;
  filter: blur(48px);
  opacity: .72;
}

.apt-home-hero > * {
  position: relative;
  z-index: 1;
}

.apt-home-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 9px 14px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
}

.apt-home-hero h1 {
  max-width: 780px;
  margin: 0 !important;
  color: #2563eb !important;
  font-size: clamp(42px, 6vw, 72px) !important;
  font-weight: 400 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
}

.apt-home-hero p {
  max-width: 720px;
  margin: 20px 0 0;
  color: #475569;
  font-size: 18px;
  line-height: 1.75;
}

.apt-home-searchbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: 860px;
  margin-top: 30px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 42px rgba(30, 64, 175, .11);
}

.apt-home-searchbar > span {
  padding-left: 12px;
  color: #94a3b8;
  font-size: 20px;
}

.apt-home-searchbar input {
  width: 100%;
  height: 56px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 16px;
  padding: 0 16px;
  outline: none;
}

.apt-home-searchbar input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.apt-home-searchbar button {
  height: 56px;
  border: 0;
  border-radius: 18px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 0 26px;
  cursor: default;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.apt-home-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.apt-home-badges span {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
}

.apt-home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 18px;
}

.apt-home-section-head h2 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.apt-home-section-head p {
  margin: 8px 0 0;
  color: #64748b;
}

.apt-home-section-head a {
  flex: 0 0 auto;
  padding: 11px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #2563eb !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
}

.apt-city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.apt-city-card {
  display: block;
  min-height: 160px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  padding: 18px;
  text-decoration: none !important;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.apt-city-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .09);
  transform: translateY(-2px);
}

.apt-city-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #eff6ff;
  font-size: 20px;
}

.apt-city-card strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.apt-city-card:hover strong {
  color: #2563eb;
}

.apt-city-card em {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
  font-style: normal;
}

.apt-home-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.apt-home-info-grid > div {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  padding: 24px;
}

.apt-home-info-grid span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: #eff6ff;
  font-size: 24px;
}

.apt-home-info-grid h3 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

.apt-home-info-grid p {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.book-search #book-search-results .apt-search-message {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.apt-home-searchbar {
  position: relative;
  z-index: 40;
}

.apt-home-search-results {
  position: absolute;
  z-index: 9999;
  left: clamp(28px, 5vw, 56px);
  right: clamp(28px, 5vw, 56px);
  top: 100%;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
}

.apt-home-badges,
.apt-home-section-head,
.apt-city-grid,
.apt-home-info-grid {
  position: relative;
  z-index: 0;
}

.apt-location-note {
  margin: 0 0 18px !important;
  max-width: 760px;
}

.apt-home-search-results:empty {
  display: none;
}

.apt-home-search-results li {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 10px;
}

.apt-home-search-results li:hover {
  background: #eff6ff;
}

.apt-home-search-results a {
  color: #2563eb !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
}

.apt-home-search-results small {
  color: #64748b;
  font-size: 12px;
}

.apt-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.apt-link-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #2563eb !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
}

.apt-link-list a:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
}

@media (max-width: 820px) {
  .apt-home-searchbar {
    grid-template-columns: 1fr;
  }

  .apt-home-searchbar > span {
    display: none;
  }

  .apt-home-searchbar button {
    width: 100%;
  }

  .apt-home-section-head {
    display: block;
  }

  .apt-home-section-head a {
    display: inline-flex;
    margin-top: 14px;
  }

  .apt-home-info-grid {
    grid-template-columns: 1fr;
  }
}
