/* =========================================================
   Wojnar & Partnerzy — arkusz stylów
   Kolor marki: #004a41
   ========================================================= */

:root {
  --green: #004a41;
  --green-dark: #00332c;
  --green-tint: #0a6357;
  --gray-100: #f5f5f3;
  --gray-200: #e7e6e2;
  --gray-500: #8a8f8d;
  --gray-700: #4a4f4d;
  --text: #24282a;
  --white: #ffffff;
  --font-head: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --container: 1120px;
  --section-pad: clamp(48px, 8vw, 96px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
#top { scroll-margin-top: 0; }
section[id] { scroll-margin-top: 84px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-header__logo img { height: 34px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green-dark);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.main-nav a:hover, .main-nav a:focus-visible { border-color: var(--green); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
}
.lang-switch a {
  color: var(--gray-500);
  padding: 4px 6px;
  border-radius: 3px;
}
.lang-switch a.is-active { color: var(--white); background: var(--green); }
.lang-switch__social {
  color: var(--green-dark);
  display: inline-flex;
  margin-left: 4px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--green-dark);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero slider ---------- */
.hero-slider {
  position: relative;
  height: min(70vh, 620px);
  min-height: 420px;
  overflow: hidden;
  background: var(--green-dark);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(10,20,20,.72) 0%, rgba(10,20,20,.45) 42%, rgba(0,74,65,.35) 70%, rgba(0,74,65,.15) 100%);
  filter: grayscale(.35);
}
.hero-slide__content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin-left: max(6vw, 24px);
  padding: 40px 44px;
  background: rgba(20, 24, 24, .32);
  backdrop-filter: blur(2px);
  border-left: 4px solid var(--green-tint);
  color: var(--white);
}
.hero-slide__content h2 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
.hero-slide__content p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 18px;
  color: rgba(255,255,255,.92);
}
.hero-slide__content a.more {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.6);
  padding-bottom: 2px;
}
.hero-slide__content a.more:hover { border-color: var(--white); }

.hero-dots {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.25);
  padding: 0;
  cursor: pointer;
}
.hero-dots button.is-active { background: var(--white); }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(10,20,20,.25);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hero-arrow:hover { background: rgba(10,20,20,.5); }
.hero-arrow--prev { left: 20px; }
.hero-arrow--next { right: 20px; }
.hero-arrow svg { width: 18px; height: 18px; }

/* ---------- Content sections ---------- */
.section {
  padding: var(--section-pad) 0;
  text-align: center;
}
.section--white { background: var(--white); color: var(--text); }
.section--green { background: var(--green); color: var(--white); }
.section h1, .section h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 800;
  margin-bottom: 26px;
}
.section--white h2 { color: var(--green); }
.section--green h2 { color: var(--white); }
.section .lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
}
.section--green .lead { color: rgba(255,255,255,.92); }

/* Team grid */
.team-grid {
  max-width: 900px;
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.team-grid__member { text-align: center; }
.team-grid__member .name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--white);
}
.team-grid__member .role {
  font-size: 14px;
  color: rgba(255,255,255,.75);
  margin-top: 4px;
}

/* Divider photo strips */
.divider {
  position: relative;
  height: 150px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 16, 15, .58);
  filter: grayscale(.5);
}
.divider__mark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 34px;
  height: 34px;
}
.divider__mark span { background: rgba(255,255,255,.85); }
.divider__mark span:nth-child(2), .divider__mark span:nth-child(3) { background: var(--green-tint); }
.divider__totop {
  position: absolute;
  right: 20px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 20px;
}
.divider__totop svg { width: 12px; height: 12px; }

/* Logo mark used standalone in hero */
.brand-mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 30px;
  height: 30px;
  margin: 20px auto 0;
}
.brand-mark span { background: rgba(255,255,255,.85); }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { background: var(--green-tint); }

/* Contact section */
.contact-grid {
  max-width: var(--container);
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  text-align: left;
  align-items: start;
}
.contact-card {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 32px;
}
.contact-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--green);
  margin-bottom: 14px;
}
.contact-card address { font-style: normal; line-height: 1.9; }
.contact-card address a { color: var(--green); font-weight: 600; }
.contact-map {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--gray-200);
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--gray-100);
  padding: 40px 24px;
  text-align: center;
  color: var(--gray-700);
  position: relative;
}
.site-footer__name { font-weight: 700; color: var(--green-dark); margin: 0 0 4px; }
.site-footer__copy { font-size: 13px; margin: 0; }
.site-footer__credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--gray-500);
}
.site-footer__credit img { height: 16px; width: auto; opacity: .85; }
.site-footer__credit a:hover img { opacity: 1; }
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--green);
}
.site-footer__bar { height: 10px; background: var(--green); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 26px 20px; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 60px 0 0 auto;
    width: min(78vw, 320px);
    height: calc(100vh - 60px);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 28px;
    box-shadow: -8px 0 24px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 18px; }
  .hero-slide__content { margin: 0 16px; padding: 26px 24px; max-width: none; }
  .hero-arrow { width: 36px; height: 36px; }
  .team-grid { grid-template-columns: 1fr; max-width: 320px; }
  .divider { height: 100px; }
}

@media (max-width: 480px) {
  .hero-slide__content h2 { font-size: 28px; }
  .section { padding: 44px 0; }
  .section h1, .section h2 { font-size: 28px; }
}

/* =========================================================
   Blog
   ========================================================= */
.page-hero {
  background: var(--green);
  color: var(--white);
  padding: 56px 24px 40px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.page-hero p { max-width: 600px; margin: 12px auto 0; color: rgba(255,255,255,.85); }

.blog-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.blog-list { display: flex; flex-direction: column; gap: 32px; }
.post-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gray-200);
}
.post-card__thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--gray-200);
}
.post-card__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--green);
  background: rgba(0,74,65,.08);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.post-card h2 { font-size: 21px; margin-bottom: 8px; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--green); }
.post-card__meta { font-size: 12px; color: var(--gray-500); margin-bottom: 10px; }
.post-card p { font-size: 14.5px; color: var(--gray-700); margin: 0 0 10px; }
.post-card__more { font-size: 13px; font-weight: 700; color: var(--green); }

.blog-sidebar { }
.blog-sidebar h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--green-dark);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green);
}
.blog-sidebar ul { list-style: none; margin: 0 0 32px; padding: 0; }
.blog-sidebar li { margin-bottom: 4px; }
.blog-sidebar a {
  display: flex;
  justify-content: space-between;
  padding: 9px 4px;
  font-size: 14.5px;
  color: var(--text);
  border-bottom: 1px solid var(--gray-200);
}
.blog-sidebar a:hover, .blog-sidebar a.is-active { color: var(--green); font-weight: 600; }
.blog-sidebar .count { color: var(--gray-500); font-size: 13px; }
.blog-search { display: flex; margin-bottom: 32px; }
.blog-search input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  padding: 10px 12px;
  font-size: 14px;
}
.blog-search button {
  border: 0;
  background: var(--green);
  color: var(--white);
  padding: 0 16px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

.post-single { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.post-single__cat { color: var(--green); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.post-single h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin: 10px 0 14px; color: var(--green-dark); }
.post-single__meta { font-size: 13px; color: var(--gray-500); margin-bottom: 28px; }
.post-single__cover { width: 100%; border-radius: 8px; margin-bottom: 32px; aspect-ratio: 16/9; object-fit: cover; }
.post-single__body { font-size: 17px; line-height: 1.85; }
.post-single__body p { margin: 0 0 20px; }
.post-single__body h2 { font-size: 24px; color: var(--green-dark); margin: 36px 0 14px; }
.post-single__body h3 { font-size: 19px; color: var(--green-dark); margin: 28px 0 12px; }
.post-single__body ul, .post-single__body ol { margin: 0 0 20px; padding-left: 22px; }
.post-single__back { display: inline-block; margin-top: 40px; font-weight: 700; color: var(--green); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }

@media (max-width: 860px) {
  .blog-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .post-card { grid-template-columns: 1fr; }
}

/* =========================================================
   Admin panel
   ========================================================= */
.admin-body { background: var(--gray-100); font-family: var(--font-body); min-height: 100vh; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--green-dark);
  color: var(--white);
  padding: 24px 18px;
  flex-shrink: 0;
}
.admin-sidebar__logo { font-family: var(--font-head); font-weight: 800; font-size: 16px; margin-bottom: 30px; display: block; }
.admin-sidebar nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar a {
  display: block; padding: 10px 12px; border-radius: 6px; color: rgba(255,255,255,.8); font-size: 14px; font-weight: 600;
}
.admin-sidebar a:hover, .admin-sidebar a.is-active { background: rgba(255,255,255,.12); color: var(--white); }
.admin-main { flex: 1; padding: 32px 40px; max-width: 980px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-topbar h1 { font-size: 24px; font-weight: 800; color: var(--green-dark); }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 13.5px;
  padding: 10px 18px; border-radius: 6px; border: 1px solid var(--green);
  color: var(--green); background: var(--white); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--green); color: var(--white); }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn--danger { border-color: #b3261e; color: #b3261e; }
.btn--danger:hover { background: #b3261e; color: var(--white); }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }

.admin-card { background: var(--white); border-radius: 8px; padding: 28px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 24px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
.admin-table th { font-family: var(--font-head); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-500); }
.admin-table .actions { display: flex; gap: 8px; justify-content: flex-end; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: rgba(0,74,65,.1); color: var(--green); }
.badge--muted { background: var(--gray-200); color: var(--gray-700); }

.form-grid { display: grid; gap: 18px; max-width: 640px; }
.post-form-grid { max-width: none; grid-template-columns: 2fr 1fr; align-items: start; }
.admin-table-wrap { overflow-x: auto; }
.form-grid label { font-size: 13px; font-weight: 700; color: var(--gray-700); display: block; margin-bottom: 6px; }
.form-grid input[type=text], .form-grid input[type=email], .form-grid input[type=password],
.form-grid select, .form-grid textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: 6px; font: inherit; font-size: 14px;
}
.form-grid textarea { min-height: 260px; font-family: 'Courier New', monospace; font-size: 13px; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--green-dark); padding: 20px; }
.login-card { background: var(--white); border-radius: 10px; padding: 40px 36px; width: 100%; max-width: 380px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card img { height: 30px; margin-bottom: 22px; }
.login-card h1 { font-size: 20px; margin-bottom: 22px; color: var(--green-dark); }

.alert { padding: 12px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 20px; }
.alert--success { background: #e5f3ef; color: var(--green-dark); }
.alert--error { background: #fdecea; color: #a12a22; }

@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .admin-sidebar nav ul { flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: 24px 18px; }
  .post-form-grid { grid-template-columns: 1fr; }
  .admin-table { min-width: 560px; }
}
