:root {
  --ink: #111317;
  --muted: #5f6875;
  --line: #d9dde4;
  --paper: #f7f8fa;
  --white: #ffffff;
  --yellow: #ffcc00;
  --yellow-dark: #c69200;
  --green: #14765a;
  --blue: #1e5b8f;
  --dark: #1f2329;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(12, 16, 22, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

[id] {
  scroll-margin-top: 136px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(17, 19, 23, 0.94);
  color: var(--white);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.brand img {
  width: 128px;
  height: auto;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.6vw, 34px);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
}

.main-nav a,
.call-link {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.call-link:hover {
  color: var(--yellow);
}

.call-link {
  padding: 10px 14px;
  border: 1px solid rgba(255, 204, 0, 0.45);
  border-radius: var(--radius);
  color: var(--yellow);
  font-weight: 800;
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100svh - 72px));
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 7, 9, 0.9) 0%, rgba(5, 7, 9, 0.68) 45%, rgba(5, 7, 9, 0.18) 100%),
    url("../images/diagnostyka.jpg") center / cover no-repeat;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 42%;
  content: "";
  background: linear-gradient(0deg, rgba(17, 19, 23, 0.98), rgba(17, 19, 23, 0));
}

.hero-content {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 150px 0 38px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(4.5rem, 12vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 10px 0 8px;
  font-size: 1.28rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--yellow);
  color: #141414;
}

.button.primary:hover {
  background: #ffd93d;
}

.button.secondary {
  border-color: currentColor;
  color: inherit;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 54px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
}

.hero-facts div {
  padding: 20px;
  background: rgba(17, 19, 23, 0.7);
}

.hero-facts dt {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 5px 0 0;
  color: var(--white);
  font-weight: 750;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--yellow);
  color: #161616;
}

.service-strip a {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-right: 1px solid rgba(0, 0, 0, 0.18);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.section,
.split-section,
.contact-section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: end;
}

.intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 0;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 32px rgba(20, 25, 33, 0.06);
}

.service-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -8px 0 18px;
  border-radius: calc(var(--radius) - 2px);
}

.service-card p,
.proof-grid p,
.split-copy p,
.feature-panel li,
.showcase-copy p,
.showcase-grid figcaption,
.check-list {
  color: var(--muted);
}

.image-card {
  display: grid;
  grid-column: span 2;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

.image-card div {
  padding: 28px;
}

.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 204, 0, 0.2);
  color: var(--yellow-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.check-list li {
  position: relative;
  padding-left: 22px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  content: "";
}

.text-link {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.card-link {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
}

.card-link:hover {
  border-color: var(--yellow);
  background: var(--yellow);
}

.mini-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
}

.mini-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
}

.lpg-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
  padding-top: 0;
}

.showcase-copy {
  position: sticky;
  top: 138px;
}

.showcase-grid {
  display: grid;
  gap: 16px;
}

.showcase-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 32px rgba(20, 25, 33, 0.06);
}

.showcase-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.showcase-grid figcaption {
  padding: 16px 18px 18px;
  font-weight: 750;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 440px);
  gap: 18px;
  align-items: stretch;
  padding: clamp(44px, 7vw, 80px) 0;
}

.split-copy {
  padding: clamp(30px, 5vw, 54px);
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--white);
}

.split-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.75);
}

.feature-panel {
  display: flex;
  align-items: center;
  padding: clamp(28px, 4vw, 42px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 118, 90, 0.13), rgba(30, 91, 143, 0.16));
  border: 1px solid var(--line);
}

.feature-panel ul {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-panel li {
  position: relative;
  padding-left: 26px;
  font-weight: 750;
}

.feature-panel li::before {
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.proof {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
}

.proof-grid {
  display: grid;
  gap: 12px;
}

.proof-grid article {
  padding: 18px;
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  background: var(--white);
}

.proof-grid strong {
  display: block;
  font-size: 1.05rem;
}

.proof-grid p {
  margin: 6px 0 0;
}

.contact-section {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 430px;
  margin-bottom: 70px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact-card {
  padding: clamp(28px, 5vw, 46px);
}

.contact-card address {
  margin-top: 18px;
  color: var(--muted);
  font-style: normal;
}

.contact-card p {
  color: var(--muted);
  font-weight: 750;
}

.contact-section iframe {
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 4vw, 56px);
  background: #08090b;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 94px) 0;
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.7rem, 7vw, 6.5rem);
  line-height: 0.95;
}

.detail-hero .hero-lead {
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 28px;
  padding-top: 0;
}

.detail-panel,
.empty-gallery,
.login-card,
.upload-card,
.category-list a,
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.detail-panel {
  padding: 28px;
}

.gallery-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.gallery-heading h2 {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-section .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 230px));
  justify-content: start;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(20, 25, 33, 0.08);
}

.gallery-section .gallery-item {
  max-width: 230px;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-section .gallery-item img {
  height: 155px;
  aspect-ratio: auto;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.empty-gallery {
  padding: 24px;
  color: var(--muted);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-grid a {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.related-grid span {
  color: var(--yellow-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-page code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eceff3;
}

.admin-panel > p {
  color: var(--muted);
}

.notice {
  margin: 16px 0;
  padding: 14px 16px;
  font-weight: 750;
}

.notice.success {
  border-color: rgba(20, 118, 90, 0.3);
  background: rgba(20, 118, 90, 0.08);
}

.notice.error {
  border-color: rgba(176, 42, 42, 0.3);
  background: rgba(176, 42, 42, 0.08);
}

.login-grid,
.uploader-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.login-card,
.upload-card {
  padding: 24px;
}

.login-card label,
.upload-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.login-card input,
.upload-card input[type="tel"],
.upload-card input[type="text"],
.login-card input[type="tel"],
.login-card input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-list a {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.category-list a.active {
  border-color: var(--yellow);
  box-shadow: inset 4px 0 0 var(--yellow);
}

.category-list span,
.category-list small {
  color: var(--muted);
}

.drop-zone {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 190px;
  padding: 22px;
  border: 2px dashed #aeb6c2;
  border-radius: var(--radius);
  background: #f9fafb;
  text-align: center;
  cursor: pointer;
}

.drop-zone.dragging {
  border-color: var(--yellow-dark);
  background: rgba(255, 204, 0, 0.16);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.drop-zone span {
  font-size: 1.1rem;
  font-weight: 900;
}

.drop-zone small,
.file-list {
  color: var(--muted);
}

.file-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.file-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #f0f2f5;
}

.admin-gallery-preview {
  margin-top: 30px;
}

.photo-upload-page {
  min-height: 100vh;
  padding: 120px var(--page-pad) 70px;
  background: #f3f5f8;
}

.photo-upload-hero,
.photo-auth-panel,
.photo-uploader-panel,
.photo-upload-notice {
  width: min(980px, 100%);
  margin-inline: auto;
}

.photo-upload-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.photo-upload-hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 0.96;
}

.photo-upload-hero p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
}

.photo-auth-panel,
.photo-uploader-panel,
.photo-upload-notice {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.photo-upload-notice {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-left: 5px solid var(--yellow);
  font-weight: 800;
}

.photo-auth-form,
.photo-upload-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.photo-auth-form h2 {
  margin: 0 0 4px;
}

.photo-auth-form label,
.photo-upload-form label:not(.carline-drop-zone) {
  font-weight: 900;
}

.photo-auth-form input,
.photo-upload-form select {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
}

.carline-drop-zone {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 230px;
  padding: 26px;
  border: 2px dashed #aeb6c2;
  border-radius: var(--radius);
  background: #f9fafb;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.carline-drop-zone.dragging {
  border-color: var(--yellow-dark);
  background: rgba(255, 204, 0, 0.16);
}

.carline-drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.carline-drop-zone span {
  font-size: 1.15rem;
  font-weight: 900;
}

.carline-drop-zone small,
.carline-file-list {
  color: var(--muted);
}

.carline-file-list {
  display: grid;
  gap: 8px;
}

.carline-file-list div {
  padding: 9px 11px;
  border-radius: var(--radius);
  background: #f0f2f5;
  color: var(--ink);
  font-weight: 700;
  word-break: break-word;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-facts,
  .intro,
  .proof,
  .contact-section,
  .detail-hero,
  .detail-layout,
  .login-grid,
  .uploader-layout,
  .lpg-showcase,
  .split-section {
    grid-template-columns: 1fr;
  }

  .showcase-copy {
    position: static;
  }

  .service-strip,
  .offer-grid,
  .gallery-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-card {
    grid-column: span 2;
  }

  .contact-section iframe {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  .site-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .brand img {
    width: 92px;
  }

  .call-link {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .main-nav {
    gap: 18px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 610px;
  }

  .hero-content {
    padding-top: 62px;
    padding-bottom: 26px;
  }

  .hero-lead {
    margin-top: 16px;
  }

  .hero-facts {
    margin-top: 28px;
  }

  .hero-facts div {
    padding: 16px;
  }

  .hero-facts,
  .service-strip,
  .offer-grid,
  .gallery-grid,
  .related-grid,
  .image-card {
    grid-template-columns: 1fr;
  }

  .gallery-section .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-section .gallery-item {
    max-width: none;
  }

  .gallery-section .gallery-item img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .image-card {
    grid-column: span 1;
  }

  .image-card img {
    min-height: 220px;
  }

  .service-card {
    min-height: auto;
    padding: 22px;
  }

  .service-strip a {
    min-height: 58px;
  }

  .button {
    width: 100%;
  }

  .photo-upload-page {
    padding-top: 104px;
  }

  .photo-upload-hero {
    display: grid;
  }
}
