
:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e5e7eb;
  --tint:#f6f9fe;
  --card:#ffffff;
  --shadow:0 12px 30px rgba(15,23,42,.08);
  --blue:#0a74da;
  --blue2:#1fb6ff;
  --radius:18px;
  --max:1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
}
.cal__barWrap{
  display:block;
  height:8px;
  border-radius:999px;
  background:#e8eef6;
  overflow:hidden;
  margin-top:6px;
}
.cal__bar{
  display:block;
  height:100%;
  border-radius:999px;
  background:#22c55e; /* zielony */
}
.cal__bar--low{
  background:#f59e0b; /* żółty gdy <=4 */
}

.cal__day--past{
  opacity:.45;
}
.cal__day--out{
  opacity:.35;
}
img{max-width:100%;display:block}
a{color:inherit}
.container{width:min(var(--max), calc(100% - 40px)); margin:0 auto}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Header */
.header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.header__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:18px;
  padding:14px 0;
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none}
.brand__logo{height:48px; width:auto}

.nav{
  display:flex; align-items:center; gap:18px;
}
.nav__link{
  text-decoration:none;
  color:var(--muted);
  font-weight:700;
  font-size:13px;
  padding:10px 10px;
  border-radius:12px;
}
.nav__link:hover{color:var(--text); background:#f1f5f9}
.nav__link.is-active{color:var(--text); background:#eef6ff}
.nav__cta{display:flex; gap:10px; align-items:center; margin-left:4px}

.nav__toggle{
  display:none;
  width:44px; height:44px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:10px;
  cursor:pointer;
}
.nav__toggle span{
  display:block; height:2px; background:#0f172a; border-radius:2px;
}
.nav__toggle span+span{margin-top:6px}

@media (max-width: 980px){
  .nav__toggle{display:inline-block}
  .nav{
    position:fixed;
    inset:72px 16px auto 16px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow: var(--shadow);
    padding:12px;
    display:none;
    flex-direction:column;
    align-items:stretch;
  }
  .nav.is-open{display:flex}
  .nav__cta{flex-direction:column; align-items:stretch; margin-left:0}
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  font-weight:800;
  font-size:13px;
  text-decoration:none;
  border:1px solid var(--line);
  background:#fff;
}
.btn--primary{
  border:0;
  background:linear-gradient(135deg, var(--blue2), var(--blue));
  color:#fff;
  box-shadow: 0 12px 28px rgba(10,116,218,.18);
}
.btn--ghost:hover{background:#f1f5f9}
.btn--primary:hover{filter:brightness(1.03)}

/* Hero */
.hero{
  background:
    radial-gradient(900px 500px at 15% 20%, rgba(31,182,255,.18), transparent 60%),
    radial-gradient(700px 420px at 80% 10%, rgba(10,116,218,.12), transparent 55%),
    var(--tint);
  border-bottom:1px solid var(--line);
  padding:52px 0;
}
.hero__grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:26px;
  align-items:center;
}
@media (max-width: 980px){ .hero__grid{grid-template-columns:1fr} }
.pill{
  display:inline-flex;
  gap:10px;
  align-items:center;
  font-weight:800;
  font-size:12px;
  color:var(--muted);
  background:rgba(255,255,255,.8);
  border:1px solid var(--line);
  padding:8px 12px;
  border-radius:999px;
}
h1{font-size: clamp(34px, 4.2vw, 54px); line-height:1.08; margin:12px 0 10px; letter-spacing:-.6px}
.lead{color:var(--muted); font-size:16px; max-width:65ch}
.hero__actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:16px}
.hero__badges{display:flex; flex-wrap:wrap; gap:10px; margin-top:18px}
.badge{
  display:inline-flex; align-items:center; gap:10px;
  background:#fff; border:1px solid var(--line);
  padding:10px 12px; border-radius:999px;
  font-weight:800; font-size:12px; color:var(--muted);
}
.badge__dot{width:10px; height:10px; border-radius:99px; background:var(--blue); box-shadow:0 0 0 6px rgba(10,116,218,.12)}
.hero__media img{
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border:1px solid rgba(229,231,235,.7);
}
.hero__card{
  margin-top:12px;
  display:grid;
  gap:12px;
  padding:14px;
  border-radius: var(--radius);
  background:#fff;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}
.small{font-size:12px}
.strong{font-weight:900}

/* Sections */
.section{padding:52px 0}
.section--tint{background:var(--tint); border-top:1px solid var(--line); border-bottom:1px solid var(--line)}
.section__head{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; flex-wrap:wrap}
h2{font-size: clamp(22px, 2.6vw, 34px); margin:0 0 6px; letter-spacing:-.3px}
h3{margin:0 0 8px}
.muted{color:var(--muted)}

/* Cards */
.cards{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}
@media (max-width: 1100px){ .cards{grid-template-columns: repeat(2, 1fr)} }
@media (max-width: 640px){ .cards{grid-template-columns: 1fr} }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover{transform: translateY(-2px); box-shadow: 0 18px 42px rgba(15,23,42,.10)}
.card--media img{height:180px; width:100%; object-fit:cover}
.card__body{padding:16px}
.card__icon{font-size:22px}
.card p{margin:0; color:var(--muted); font-size:13px}

/* Split */
.split{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:18px;
  align-items:start;
}
.split--reverse{grid-template-columns: .95fr 1.05fr}
@media (max-width: 980px){ .split, .split--reverse{grid-template-columns:1fr} }

.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
.panel__cta{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px}

/* Lists */
.list{margin-top:10px; display:grid; gap:12px}
.list__item{padding:12px; border:1px solid var(--line); border-radius:14px; background:#fff}
.list__title{font-weight:900}

/* Hours graphic */
.hours{display:grid; gap:10px; margin-top:10px}
.hours__row{display:grid; grid-template-columns: 44px 1fr auto; gap:10px; align-items:center}
.hours__day{font-weight:900; color:#334155}
.hours__time{font-weight:800; color:#334155; font-size:12px}
.hours__bar{
  position:relative; height:14px;
  background:#eef2ff;
  border:1px solid #e5e7eb;
  border-radius:999px;
  overflow:hidden;
}
.hours__bar .hours__seg{
  position:absolute;
  top:0; bottom:0;
  left: calc(var(--from) * 1%);
  right: calc(100% - (var(--to) * 1%));
  background: linear-gradient(135deg, var(--blue2), var(--blue));
  border-radius:999px;
}
.hours__bar span.is-off{display:none}

/* Page head */
.pagehead{
  padding:32px 0 10px;
  background:linear-gradient(180deg, #f6f9fe, #ffffff);
  border-bottom:1px solid var(--line);
}
.pagehead h1{margin:0 0 6px}

/* People */
.people{display:grid; gap:14px}
.person{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap:14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.person img{width:100%; height:220px; object-fit:cover}
.person__body{padding:16px}
.person__body h2{margin:0 0 2px}
.person__meta{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0 10px}
@media (max-width: 720px){
  .person{grid-template-columns:1fr}
  .person img{height:260px}
}

/* Contact */
.contact{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  align-items:stretch;
}
@media (max-width: 980px){ .contact{grid-template-columns:1fr} }
.contact__card{
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
.contact__line{
  display:flex; justify-content:space-between; gap:14px;
  padding:10px 0;
  border-bottom:1px solid #f1f5f9;
}
.contact__line:last-child{border-bottom:0}
.contact__line span:first-child{color:var(--muted); font-weight:700; font-size:12px}
.contact__line a{font-weight:900; text-decoration:none; color:var(--text)}
.contact__map{
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}
.contact__map iframe{width:100%; height:100%; min-height:420px; border:0}

/* Form fields */
.field{display:block; margin-top:12px}
.field span{display:block; font-weight:800; font-size:12px; color:var(--muted); margin-bottom:6px}
.input{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  font: inherit;
  background:#fff;
}
.input:focus{outline:none; box-shadow:0 0 0 4px rgba(31,182,255,.18); border-color: rgba(31,182,255,.55)}
textarea.input{resize:vertical}

/* Booking */
.booking{margin-top:18px}
.booking__grid{display:grid; grid-template-columns: 1.1fr .9fr; gap:16px; margin-top:12px}
@media (max-width: 980px){ .booking__grid{grid-template-columns:1fr} }

.booking__card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}

.booking__head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px}
.booking__head h2{margin:0; font-size:18px; line-height:1.2}
.booking__badge{
  font-size:12px;
  font-weight:900;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#f8fafc;
  white-space:nowrap;
}

.booking__calendar{border:1px solid var(--line); border-radius:16px; overflow:hidden; background:#fff}
.cal__top{display:flex; align-items:center; justify-content:space-between; padding:10px 12px; background:var(--tint); border-bottom:1px solid var(--line)}
.cal__title{font-weight:900}
.cal__nav{display:flex; gap:8px}
.cal__btn{width:38px; height:34px; border-radius:12px; border:1px solid var(--line); background:#fff; cursor:pointer; font-weight:900}
.cal__btn:hover{background:#f1f5f9}

.cal__grid{display:grid; grid-template-columns:repeat(7, 1fr); gap:0; padding:10px}
.cal__dow{font-size:11px; color:var(--muted); font-weight:900; padding:6px 8px}
.cal__day{padding:8px; min-height:44px; border-radius:12px; border:1px solid transparent; cursor:pointer; display:flex; flex-direction:column; gap:4px; justify-content:flex-start}
.cal__day:hover{background:#f8fafc}
.cal__day.is-out{opacity:.35; cursor:default}
.cal__day.is-disabled{opacity:.45; cursor:default}
.cal__day.is-selected{border-color: rgba(10,116,218,.35); background:#eef6ff}
.cal__pill{width:100%; height:6px; border-radius:999px; background: rgba(31,182,255,.35)}
.cal__pill.is-busy{background: rgba(100,116,139,.35)}

.booking__slots{margin-top:12px; border:1px solid var(--line); border-radius:16px; padding:12px; background:#fff}
.booking__slotGrid{display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:8px; margin-top:10px}
@media (max-width: 560px){ .booking__slotGrid{grid-template-columns: repeat(3, minmax(0, 1fr));} }

.slot{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 8px;
  background:#fff;
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  text-align:center;
}
.slot:hover{background:#f1f5f9}
.slot.is-selected{border-color: rgba(10,116,218,.35); background:#eef6ff}
.slot.is-busy{opacity:.5; cursor:not-allowed}

.booking__summary{margin-top:12px; border:1px dashed var(--line); border-radius:16px; padding:12px; background:#fbfdff}
.booking__form .btn{margin-top:12px; width:100%}

.booking__admin{margin-top:14px; padding-top:14px; border-top:1px solid var(--line)}
.booking__adminHead{display:flex; align-items:center; justify-content:space-between; gap:12px}
.booking__adminHead h3{margin:0}
.booking__adminGrid{display:grid; grid-template-columns: 1fr 1fr; gap:14px; margin-top:12px}
@media (max-width: 980px){ .booking__adminGrid{grid-template-columns:1fr} }

.booking__row{display:flex; gap:10px; flex-wrap:wrap}
.booking__list{margin-top:10px; display:flex; flex-direction:column; gap:10px}
.booking__item{border:1px solid var(--line); border-radius:16px; padding:12px; background:#fff}
.booking__itemTop{display:flex; align-items:flex-start; justify-content:space-between; gap:12px}
.booking__item strong{display:block}
.booking__tag{font-size:11px; font-weight:900; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:#f8fafc; white-space:nowrap}
.booking__tag.is-pending{background:#fff7ed; border-color:#fed7aa}
.booking__tag.is-confirmed{background:#ecfdf5; border-color:#a7f3d0}
.booking__tag.is-declined{background:#fef2f2; border-color:#fecaca}
.booking__itemActions{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.booking__itemActions .btn{padding:8px 10px; border-radius:12px}

/* Prose */
.prose p, .prose li{color:var(--muted)}
.prose h2{margin-top:22px}
.callout{
  margin-top:18px;
  padding:14px;
  border-radius: var(--radius);
  border:1px solid rgba(10,116,218,.25);
  background: rgba(31,182,255,.08);
  display:flex; justify-content:space-between; gap:14px; align-items:center; flex-wrap:wrap;
}
.note{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  background:#fff;
  border:1px dashed #cbd5e1;
  color:var(--muted);
}

/* Tables */
.table{width:100%; border-collapse:collapse; overflow:hidden; border-radius:14px; border:1px solid var(--line)}
.table th, .table td{padding:12px 12px; border-bottom:1px solid #f1f5f9; text-align:left}
.table th{background:#f8fafc; font-weight:900}
.table tr:last-child td{border-bottom:0}

/* Footer */
.footer{
  border-top:1px solid var(--line);
  background:#0b1220;
  color:rgba(255,255,255,.92);
  margin-top:40px;
}
.footer a{color:rgba(255,255,255,.92); text-decoration:none}
.footer a:hover{text-decoration:underline}
.footer__grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap:18px;
  padding:26px 0;
}
.footer__logo{height:34px;}
.footer__links{display:grid; gap:8px}
.footer__small{font-size:12px}
.footer .muted{color:rgba(255,255,255,.70)}
@media (max-width: 980px){
  .footer__grid{grid-template-columns:1fr}
}


.hours-wrap{display:grid; grid-template-columns: 1fr 1fr; gap:14px; align-items:start}
@media (max-width: 980px){.hours-wrap{grid-template-columns:1fr}}

.footer__extra a{color:rgba(255,255,255,.92)}


/* Tabs */
.tabs__head{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
.tabs__title{margin:0}
.tabs__controls{display:flex; gap:8px; flex-wrap:wrap}
.tab{
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  font-weight:900;
  font-size:12px;
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
}
.tab:hover{background:#f1f5f9; color:var(--text)}
.tab.is-active{
  border-color:rgba(10,116,218,.25);
  background:rgba(31,182,255,.10);
  color:var(--text);
}
.tab-panel{display:none}
.tab-panel.is-active{display:block}

/* Make bars the same length (desktop) */
.hours__row{
  grid-template-columns: 44px minmax(520px, 520px) 170px;
}
@media (max-width: 980px){
  .hours__row{grid-template-columns: 44px 1fr auto;}
}

/* Slightly larger rows on the hours page */
.hours--big .hours__row{grid-template-columns: 44px minmax(620px, 620px) 190px;}
@media (max-width: 980px){
  .hours--big .hours__row{grid-template-columns: 44px 1fr auto;}
}

/* Better alignment of the split block on homepage */
.split--hours{align-items:start}


/* Homepage: 50/50 split for Specialists + Hours */
.split.split--hours{grid-template-columns: 1fr 1fr;}
@media (max-width: 980px){.split.split--hours{grid-template-columns:1fr;}}

/* v5: Hours scale and layout tweaks */
/* Default rows: keep panel compact on homepage */
.hours__row{grid-template-columns: 44px 1fr 170px;}
@media (max-width: 980px){
  .hours__row{grid-template-columns: 44px 1fr auto;}
}
/* Homepage compact hours: slightly smaller time column */
.hours--compact .hours__row{grid-template-columns: 44px 1fr 150px;}
@media (max-width: 980px){
  .hours--compact .hours__row{grid-template-columns: 44px 1fr auto;}
}
/* Keep large fixed chart only on Hours page */
.hours--big .hours__row{grid-template-columns: 44px minmax(620px, 620px) 190px;}
@media (max-width: 980px){
  .hours--big .hours__row{grid-template-columns: 44px 1fr auto;}
}

/* v6: ensure homepage hours panel stays compact and not overflowing */
.hours__bar{width:100%}
/* Default rows: no fixed pixel bar area */
.hours__row{grid-template-columns: 44px 1fr 150px;}
@media (max-width: 980px){
  .hours__row{grid-template-columns: 44px 1fr auto;}
}
/* Hours page can be wider */
.hours--big .hours__row{grid-template-columns: 44px minmax(620px, 620px) 190px;}
@media (max-width: 980px){
  .hours--big .hours__row{grid-template-columns: 44px 1fr auto;}
}


/* v7: allow multi-line time labels */
.hours__time{white-space:normal; line-height:1.25}

/* v8: Hours page bars should expand, homepage stays compact */
.hours--big .hours__row{grid-template-columns: 44px 1fr 220px;}
@media (max-width: 980px){
  .hours--big .hours__row{grid-template-columns: 44px 1fr auto;}
}
