/* CSS VERSION: 2025-11-30_1_clean */

:root {
  --blue: #004c97;
  --blue-light: #5da9e9;
  --yellow: #ffd400;
  --text: #ffffff;
  --muted: #dbeafe;
}

/* RESET / BAZA */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background-color: #020617;
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

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

button,
input,
textarea {
  font-family: inherit;
}

/* LAYOUT OGÓLNY */

body {
  background: radial-gradient(circle at top, #0b2250, #020617);
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* SEKCJE */

.section {
  padding: 56px 0;
}

.section--dark {
  background: #071635;
}

.section--alt {
  background: radial-gradient(circle at top, #0b2250, #020617);
}

.section__title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 28px;
  color: #fff;
}

.section__title--accent {
  color: var(--yellow);
}

/* HERO */

.hero {
  background: linear-gradient(to bottom, #004c97, #020f2e);
  color: #fff;
  padding: 24px 0 40px;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__logo {
  width: min(360px, 42vw);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
}

.hero__logo:hover {
  transform: scale(1.04);
}

.hero__text {
  max-width: 640px;
  text-align: center;
}

.hero__text h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  margin: 0 0 16px;
}

.nowrap {
  white-space: nowrap;
}

.hero__text p {
  margin: 0 0 24px;
  line-height: 1.5;
  color: var(--muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* PRZYCISKI */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn--primary {
  background: var(--yellow);
  color: #111827;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: var(--yellow);
}

.btn--ghost:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* INTRO NA INDEXIE */

.intro {
  text-align: center;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
}

.intro p {
  margin: 0 0 10px;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* KAFELKI USŁUG – INDEX */

.services {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 720px) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .services {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.service {
  border-radius: 18px;
  overflow: hidden;
  background: #0e2a53;
  position: relative;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.7);
}

.service__link {
  display: block;
  color: inherit;
}

/* Tło kafelka */

.service__image {
  height: 220px;
  background-size: cover;
  background-position: center;
  opacity: 1;
  filter: none;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.service__image--hydro {
  background-image: url("/assets/images/realizacje/hydro.webp");
}

.service__image--gas {
  background-image: url("/assets/images/realizacje/gazy.webp");
}

.service__image--elec {
  background-image: url("/assets/images/realizacje/elektryk.webp");
}

.service__image--ac {
  background-image: url("/assets/images/realizacje/klima.webp");
}

/* Napis na środku kafelka */

.service__badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.2;
  font-size: 14px;
  color: #ffffff;
  backdrop-filter: blur(2px);
  z-index: 2;
}

.service__desc {
  margin: 12px 16px 18px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.service__link:hover .service__image {
  transform: scale(1.02);
}

/* DLACZEGO WARTO – INDEX */

.why {
  max-width: 900px;
}

.why__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 700px) {
  .why__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.why__item {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.why__item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.why__item p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* STRONY USŁUG (HYDRO/GAZ/ELEK/KLIMA) */

.service-page {
  max-width: 980px;
}

.service-page__grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 860px) {
  .service-page__grid {
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.2fr);
    align-items: flex-start;
  }
}

.service-page__text p {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.service-page__text h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 18px;
}

.service-page__list {
  margin: 0;
  padding-left: 10px;
  color: var(--muted);
  font-size: 15px;
}

.service-page__list li {
  margin-bottom: 14px;
  line-height: 1.5;
}

.service-page__list strong {
  color: #ffffff;
}

.service-page__closing {
  margin-top: 16px;
  color: var(--muted);
}

.service-page__aside {
  display: grid;
  gap: 16px;
}

.service-page__box {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 14px;
  color: var(--muted);
}

.service-page__box h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #fff;
  font-size: 16px;
}

.service-page__box ul {
  margin: 0;
  padding-left: 18px;
}

.service-page__box ul li {
  margin-bottom: 14px;
}

/* GALERIA – FLEX (WSPÓLNA DLA WSZYSTKICH PODSTRON) */

/* GALERIA – GRID (WSPÓLNA DLA WSZYSTKICH PODSTRON) */

/* Kontener dla całej galerii (opcjonalnie, jeśli używasz .gallery w HTML) */
.gallery {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* Tekst wprowadzający nad galerią */
.gallery__intro {
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Siatka miniaturek */
.gallery-grid {
  display: grid;
  gap: 12px;
}

/* Małe telefony – 2 w rzędzie (większe miniatury) */
@media (max-width: 479px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Większe telefony – 3 w rzędzie */
@media (min-width: 480px) and (max-width: 699px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ŚREDNIE EKRANY – 3 w rzędzie */
@media (min-width: 700px) and (max-width: 1099px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* DUŻE EKRANY (w tym 1920px) – 5 w rzędzie */
@media (min-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Pojedynczy kafelek */
.gallery-item {
  padding: 0;
}

/* Obrazek – wypełnia kafelek */
.gallery-item img,
.gallery-item > a > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}


/* KONTAKT + STOPKA */

.contact {
  max-width: 980px;
}

.contact__grid {
  display: grid;
  gap: 24px;
  align-items: flex-start;
}

@media (min-width: 860px) {
  .contact__grid {
    grid-template-columns: 1.4fr 1.2fr;
  }
}

.contact p {
  margin: 0 0 8px;
  color: var(--muted);
}

/* Linki w kontakcie – zawsze białe */
.contact a,
.contact a:link,
.contact a:visited,
.contact a:active,
.contact a:hover {
  color: #ffffff;
}

.contact a:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Formularz kontaktowy */

.contact__form {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 9px 11px;
  margin-bottom: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 14px;
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: #9ca3af;
}

.contact__form button {
  width: 100%;
}

/* Facebook / social */

.contact__facebook {
  margin-top: 10px;
}

.contact__facebook a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.fb-icon {
  background: #1877f2;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* STOPKA */

.footer__copy {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}

/* STICKY CTA NA MOBILE */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--yellow);
  color: #111827;
  text-align: center;
  padding: 10px 16px;
  font-weight: 700;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.5);
  z-index: 60;
  display: none;
}

@media (max-width: 720px) {
  .sticky-cta {
    display: block;
  }
}

/* LIGHTBOX GALERII */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.lightbox[aria-hidden="false"] {
  display: block;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.lightbox__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
}

.lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

@media (max-width: 600px) {
  .lightbox__close {
    top: 4px;
    right: 4px;
  }
}

/* HERO MOBILE FIX – CZCIONKA + NOWRAP */

@media (max-width: 600px) {
  .hero__text h1 {
    font-size: 26px;
    line-height: 1.2;
  }

  .nowrap {
    white-space: normal; /* pozwól łamać tekst */
  }
}

/* Odstępy między punktami w "Dlaczego Alfa-Hydro" */
.why__list li {
  margin-bottom: 8px;
  font-size: 15px;
}


/* LICZNIK ODWIEDZIN – STOPKA */

.footer__bottom {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.footer__copy {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
}

.visitor-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #e5e7eb;
}

.visitor-counter__label {
  opacity: 0.8;
}

.visitor-counter__value {
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 14px;
  min-width: 64px;
  text-align: center;
}
