/* ============================================================
   AK-med Design System
   Bootstrap 5 + Nunjucks / Eleventy
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:         #0f2b4a;
  --navy-mid:     #1a4372;
  --teal:         #0d9488;
  --teal-light:   #14b8a6;
  --teal-pale:    #f0fdfa;
  --chirurgia:    #5b4ec8;
  --stomatologia: #0284c7;
  --bg:           #f1f5f9;
  --white:        #ffffff;
  --text:         #1e293b;
  --muted:        #64748b;
  --border:       #e2e8f0;
  --shadow-sm:    0 1px 3px rgba(15,43,74,.08), 0 1px 2px rgba(15,43,74,.05);
  --shadow:       0 4px 24px rgba(15,43,74,.10);
  --shadow-lg:    0 8px 40px rgba(15,43,74,.16);
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    20px;
  --ease:         0.25s ease;
  --font:         'Inter', 'Quicksand', system-ui, sans-serif;
  --font-display: 'Quicksand', 'Inter', system-ui, sans-serif;
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
}

body.site-body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
}

/* ── Typography (shared across all pages) ──────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
}

h2 { font-size: 2rem; margin-bottom: .75rem; }

a       { font-family: var(--font); color: var(--teal); }
p       { font-family: var(--font); }
label   { font-family: var(--font); color: var(--navy); }

/* ============================================================
   NAVBAR — Bootstrap 5 version  (index.html, class .site-nav)
   ============================================================ */

.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: .75rem 0;
  z-index: 1030;
}

.site-nav #logo { height: 52px; }

/* Phone pills in the navbar */
.nav-phones { display: flex; gap: 1.25rem; align-items: center; }

.phone-pill {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .3rem .85rem;
  transition: all var(--ease);
  color: inherit;
}
.phone-pill:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  text-decoration: none;
}
.phone-pill i { color: var(--teal); font-size: 1rem; transition: color var(--ease); }
.phone-pill:hover i { color: var(--white); }

.phone-pill div { display: flex; flex-direction: column; line-height: 1.2; }
.phone-pill small {
  font-size: .62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: color var(--ease);
}
.phone-pill strong {
  font-size: .82rem;
  color: var(--navy);
  font-weight: 700;
  transition: color var(--ease);
}
.phone-pill:hover small,
.phone-pill:hover strong { color: var(--white); }

/* Nav links */
.site-nav .navbar-nav .nav-link {
  color: var(--text) !important;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .45rem .7rem !important;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
}
.site-nav .navbar-nav .nav-link:hover {
  color: var(--teal) !important;
  background: rgba(13,148,136,.07);
}

/* Dropdown */
.site-nav .dropdown-menu {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: .4rem;
  min-width: 190px;
}
.site-nav .dropdown-item {
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text);
  padding: .55rem .75rem;
  font-size: .9rem;
  transition: all var(--ease);
}
.site-nav .dropdown-item:hover {
  background: var(--navy);
  color: var(--white);
}

/* ============================================================
   HERO  (index.html)
   ============================================================ */

.hero-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, #0d6f67 100%);
  color: var(--white);
  padding: 5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  right: -5%; top: -15%;
  width: 55%; height: 130%;
  background: radial-gradient(ellipse, rgba(13,148,136,.18) 0%, transparent 65%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.hero-title span { color: #5eead4; }

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,.8);
  max-width: 500px;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

.hero-logo-wrap {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 280px;
}
.hero-logo-img {
  width: 100%;
  filter: brightness(0) invert(1);
  opacity: .88;
}

.hero-phones-mobile { display: flex; flex-direction: column; gap: .5rem; }
.hero-phone-item {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .88rem;
  transition: color var(--ease);
}
.hero-phone-item:hover { color: var(--white); text-decoration: none; }
.hero-phone-item strong { color: var(--white); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-accent {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  border-radius: 50px;
  font-weight: 600;
  padding: .65rem 1.6rem;
  transition: all var(--ease);
  font-family: var(--font);
}
.btn-accent:hover, .btn-accent:focus {
  background: var(--teal-light);
  border-color: var(--teal-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13,148,136,.4);
}

.btn-ghost-white {
  background: transparent;
  border: 2px solid rgba(255,255,255,.45);
  color: var(--white);
  border-radius: 50px;
  font-weight: 600;
  padding: .65rem 1.6rem;
  transition: all var(--ease);
  font-family: var(--font);
}
.btn-ghost-white:hover, .btn-ghost-white:focus {
  background: rgba(255,255,255,.15);
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--navy);
  border-radius: 50px;
  font-weight: 600;
  padding: .65rem 1.6rem;
  transition: all var(--ease);
  font-family: var(--font);
}
.btn-secondary-outline:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-text-link {
  background: transparent;
  border: none;
  color: var(--teal);
  font-weight: 600;
  font-size: .88rem;
  padding: .4rem 0;
  transition: color var(--ease);
  text-align: center;
  font-family: var(--font);
}
.btn-text-link:hover { color: var(--navy); }

/* ============================================================
   SERVICES SECTION  (index.html)
   ============================================================ */

.services-section { background: var(--white); }

.section-title {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: .4rem;
}
.section-sub { color: var(--muted); font-size: 1rem; margin-bottom: 0; }

.service-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--ease);
  height: 100%;
  color: var(--text);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--text);
}
.chirurgia-card:hover    { border-color: var(--chirurgia); }
.stomatologia-card:hover { border-color: var(--stomatologia); }

.service-photo {
  height: 185px;
  background-size: cover;
  background-position: center;
}

.service-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: .75rem;
  margin-top: -2.5rem;
  position: relative;
}
.chirurgia-card    .service-icon-wrap { background: var(--chirurgia);    color: var(--white); box-shadow: 0 4px 12px rgba(91,78,200,.4); }
.stomatologia-card .service-icon-wrap { background: var(--stomatologia); color: var(--white); box-shadow: 0 4px 12px rgba(2,132,199,.4); }

.service-content h3 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: .4rem;
}
.service-content p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.service-cta {
  color: var(--teal);
  font-weight: 600;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
  transition: gap var(--ease);
}
.service-card:hover .service-cta { gap: .7rem; }

/* ============================================================
   TRUST BAR  (index.html)
   ============================================================ */

.trust-bar {
  background: var(--navy);
  padding: 2.5rem 0;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.25rem;
  border-right: 1px solid rgba(255,255,255,.1);
}
.trust-item:last-child { border-right: none; }

@media (max-width: 767px) {
  .trust-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .trust-item:last-child { border-bottom: none; }
}

.trust-num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: #5eead4;
  line-height: 1;
  display: block;
  margin-bottom: .4rem;
}
.trust-num i { font-size: 2.1rem; }
.trust-lbl {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  text-align: center;
  letter-spacing: .02em;
}

/* ============================================================
   CONTACT SECTION  (index.html)
   ============================================================ */

.contact-section { background: var(--bg); }

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
@media (max-width: 767px) { .contact-card { padding: 1.5rem; } }

.contact-card h2 { font-family: var(--font-display); color: var(--navy); font-weight: 700; font-size: 1.8rem; margin-bottom: .5rem; }
.contact-card p  { color: var(--muted); margin-bottom: .4rem; }

.contact-address { color: var(--navy) !important; font-weight: 500; font-size: .98rem; }
.contact-address i { color: var(--teal); margin-right: .35rem; }

/* ============================================================
   FOOTER  (index.html)
   ============================================================ */

.site-footer { flex-shrink: 0; background: #0a1929; padding: 2rem 0; }

.footer-logo {
  height: 38px;
  filter: brightness(0) invert(1);
  opacity: .75;
}
.footer-copy  { color: rgba(255,255,255,.45); font-size: .8rem; margin-bottom: 0; }
.footer-link  { color: rgba(255,255,255,.35); text-decoration: none; font-size: .8rem; transition: color var(--ease); }
.footer-link:hover { color: rgba(255,255,255,.8); }

/* ============================================================
   INNER PAGES — shared header + content layout
   ============================================================ */

.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 2.5rem 0 2rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 40%; height: 100%;
  background: radial-gradient(ellipse at right center, rgba(13,148,136,.18) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-eyebrow {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: .4rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0;
}
.page-hero-accent {
  display: inline-block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  margin-top: .75rem;
}

.page-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 2.5rem;
  margin: 2rem 0;
}
@media (max-width: 767px) { .page-content { padding: 1.5rem; } }

/* Sticky side table-of-contents (e.g. stomatologia page) */
.stom-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}
.stom-content { flex: 1; min-width: 0; }

.stom-toc {
  flex: 0 0 230px;
  position: sticky;
  top: 6.5rem;
}
.stom-toc-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1rem;
  margin: 2rem 0;
}
.stom-toc-label {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .75rem .75rem;
}
.stom-toc-inner .nav-link {
  display: block;
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--ease);
}
.stom-toc-inner .nav-link:hover {
  color: var(--stomatologia);
  background: var(--bg);
}
.stom-toc-inner .nav-link.active {
  color: var(--stomatologia);
  background: var(--teal-pale);
  border-left-color: var(--stomatologia);
}

#oferta, #nasze-prace, #zespol, #gabinet {
  scroll-margin-top: 5.5rem;
}

/* Doctor cards */
.doctor-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.doctor-card i { color: var(--teal); font-size: 1.1rem; flex-shrink: 0; }
.doctor-card span { font-weight: 600; color: var(--navy); font-size: .95rem; }

/* Service list */
.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .95rem;
  color: var(--text);
}
.service-list li:last-child { border-bottom: none; }
.service-list li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: .55rem;
  flex-shrink: 0;
}
.service-list li ul {
  list-style: none;
  padding: 0;
  margin: .4rem 0 0;
}
.service-list li ul li::before { background: var(--muted); }

/* Section divider heading */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1.25rem;
}
.section-divider h2 {
  font-size: 1.35rem;
  margin: 0;
  white-space: nowrap;
}
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Bootstrap 5 tabs (inner pages) */
.nav-tabs { border-bottom: 2px solid var(--border); gap: .25rem; }
.nav-tabs .nav-link {
  color: var(--text);
  font-weight: 600;
  font-size: .85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: .6rem 1rem;
  transition: all var(--ease);
}
.nav-tabs .nav-link:hover:not(.active) {
  background: var(--bg);
  color: var(--navy);
  border-color: var(--border) var(--border) transparent;
}
.nav-tabs .nav-link.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.tab-content { padding-top: 1.5rem; }

/* Bootstrap 5 accordion (inner pages) */
.accordion-item {
  border-color: var(--border);
  margin-bottom: .4rem;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}
.accordion-button {
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
  background: var(--bg);
}
.accordion-button:not(.collapsed) {
  background: var(--navy);
  color: var(--white);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: none; }
.accordion-button::after { filter: none; }
.accordion-button:not(.collapsed)::after { filter: invert(1) brightness(2); }
.accordion-body { font-size: .93rem; color: var(--text); line-height: 1.7; }
.accordion-body ul { padding-left: 1.25rem; }

/* Certificate grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}
.cert-grid a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all var(--ease);
}
.cert-grid a:hover { border-color: var(--navy); transform: scale(1.03); }
.cert-grid img { width: 100%; display: block; aspect-ratio: 3/4; object-fit: cover; }

/* Room photo grid */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.room-grid a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all var(--ease); }
.room-grid a:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.room-grid img { width: 100%; display: block; height: 160px; object-fit: cover; }

/* Cennik tables */
.price-section { margin-bottom: 2rem; }
.price-section h4 {
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--stomatologia);
  margin-top: 2rem;
  margin-bottom: .5rem;
  margin-left: .75rem;
  margin-right: .75rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--stomatologia);
}
.price-note {
  font-size: .85rem;
  color: var(--text);
  background: var(--teal-pale);
  border-left: 3px solid var(--teal);
  padding: .5rem .75rem;
  border-radius: 0 .375rem .375rem 0;
  margin-bottom: .75rem;
}
.price-section h3 {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.price-table { width: 100%; border-collapse: collapse; }
.price-table tr { border-bottom: 1px solid var(--border); }
.price-table tr:last-child { border-bottom: none; }
.price-table td {
  padding: .65rem .75rem;
  font-size: .92rem;
  color: var(--text);
}
.price-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  width: 1%;
}
.price-table tr:hover td { background: var(--bg); }

@media (max-width: 575px) {
  .price-table tr { display: block; padding: .5rem 0; }
  .price-table tr:last-child { border-bottom: none; }
  .price-table td {
    display: block;
    padding: .15rem .5rem;
    font-size: .88rem;
    white-space: normal;
    width: 100% !important;
  }
  .price-table td:first-child {
    padding-top: .4rem;
    color: var(--text);
  }
  .price-table td:last-child {
    text-align: left;
    padding-bottom: .4rem;
    color: var(--teal);
    font-size: .82rem;
  }
  .price-table tr:hover td { background: transparent; }
}

/* Before/after comparison sliders ("Nasze prace") */
.our-work-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 720px;
  margin: 0 auto;
}
.our-work-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}
@media (max-width: 767px) {
  .our-work-item { padding: .85rem; }
}

/* Before/after comparison row (table-style, "Nasze prace") */
.ba-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.ba-cell {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.ba-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--ease);
}
.ba-cell:hover img { transform: scale(1.04); }
.ba-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 480px) {
  .ba-row { gap: .5rem; }
  .ba-cell { aspect-ratio: 1 / 1; }
  .ba-row-3 { grid-template-columns: 1fr; }
}

.ba-tag {
  position: absolute;
  top: .6rem;
  z-index: 1;
  padding: .25rem .7rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 43, 74, .65);
  color: var(--white);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  pointer-events: none;
}
.ba-tag-before { left: .6rem; }
.ba-tag-after { right: .6rem; }
.ba-tag-progress {
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
@media (max-width: 767px) {
  .ba-tag { font-size: .7rem; padding: .2rem .55rem; }
}

.our-work-text {
  font-size: .93rem;
  color: var(--text);
  line-height: 1.7;
  margin-top: 1rem;
}

.our-work-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.our-work-extra a {
  display: block;
  flex-shrink: 0;
  width: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.our-work-extra img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.our-work-extra span {
  font-size: .85rem;
  color: var(--muted);
}

