/* ============================================================
   DHGH Hospitality — style.css
   Mobile-first · fluid typography · CSS custom properties
   ============================================================ */

/* ── Zmienne ── */
:root {
  --navy-900: #0b1f3d;
  --navy-800: #12305c;
  --navy-700: #1c4278;
  --navy-100: #e8eef6;
  --teal-500: #2a9d9c;
  --teal-400: #35b5b3;
  --teal-100: #e3f4f4;

  --ink:      #14213d;
  --ink-mute: #5a6a85;
  --line:     #dbe3ee;
  --bg:       #ffffff;
  --bg-soft:  #f6f8fb;

  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 1px 2px rgba(11,31,61,.06), 0 8px 24px rgba(11,31,61,.08);
  --shadow-lg: 0 2px 4px rgba(11,31,61,.06), 0 24px 48px rgba(11,31,61,.14);

  --ff-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* Fluid type — skaluje się płynnie 320px → 1440px */
  --fs-xs:   clamp(.75rem, .72rem + .15vw, .82rem);
  --fs-sm:   clamp(.875rem, .84rem + .18vw, .95rem);
  --fs-base: clamp(1rem, .96rem + .2vw, 1.075rem);
  --fs-lg:   clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  --fs-xl:   clamp(1.5rem, 1.25rem + 1.2vw, 2.1rem);
  --fs-2xl:  clamp(2rem, 1.5rem + 2.4vw, 3.4rem);

  --gap:      clamp(1rem, .7rem + 1.5vw, 2rem);
  --section-y: clamp(3rem, 2rem + 5vw, 7rem);
  --container: 1200px;

  --header-h: 72px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--navy-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--ff-head); line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-800);
  color: #fff;
  padding: .75rem 1.25rem;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(11,31,61,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--navy-800);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.logo-text {
  font-family: var(--ff-head);
  font-size: var(--fs-lg);
  letter-spacing: .01em;
  white-space: nowrap;
}
.logo-text strong { font-weight: 700; letter-spacing: .04em; }
.logo--footer { color: #fff; }
.logo--footer .logo-text { color: #fff; }

/* ── Nawigacja ── */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 1.5vw, 1.75rem);
}
.main-nav a {
  display: block;
  padding: .5rem .25rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: .25rem; right: .25rem; bottom: .25rem;
  height: 2px;
  background: var(--teal-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.main-nav a:hover::after, .main-nav a[aria-current]::after { transform: scaleX(1); }

.nav-bip {
  background: var(--navy-800);
  color: #fff !important;
  padding: .5rem 1.1rem !important;
  border-radius: 100px;
  font-weight: 600 !important;
  letter-spacing: .03em;
}
.nav-bip::after { display: none; }
.nav-bip:hover { background: var(--navy-700); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  margin-inline: auto;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform .3s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height .32s ease;
  }
  .main-nav.open { max-height: 420px; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
  }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav li:last-child { border: none; padding-top: 1rem; }
  .main-nav a { padding: 1rem .25rem; font-size: var(--fs-base); }
  .nav-bip { display: inline-block; }
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: min(92svh, 780px);
  display: grid;
  align-items: end;
  color: #fff;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--navy-900) center/cover no-repeat;
  background-image: var(--hero-img);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(11,31,61,.45) 0%,
    rgba(11,31,61,.25) 35%,
    rgba(11,31,61,.88) 100%);
}
.hero-inner { padding-block: clamp(3rem, 8vw, 6rem); max-width: 62ch; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 1rem;
}
.hero-badge::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--teal-400);
}

.hero h1 {
  font-size: var(--fs-2xl);
  margin-bottom: 1rem;
  text-wrap: balance;
}
.hero p {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,.9);
  margin-bottom: 2rem;
  text-wrap: pretty;
}

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 100px;
  border: 1.5px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--teal-500); color: #fff; }
.btn--primary:hover { background: var(--teal-400); }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--dark { background: var(--navy-800); color: #fff; }
.btn--dark:hover { background: var(--navy-700); }

/* ── Sekcje ── */
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }

.section-head { max-width: 68ch; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.eyebrow {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin-bottom: .75rem;
}
.section-head h2 { font-size: var(--fs-xl); margin-bottom: .75rem; text-wrap: balance; }
.section-head p { color: var(--ink-mute); font-size: var(--fs-lg); text-wrap: pretty; }

/* ── Siatka cech ── */
.feature-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-100);
  color: var(--navy-800);
  margin-bottom: 1.25rem;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: var(--fs-lg); margin-bottom: .5rem; }
.feature p { color: var(--ink-mute); font-size: var(--fs-sm); }

/* ── Split (tekst + obraz) ── */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split-media { order: -1; }
}
.split-media img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.split-body h2 { font-size: var(--fs-xl); margin-bottom: 1rem; }
.split-body p { color: var(--ink-mute); margin-bottom: 1rem; }

/* ── Statystyki ── */
.stats {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--navy-800);
  border-radius: var(--radius);
  color: #fff;
}
.stat-num {
  font-family: var(--ff-head);
  font-size: var(--fs-xl);
  color: var(--teal-400);
  line-height: 1;
  margin-bottom: .35rem;
}
.stat-label { font-size: var(--fs-sm); color: rgba(255,255,255,.75); }

/* ── Galeria ── */
.gallery {
  display: grid;
  gap: clamp(.5rem, 1.5vw, 1rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.gallery figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 3/2;
}
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem .9rem .8rem;
  font-size: var(--fs-xs);
  color: #fff;
  background: linear-gradient(transparent, rgba(11,31,61,.85));
}
@media (min-width: 700px) {
  .gallery figure:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}

/* ── BIP ── */
.bip-hero {
  background: var(--navy-800);
  color: #fff;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.bip-hero h1 { font-size: var(--fs-xl); }
.bip-hero p { color: rgba(255,255,255,.75); font-size: var(--fs-sm); margin-top: .5rem; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: var(--fs-xs);
  padding-block: 1rem;
  color: var(--ink-mute);
}
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb li::after { content: '/'; margin-left: .4rem; color: var(--line); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb ol { display: contents; list-style: none; }

.bip-layout {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  padding-bottom: var(--section-y);
}
@media (min-width: 900px) {
  .bip-layout { grid-template-columns: 280px 1fr; align-items: start; }
  .bip-side { position: sticky; top: calc(var(--header-h) + 1rem); }
}

.bip-side nav ul { display: flex; flex-direction: column; gap: 2px; }
.bip-side a {
  display: block;
  padding: .7rem .9rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--ink);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .18s, border-color .18s;
}
.bip-side a:hover { background: var(--navy-100); }
.bip-side a[aria-current="page"] {
  background: var(--navy-100);
  border-left-color: var(--teal-500);
  font-weight: 600;
  color: var(--navy-800);
}
.bip-side h2 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  margin-bottom: .75rem;
  font-family: var(--ff-sans);
  font-weight: 700;
}

.bip-content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 3rem);
}

/* ── Treść (prose) ── */
.prose h1 { font-size: var(--fs-xl); margin-bottom: 1rem; }
.prose h2 { font-size: var(--fs-lg); margin: 2rem 0 .75rem; }
.prose h3 { font-size: var(--fs-base); font-weight: 700; margin: 1.5rem 0 .5rem; }
.prose p  { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.25rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .35rem; }
.prose blockquote {
  border-left: 3px solid var(--teal-500);
  padding: .5rem 0 .5rem 1.25rem;
  color: var(--ink-mute);
  font-style: italic;
  margin-bottom: 1rem;
}
.prose img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: var(--fs-sm);
}
.prose th, .prose td { padding: .7rem .9rem; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 600; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

/* ── Załączniki ── */
.attachments { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.attachments h2 { font-size: var(--fs-lg); margin-bottom: 1rem; }
.att-list { display: flex; flex-direction: column; gap: .5rem; }
.att-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s, background .2s;
}
.att-item:hover { border-color: var(--teal-500); background: var(--teal-100); }
.att-ext {
  flex-shrink: 0;
  width: 42px;
  padding: .3rem 0;
  text-align: center;
  border-radius: 5px;
  background: var(--navy-800);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.att-name { flex: 1; font-size: var(--fs-sm); word-break: break-word; }
.att-size { font-size: var(--fs-xs); color: var(--ink-mute); white-space: nowrap; }

/* ── Stopka ── */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.75); padding-top: var(--section-y); }
.footer-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  padding-bottom: 3rem;
}
.footer-grid h3 {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-grid ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-grid a { color: rgba(255,255,255,.75); text-decoration: none; font-size: var(--fs-sm); }
.footer-grid a:hover { color: var(--teal-400); }
.footer-note { font-size: var(--fs-sm); margin-top: 1rem; max-width: 32ch; }
.contact-list li { font-size: var(--fs-sm); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: var(--fs-xs);
}
.footer-bottom a { color: rgba(255,255,255,.6); }

/* ── Alerty ── */
.alert {
  padding: .9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  margin-bottom: 1.25rem;
  border: 1px solid;
}
.alert--ok   { background: #e7f7ee; border-color: #a9dcc0; color: #16653c; }
.alert--err  { background: #fdeaea; border-color: #f3b7b7; color: #8f1f1f; }
.alert--info { background: var(--teal-100); border-color: #a9d9d8; color: #14554f; }

/* ── Animacja wejścia ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Druk ── */
@media print {
  .site-header, .site-footer, .bip-side, .btn-row { display: none; }
  .bip-content { border: none; padding: 0; }
  body { font-size: 11pt; }
}

/* ── Logo BIP ── */
.bip-logo-nav {
  height: 24px;
  width: auto;
  display: block;
}

.nav-bip {
  background: #fff;
  color: #111 !important;
  padding: .4rem .85rem !important;
  border: 1px solid var(--line);
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.nav-bip::after { display: none; }
.nav-bip:hover { background: var(--bg-soft); border-color: var(--ink-mute); }

.nav-bip-text {
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  color: #111;
}

.bip-hero-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
}

.bip-logo-hero {
  height: clamp(44px, 6vw, 60px);
  width: auto;
  max-width: 140px;
  background: #fff;
  padding: .5rem .8rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.bip-gov-link { color: var(--teal-400); }
.bip-gov-link:hover { color: #fff; }

/* ── Rozwinięte podstrony w menu przedmiotowym BIP ── */
.bip-side a.is-open {
  background: var(--navy-100);
  font-weight: 600;
  color: var(--navy-800);
}

.bip-subnav {
  margin: 2px 0 .5rem;
  padding-left: .9rem;
  border-left: 1px solid var(--line);
}
.bip-subnav a {
  padding: .5rem .7rem;
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  border-left: 3px solid transparent;
}
.bip-subnav a:hover { color: var(--ink); }
.bip-subnav a[aria-current="page"] {
  color: var(--navy-800);
  font-weight: 600;
  background: var(--navy-100);
  border-left-color: var(--teal-500);
}