/* ===========================================================================
   Kancelaria G&G sp. z o.o. - Racibórz
   Replikacja 1:1 (Joomla/YOOtheme -> czysty statyczny stack)
   Paleta: primary #5578ce, secondary/stopka #476abf, Montserrat
   =========================================================================== */

/* ---- fonty (self-host, latin + latin-ext dla polskich znaków) ---- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/montserrat-v31-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/montserrat-v31-latin_latin-ext-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/montserrat-v31-latin_latin-ext-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/montserrat-v31-latin_latin-ext-700.woff2') format('woff2');
}

/* ---- zmienne ---- */
:root {
  --blue:        #5578ce;   /* primary */
  --blue-dark:   #476abf;   /* secondary / stopka */
  --blue-darker: #3a59a3;   /* hover */
  --ink:         #2b2f38;
  --muted:       #6b7280;
  --line:        #e5e7eb;
  --bg:          #ffffff;
  --radius:      6px;
  --container:   1200px;
  --shadow:      0 8px 30px rgba(40, 60, 120, .12);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-darker); }
h1, h2, h3 { font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--blue); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- przyciski ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 34px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  white-space: normal;          /* nie ucinaj na mobile */
  border: 1px solid transparent;
  border-radius: 500px;         /* pigułka - jak w oryginale YOOtheme */
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-darker); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue); }
.btn-ghost:hover { background: #eef2fb; color: var(--blue-darker); }
.btn-default {
  background: #fff; color: var(--ink); border-color: var(--line);
}
.btn-default:hover { background: #f6f8fc; color: var(--blue); border-color: var(--blue); }
.btn-lg { padding: 15px 42px; font-size: 15px; }
.btn .ic { width: 1.2em; height: 1.2em; flex: none; }

/* ===========================================================================
   HEADER
   =========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px;
  min-height: 84px;
  padding: 18px 44px;
  max-width: 1600px; margin: 0 auto;
}
.logo {
  font-weight: 500; font-size: 1.25rem; color: var(--ink);
  text-transform: uppercase; line-height: 1.2; min-width: 0;
}
.logo:hover { color: var(--blue); }
/* desktop: menu i przycisk Kontakt w jednym rzędzie, obok siebie */
.nav { display: flex; flex-direction: row; align-items: center; gap: 12px 26px; flex-wrap: wrap; justify-content: flex-end; }
.nav-list { display: flex; align-items: center; gap: 26px; flex-wrap: nowrap; }
.nav-list a {
  display: block; padding: 4px 2px; color: var(--ink); font-weight: 400;
  font-size: .98rem; white-space: nowrap;
}
.nav-list a:hover { color: var(--blue); }
.nav-list .is-active > a { color: var(--blue); }
.nav-toggle { display: none; }

/* offcanvas mobile */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(20,28,55,.5);
  opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 60;
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

@media (max-width: 1200px) {
  /* poniżej 1200px pełne menu + przycisk nie mieszczą się obok loga - hamburger */
  /* przy otwartym menu header (z hamburgerem -> X) zostaje nad panelem offcanvas */
  body.nav-open .site-header { z-index: 80; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; padding: 0 10px;
    background: none; border: 0; cursor: pointer; flex: none;
    position: relative; z-index: 81;
  }
  .nav-toggle span { display: block; height: 2px; width: 22px; background: var(--ink); border-radius: 2px; transition: .25s; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed; top: 0; right: 0; z-index: 70;
    width: min(86vw, 340px); height: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 76px 22px 28px;
    background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,.15);
    transform: translateX(100%); transition: transform .28s ease;
    overflow-y: auto;
  }
  body.nav-open .nav { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav-list a { padding: 13px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header-cta { margin: 18px 0 0; }
  .header-cta .btn { width: 100%; }
}

/* ===========================================================================
   HERO HUB (strona główna) - dwa kafle
   =========================================================================== */
.hub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px 24px;          /* margines strony - kafle nie kleją się do krawędzi */
}
.hub-tile {
  position: relative;
  min-width: 0;
  display: flex; align-items: center; justify-content: center;
  min-height: 600px;
  padding: 60px 28px;
  text-align: center;
  color: #fff;
  background: var(--blue) center/cover no-repeat;
  border-radius: 10px;
  overflow: hidden;
}
.hub-tile > * { position: relative; z-index: 1; width: 100%; }
.hub-meta {
  font-size: 14px; font-weight: 400; line-height: 1.4;
  color: rgba(255, 255, 255, .45);   /* przygaszony biały - jak w oryginale */
  margin: 0;
}
.hub-tile .btn { margin: 26px auto; max-width: 100%; }
.hub-tile:hover .btn { background: var(--blue-darker); }

/* ===========================================================================
   SEKCJE / KONTAKT
   =========================================================================== */
.section { padding: 56px 0; }
.section-tight { padding: 40px 0; }
.page-title { text-align: center; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.divider-icon {
  display: flex; align-items: center; justify-content: center;
  margin: 8px 0 28px; color: var(--blue);
}
.divider-icon::before, .divider-icon::after {
  content: ""; height: 1px; background: var(--line); flex: 1 1 auto; max-width: 220px;
}
.divider-icon .ic { width: 26px; height: 26px; margin: 0 14px; flex: none; }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.contact-grid > * { min-width: 0; }
.contact-photo img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.contact-card h2 { text-align: center; font-size: 1.4rem; }
.contact-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.contact-list .btn { width: 100%; justify-content: center; gap: 12px; padding: 14px 22px; font-weight: 400; }
.contact-list .btn .ic { color: var(--blue); width: 1.25em; height: 1.25em; }
.contact-list .btn:hover .ic { color: inherit; }

/* ===========================================================================
   STOPKA
   =========================================================================== */
.site-footer {
  color: #fff;
  margin: 24px;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}
.footer-top { background: var(--blue-dark); padding: 46px 0 42px; }
.footer-bottom { background: var(--blue-darker); padding: 32px 0 28px; }
.footer-actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}
.footer-actions .btn-primary { background: var(--blue); }
.footer-actions .btn-primary:hover { background: #fff; color: var(--blue); }
.footer-info { position: relative; max-width: 1000px; margin: 0 auto; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 5px 18px; justify-content: center; margin-bottom: 12px;
}
.footer-nav li { position: relative; }
.footer-nav li + li::before {
  content: ""; position: absolute; left: -9px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 12px; background: rgba(255,255,255,.3);
}
.footer-nav a { color: rgba(255,255,255,.9); font-size: .82rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-meta { font-size: .72rem; color: rgba(255,255,255,.68); margin: 5px auto; max-width: 760px; }
.footer-credit {
  display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center;
  gap: 9px 13px; margin-top: 24px;
  padding: 8px 8px 8px 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 100px; font-size: .8rem; line-height: 1;
}
.footer-credit .credit-label { color: rgba(255,255,255,.6); }
.footer-credit > a { color: #fff; font-weight: 700; text-decoration: none; transition: color .18s; }
.footer-credit > a:hover { color: #cdd8f5; }
.footer-ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  background: linear-gradient(135deg, #6d8fe6 0%, #4760b5 100%);
  color: #fff !important; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.footer-ai-badge:hover { filter: brightness(1.1); }
.footer-ai-badge svg { width: 11px; height: 11px; }
.footer-credit .footer-version { color: rgba(255,255,255,.42); font-size: 11px; font-family: ui-monospace, monospace; }

/* przycisk "do góry" - w stopce, na desktopie po prawej */
.footer-totop {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin: 22px auto 0;
  border: 1px solid rgba(255,255,255,.35); border-radius: 6px;
  color: rgba(255,255,255,.75); cursor: pointer; transition: background-color .18s, color .18s;
}
.footer-totop:hover { background: rgba(255,255,255,.15); color: #fff; }
.footer-totop .ic { width: 18px; height: 18px; }
@media (min-width: 768px) {
  .footer-totop { position: absolute; right: 0; top: 50%; transform: translateY(-50%); margin: 0; }
}

/* ===========================================================================
   RESPONSYWNOŚĆ
   =========================================================================== */
@media (max-width: 760px) {
  .hub { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .hub-tile { min-height: 66vh; padding: 48px 22px; }
  .site-footer { margin: 14px; }
  .contact-grid { grid-template-columns: 1fr; gap: 26px; }
  .contact-photo { order: 2; }
}
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 12px 16px; min-height: 64px; }
  .section { padding: 40px 0; }
  .hub-tile { min-height: 62vh; padding: 40px 18px; }
  .btn { padding: 11px 26px; }
  .logo { font-size: 1.1rem; }
}

/* ===========================================================================
   KANCELARIA PRAWNA - komponenty stron treściowych (logo wersaliki jak wzorzec)
   =========================================================================== */
/* HERO banner - zdjęcie z przygaszonym tytułem w rogu */
.hero-banner {
  position: relative; min-height: 520px;
  margin: 0 24px; border-radius: 10px; overflow: hidden;
  background: var(--blue);
  display: flex; align-items: flex-end; justify-content: flex-end;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  transform-origin: center;
  animation: kenburns 20s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-banner > .hero-title { position: relative; z-index: 1; }
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.15); }
}
.hero-banner .hero-title {
  color: rgba(255, 255, 255, .9); font-weight: 500;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  margin: 0; padding: 30px 38px; text-shadow: 0 2px 16px rgba(0,0,0,.45);
}

/* INTRO + sekcja usług */
.intro { max-width: 1040px; margin: 0 auto 40px; text-align: justify; color: var(--ink); }
.services {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  max-width: 1200px; margin: 0 auto;
}
.service-card {
  min-width: 0; background: #fff; border-radius: 12px; padding: 32px 22px; text-align: center;
  box-shadow: 0 6px 24px rgba(40, 60, 120, .07); transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: 0 14px 34px rgba(40, 60, 120, .15); transform: translateY(-3px); }
.service-card .ic-svc { width: 70px; height: 52px; margin: 0 auto 18px; display: block; }
.service-card h2 { font-size: 1.12rem; margin: 0 0 12px; }
.service-card p { font-size: .92rem; color: var(--muted); margin: 0; }

/* CTA split - zdjęcie | granatowy panel z tekstem */
.cta-split { display: grid; grid-template-columns: 1fr 1fr; }
.cta-split > * { min-width: 0; }
.cta-img { background: var(--blue) center/cover no-repeat; min-height: 340px; }
.cta-panel {
  position: relative; color: #fff; padding: 64px 52px;
  background: #213b93 center/cover no-repeat;
  display: flex; flex-direction: column; justify-content: center;
}
.cta-panel::before { content: ""; position: absolute; inset: 0; background: rgba(33, 59, 147, .78); }
.cta-panel > * { position: relative; z-index: 1; }
.cta-panel h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-panel p { text-align: justify; color: rgba(255,255,255,.92); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.cta-actions .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.cta-actions .btn-ghost:hover { background: #fff; color: var(--blue-dark); }

/* strony treściowe: O nas, Oferta */
.prose { text-align: justify; }
.prose p { margin: 0 0 1.1rem; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.content-grid > * { min-width: 0; }
.content-img img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }

/* lista oferty */
.offer-list { max-width: 840px; margin: 0 auto; }
.offer-list li { position: relative; padding: 11px 0 11px 30px; border-bottom: 1px solid var(--line); }
.offer-list li:last-child { border-bottom: 0; }
.offer-list li::before {
  content: ""; position: absolute; left: 4px; top: 18px;
  width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--blue);
}

/* alert (zielony) */
.alert-success {
  background: #e9f6ed; border: 1px solid #b6e0c2; color: #1f7a3d;
  border-radius: 8px; padding: 16px 22px; text-align: center; font-weight: 600; margin: 28px auto; max-width: 900px;
}

/* alert info (niebieski) - dla notki na o-nas (rok 1993) */
.alert-info {
  background: #eef2fb; border: 1px solid #c3d1f0; color: var(--blue-darker);
  border-radius: 8px; padding: 16px 22px; text-align: center; font-weight: 600; margin: 28px auto; max-width: 900px;
}

/* siatka 2 kart usług (kancelaria ma 2 usługi, nie 4) */
.services.services-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; }

/* karty radców prawnych (kontakt) */
.lawyers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 800px; margin: 30px auto 0; }
.lawyers > * { min-width: 0; }
.lawyer-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px 22px; text-align: center;
  box-shadow: 0 6px 24px rgba(40, 60, 120, .06);
}
.lawyer-card h3 { font-size: 1.15rem; margin: 0 0 2px; }
.lawyer-card .role { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.lawyer-card .btn { width: 100%; justify-content: center; gap: 10px; }
.lawyer-card .btn + .btn { margin-top: 10px; }
.lawyer-card .ic { color: var(--blue); width: 1.2em; height: 1.2em; }

/* responsywność stron treściowych */
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .services.services-2 { grid-template-columns: 1fr; }
  .lawyers { grid-template-columns: 1fr; gap: 16px; }
  .cta-split { grid-template-columns: 1fr; }
  .cta-img { min-height: 220px; }
  .cta-panel { padding: 44px 26px; }
  .content-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-banner { min-height: 340px; margin: 0 14px; }
}
