/* Totalgeo – odświeżenie wyglądu i responsywności.
   Tylko CSS: nie zmienia treści, kolejności sekcji ani znaczników (nagłówki, linki, alt zostają). */
:root {
  --tg-blue: #00a7d1;
  --tg-blue-d: #0086a8;
  --tg-ink: #14202b;
  --tg-text: #4a5561;
  --tg-soft: #f3f7fa;
  --tg-line: #e3eaf0;
  --tg-radius: 16px;
  --tg-shadow: 0 10px 30px rgb(20 32 43 / 8%), 0 2px 6px rgb(20 32 43 / 5%);
}

html { scroll-behavior: smooth; }
body { color: var(--tg-text); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { transition: color .2s, background-color .2s, box-shadow .2s, transform .2s; }
:focus-visible { outline: 3px solid var(--tg-blue); outline-offset: 3px; }

/* ---------- Menu ---------- */
.navbar-custom { background: rgb(255 255 255 / 96%) !important; box-shadow: 0 1px 0 var(--tg-line), 0 6px 20px rgb(20 32 43 / 5%); padding-top: 10px; padding-bottom: 10px; z-index: 1000; backdrop-filter: saturate(1.4) blur(8px); }
@media (min-width: 992px) {
  .navbar-custom { position: sticky; top: 0; }
  .admin-bar .navbar-custom { top: 32px; }
}
.navbar-custom .navbar-brand img { max-height: 58px; width: auto; }
.navbar-custom .nav > li > a { font-weight: 600; color: var(--tg-ink); border-radius: 999px; padding: 9px 18px !important; letter-spacing: .2px; }
.navbar-custom .nav > li > a:hover,
.navbar-custom .nav > li.current-menu-item > a { color: var(--tg-blue) !important; background: rgb(0 167 209 / 9%); }
.navbar-custom .navbar-toggler { border: 1px solid var(--tg-line); border-radius: 12px; padding: 8px 12px; }
.navbar-custom .navbar-toggler:focus { box-shadow: 0 0 0 3px rgb(0 167 209 / 25%); }

/* ---------- Baner ---------- */
#slider-carousel .item { background-position: center; }
#slider-carousel .item::before { background: linear-gradient(100deg, rgb(8 18 28 / 82%) 0%, rgb(8 18 28 / 60%) 45%, rgb(8 18 28 / 30%) 100%) !important; }
#slider-carousel .slider-caption h5 { letter-spacing: 3px; font-weight: 700; color: #8fe3f7; }
#slider-carousel .slider-caption h1 { font-weight: 800; letter-spacing: -.5px; line-height: 1.08; text-shadow: 0 2px 24px rgb(0 0 0 / 35%); }
#slider-carousel .slider-caption p { color: rgb(255 255 255 / 88%); line-height: 1.6; }
.slide-btn-sm { box-shadow: 0 10px 24px rgb(0 167 209 / 35%); font-weight: 700; letter-spacing: .3px; }
.slide-btn-sm:hover { background: var(--tg-blue-d) !important; transform: translateY(-2px); box-shadow: 0 14px 28px rgb(0 167 209 / 45%); }

/* ---------- Nagłówki sekcji ---------- */
.section-header { margin-left: 0; margin-right: 0; max-width: 100%; }
.section-header .widget-title { color: var(--tg-ink); font-weight: 700; letter-spacing: -.3px; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; }
.section-header hr.divider { width: 64px; height: 4px; border: 0; border-radius: 4px; opacity: 1; background: linear-gradient(90deg, var(--tg-blue), #4fd1ef); margin: 18px auto 0; }

/* ---------- Obsługa prac (karty) ---------- */
section.service { background: linear-gradient(180deg, #fff 0, var(--tg-soft) 220px, var(--tg-soft) 100%); }
#service_content_section .row > [class*="col-"] { display: flex; margin-bottom: 28px; }
#service_content_section article.post { width: 100%; background: #fff; border: 1px solid var(--tg-line); border-radius: var(--tg-radius); box-shadow: var(--tg-shadow); padding: 34px 28px 26px; transition: transform .25s, box-shadow .25s; margin: 0; }
#service_content_section article.post:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgb(20 32 43 / 12%); }
#service_content_section .post-thumbnail { margin-bottom: 18px; }
#service_content_section .post-thumbnail i { width: 76px; height: 76px; line-height: 76px; border-radius: 22px; font-size: 34px !important; background: rgb(0 167 209 / 10%); color: var(--tg-blue); display: inline-block; text-align: center; }
#service_content_section .entry-title { color: var(--tg-ink); font-weight: 700; font-size: 21px; line-height: 1.3; }
#service_content_section .entry-content p { color: var(--tg-text); font-size: 15.5px; line-height: 1.7; }

/* ---------- Referencje ---------- */
#section-portfolio { background: #fff; }
#section-portfolio > .container-fluid { padding-left: 16px; padding-right: 16px; max-width: 1500px; margin: 0 auto; }
#section-portfolio .row { margin-left: 0; margin-right: 0; }
#section-portfolio .p-left-right-0 > .col { padding: 9px; }
#section-portfolio article.post { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--tg-line); box-shadow: var(--tg-shadow); background: #fff; }
#section-portfolio article.post img { display: block; width: 100%; transition: transform .4s; }
#section-portfolio article.post:hover img { transform: scale(1.03); }
#section-portfolio .fa-search { max-width: 100%; }
#section-portfolio article.post > a { overflow: hidden; }

/* ---------- Referencje: slajder (wtyczka totalgeo-referencje) ---------- */
.tg-ref .tg-slider { position: relative; max-width: 1500px; margin: 0 auto; padding: 0 56px; }
.tg-ref .tg-tor { list-style: none; margin: 0; padding: 8px 4px 22px; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #c9d6df transparent; outline: none; }
.tg-ref .tg-tor::-webkit-scrollbar { height: 6px; }
.tg-ref .tg-tor::-webkit-scrollbar-thumb { background: #c9d6df; border-radius: 6px; }
.tg-ref .tg-slajd { flex: 0 0 calc((100% - 4 * 18px) / 5); scroll-snap-align: start; display: flex; }
.tg-ref .tg-slajd article.post { width: 100%; margin: 0; display: flex; flex-direction: column; }
.tg-ref .tg-skan { position: relative; display: block; aspect-ratio: 1 / 1.414; overflow: hidden; background: var(--tg-soft); }
.tg-ref .tg-skan img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tg-ref .tg-lupa { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(8 18 28 / 0%); color: #fff; font-size: 26px; opacity: 0; transition: opacity .25s, background .25s; }
.tg-ref .tg-skan:hover .tg-lupa, .tg-ref .tg-skan:focus-visible .tg-lupa { opacity: 1; background: rgb(8 18 28 / 45%); }
.tg-ref .tg-opis { padding: 16px 18px 18px; border-top: 1px solid var(--tg-line); flex: 1; }
.tg-ref .tg-opis .entry-title { font-size: 16px; line-height: 1.35; font-weight: 700; color: var(--tg-ink); margin: 0 0 6px; }
.tg-ref .tg-opis p { font-size: 14px; line-height: 1.55; color: var(--tg-text); margin: 0; }
.tg-ref .tg-strzalka { position: absolute; top: calc(50% - 50px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--tg-line); background: #fff; color: var(--tg-ink); font-size: 30px; line-height: 1; display: grid; place-items: center; box-shadow: var(--tg-shadow); cursor: pointer; z-index: 2; padding: 0 0 4px; }
.tg-ref .tg-strzalka[hidden] { display: none; }
.tg-ref .tg-strzalka:hover:not(:disabled) { background: var(--tg-blue); color: #fff; border-color: var(--tg-blue); }
.tg-ref .tg-strzalka:disabled { opacity: .35; cursor: default; }
.tg-ref .tg-wstecz { left: 4px; } .tg-ref .tg-dalej { right: 4px; }

.tg-zaufali { max-width: 1200px; margin: 46px auto 0; padding: 0 16px; text-align: center; }
.tg-zaufali-tytul { font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: var(--tg-ink); margin: 0 0 26px; letter-spacing: -.2px; }
.tg-loga { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px 44px; }
.tg-loga li { display: flex; align-items: center; height: 64px; }
.tg-loga img { max-height: 64px; max-width: 170px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .25s, opacity .25s; }
.tg-loga img:hover { filter: none; opacity: 1; }

@media (max-width: 1199.98px) { .tg-ref .tg-slajd { flex-basis: calc((100% - 2 * 18px) / 3); } }
@media (max-width: 767.98px) {
  .tg-ref .tg-slider { padding: 0; }
  .tg-ref .tg-tor { padding-left: 16px; padding-right: 16px; scroll-padding-left: 16px; gap: 14px; }
  .tg-ref .tg-slajd { flex-basis: 78%; }
  .tg-ref .tg-strzalka { display: none !important; }
  .tg-loga { gap: 18px 28px; }
  .tg-loga li { height: 48px; }
  .tg-loga img { max-height: 48px; max-width: 130px; }
}

/* ---------- O firmie (tło ze zdjęciem) ---------- */
section.testimonial { position: relative; background-size: cover; background-position: center; isolation: isolate; }
section.testimonial::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(8 18 28 / 18%) 0%, rgb(8 18 28 / 22%) 55%, rgb(8 18 28 / 58%) 100%); z-index: -1; }
section.testimonial .testmonial-block { text-shadow: 0 2px 12px rgb(0 0 0 / 65%), 0 1px 3px rgb(0 0 0 / 60%); }
section.testimonial .section-header { max-width: 900px; margin: 0 auto; background: rgb(255 255 255 / 94%); border-radius: 20px; padding: clamp(24px, 4vw, 48px); box-shadow: 0 20px 50px rgb(0 0 0 / 25%); }
section.testimonial .section-header .widget-title { font-size: clamp(17px, 1.9vw, 21px) !important; font-weight: 400; line-height: 1.75 !important; letter-spacing: 0; color: var(--tg-ink); text-align: left; }
section.testimonial .section-header hr.divider { margin-left: 0; }
section.testimonial .testmonial-block .title { color: #fff !important; font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; line-height: 1.5; font-style: italic; }
section.testimonial .testmonial-block .avatar img { border: 3px solid #fff; box-shadow: 0 8px 20px rgb(0 0 0 / 30%); }
section.testimonial .testmonial-block .name { color: #fff !important; font-weight: 700; font-style: normal; }
section.testimonial .testmonial-block .designation { color: #8fe3f7 !important; }

/* ---------- Podstrony (Kontakt, Realizacje) ---------- */
.page-title-section { background: linear-gradient(180deg, var(--tg-soft), #fff) !important; }
.page-title-section .page-title h1 { color: var(--tg-ink); font-weight: 800; letter-spacing: -.5px; font-size: clamp(30px, 5vw, 46px); }
.page-breadcrumb a { color: var(--tg-blue); }
.site-content .news article.post { border-radius: var(--tg-radius); border: 1px solid var(--tg-line); box-shadow: var(--tg-shadow); }
.site-content .post-content h1, .site-content .post-content h2, .site-content .post-content h3 { color: var(--tg-ink); font-weight: 700; letter-spacing: -.3px; }
.site-content .post-content a { color: var(--tg-blue-d); text-underline-offset: 3px; }
.wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--tg-line); }
.wp-block-table table { border-collapse: collapse; width: 100%; margin: 0; font-size: 15px; }
.wp-block-table th, .wp-block-table td { border: 0 !important; border-bottom: 1px solid var(--tg-line) !important; padding: 12px 14px; vertical-align: top; line-height: 1.55; }
.wp-block-table thead th, .wp-block-table tr:first-child th { background: var(--tg-soft); color: var(--tg-ink); font-weight: 700; }
.wp-block-table tbody tr:nth-child(even) td { background: #fafcfd; }
.wp-block-table tbody tr:hover td { background: rgb(0 167 209 / 5%); }

/* ---------- Stopka i przycisk do góry ---------- */
.site-footer { background: #0f1a23 !important; }
.site-footer .site-info { color: rgb(255 255 255 / 62%); line-height: 1.6; }
.site-footer a { color: #8fe3f7; }
.scroll-up { box-shadow: 0 8px 20px rgb(0 167 209 / 35%); }

/* ---------- Telefony ---------- */
@media (max-width: 991.98px) {
  .navbar-custom > .container-fluid { padding-left: 16px; padding-right: 16px; }
  .navbar-custom .navbar-header { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .navbar-custom .navbar-brand { margin: 0; width: auto; padding: 0; }
  .navbar-custom .navbar-brand img { margin: 0 !important; max-height: 46px; }
  .navbar-custom .navbar-toggler { margin: 0 !important; }
  .navbar-custom .navbar-collapse { margin-top: 10px; border-top: 1px solid var(--tg-line); padding-top: 8px; }
  .navbar-custom .navbar-nav { background: transparent !important; padding: 4px 0; }
  .navbar-custom .nav > li { border: 0 !important; }
  .navbar-custom .nav > li > a { display: block; padding: 12px 16px !important; border: 0 !important; }
}
@media (max-width: 767.98px) {
  body { font-size: 15.5px; }
  #slider-carousel .item { height: auto !important; min-height: 88svh; display: flex; align-items: center; }
  #slider-carousel .slider-caption h1 { font-size: clamp(34px, 10vw, 46px) !important; }
  #slider-carousel .slider-caption p { font-size: 16px; }
  .slide-btn-sm { padding: 14px 26px !important; font-size: 16px; }
  section#section-block, #section-portfolio { padding-top: 56px !important; padding-bottom: 48px !important; }
  #service_content_section article.post { padding: 28px 20px 22px; }
  #section-portfolio .p-left-right-0 { flex-direction: column; gap: 16px; }
  section.testimonial .section-header .widget-title { font-size: 16.5px !important; }
  .site-content .container { padding-left: 10px; padding-right: 10px; }
  .site-content .news article.post { padding: 18px 12px !important; }
  .site-content .post-content { padding: 6px 4px !important; }
  .wp-block-table table.has-fixed-layout { table-layout: auto; }
  .wp-block-table td:first-child { width: 64%; }
  .wp-block-table table { font-size: 14px; }
  .wp-block-table th, .wp-block-table td { padding: 10px; }
  .wp-block-table td { word-break: normal; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
