﻿:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --muted: #555555;
  --accent: #166534;
  --accent-dark: #14532d;
  --line: #e0e0e0;
  --serif: 'Libre Baskerville', serif;
  --sans: 'Open Sans', sans-serif;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 30px rgba(22, 101, 52, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ================================================
   ACCESSIBILITY – Skip link, Focus, WCAG AA fixes
   ================================================ */

/* Skip navigation link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* Global focus ring for all interactive elements */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Buttons and links */
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.nav-list a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.hamburger-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.modal-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.phone-float-toggle:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.phone-float-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 50px;
}

/* WCAG 1.4.3 contrast fix: muted text must be ≥ 4.5:1 on white */
/* --muted #555555 on white = 7.46:1 — OK */
/* Fix inline uses of #888, #999, #bbb on white/light backgrounds */
.onas-stat--light .onas-stat-lbl { color: #6b7280; } /* was #888 – now 4.66:1 on white */

/* #888 on white = 4.48:1 (marginal fail). Elevate to #767676 (4.54:1) or #6b7280 */
/* Applied via targeted overrides for info-item cards and kontakt page role labels */
.info-item span[style*="color: #888"],
.info-item p[style*="color: #888"],
.info-item [style*="color: #888"] {
  color: #6b7280 !important; /* 4.66:1 on white */
}

/* #666 on white = 5.74:1 — OK, no fix needed */
/* #555 on white = 7.46:1 — OK, no fix needed */

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 6px;
  border: 3px solid var(--bg); /* Adds spacing around thumb */
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header – floating pill navbar */
.topbar {
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 0;
}

/* Single-row nav container – white rounded card */
.main-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 72px;
  background: #ffffff;
  border-radius: 50px;
  padding: 0 28px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.main-nav .brand {
  justify-self: start;
  display: flex;
  align-items: center;
}

.main-nav .horizontal-nav {
  justify-self: center;
}

.main-nav .nav-logo-right {
  justify-self: end;
  display: flex;
  align-items: center;
}

/* Hide Hamburger on Desktop */
.hamburger-btn {
  display: none;
}

/* Legacy wrapper – kept for compatibility, no longer collapses */
.nav-brand-wrapper {
  display: flex;
  align-items: center;
  height: 64px;
  border: none;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border: none;
  padding: 0;
  margin: 0;
}

.brand img {
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
}

.logo-img {
  height: 46px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}

.horizontal-nav {
  background: transparent;
}

.nav-list {
  display: flex;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: var(--accent);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0; /* Will be set by JS */
  pointer-events: none;
}

.nav-list li {
  margin: 0;
}

.nav-list a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 15px 25px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

/* Hover & Active underline effect - REMOVED/REPLACED by sliding indicator */
/* .nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
} */

.nav-list a:hover,
.nav-list a.active {
  color: var(--accent);
}

/* Hide navbar on scroll down - DISABLED */
/* .topbar.hidden {
  transform: translateY(-100%);
} */

.topbar.scrolled {
  /* Additional styles when scrolled if needed, e.g. reduced padding */
}

/* Hero Section */
.hero {
  padding-top: 180px; /* Reduced from 200px */
  padding-bottom: 50px;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ddd; /* Light grey for the lines */
}

.scales-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  overflow: visible;
}

/* Animations */
.draw-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 4s ease-out forwards;
}

.draw-line-red {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 5s ease-out forwards 1s; /* Delay red parts */
}

.balance-beam {
  transform-origin: 200px 50px; /* Pivot point at the top center */
  animation: sway 10s ease-in-out infinite alternate;
}

.pulse-dot {
  opacity: 0;
  animation: fadeInDot 1s ease forwards 4s;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes sway {
  0% { transform: rotate(-6deg); }
  100% { transform: rotate(6deg); }
}

@keyframes fadeInDot {
  to { opacity: 1; }
}

.kicker {
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1.1;
  margin: 0 0 24px;
  color: var(--text);
}

.hero-title .accent {
  color: var(--accent);
  font-style: italic;
  padding-right: 10px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: 0; /* Align left on desktop */
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start; /* Align left on desktop */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 15px rgba(22, 101, 52, 0.3);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 101, 52, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--text);
  background: var(--text);
  color: white;
}



/* Sections */
section {
  padding: 80px 0;
}

#o-nas {
  padding-top: 40px; /* Reduced top padding as requested */
}

#zespol {
  padding-top: 20px;
}

#dlaczego-my {
  padding-top: 20px;
}

/* Custom layout for Why Us section */
#dlaczego-my .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

#dlaczego-my .section-head {
  text-align: left;
  margin: 0;
  max-width: 100%;
}

#dlaczego-my .why-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (max-width: 900px) {
  #dlaczego-my .container {
    grid-template-columns: 1fr;
  }
  
  #dlaczego-my .section-head {
    text-align: left;
    margin-bottom: 40px;
  }
}

.section-head {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 60px;
}

.section-head h1,
.section-head h2 {
  font-family: var(--serif);
  font-size: 42px;
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--text);
  line-height: 1.2;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-color: var(--accent);
}

.service-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover .service-image img {
  transform: scale(1.1);
}

.service-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-content h3 {
  font-family: var(--serif);
  font-size: 16px;
  margin: 0 auto;
  text-align: center;
  color: var(--text);
  background: transparent;
  padding: 12px 24px;
  border-radius: 50px;
  width: fit-content;
  border: 1px solid var(--line);
  box-shadow: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.service-action {
  display: block;
  margin: 16px auto 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  text-align: center;
}

.service-card:hover .service-action {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover .service-content h3 {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 101, 52, 0.3);
}

@media (max-width: 768px) {
  .service-action {
    opacity: 1;
    transform: translateY(0);
    background: #f8f9fa;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    width: fit-content;
  }
}

/* Features/Creative Grid */
.features-creative-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-creative-card {
  position: relative;
  background: white;
  padding: 40px 30px;
  border-radius: 4px;
  border: 1px solid var(--line);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px;
}

.feature-creative-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}

.feature-creative-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
  border-color: transparent;
}

.feature-creative-card:hover::before {
  transform: scaleX(1);
}

.card-number {
  position: absolute;
  top: -15px;
  right: -5px;
  font-family: var(--serif);
  font-size: 120px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.03;
  line-height: 1;
  transition: all 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.feature-creative-card:hover .card-number {
  opacity: 0.08;
  transform: translateX(-10px) translateY(5px);
  color: var(--accent);
}

.feature-creative-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
  color: var(--text);
}

.feature-creative-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 1;
}

.why-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.why-card h3 {
  font-size: 24px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 16px;
  display: inline-block;
}

.why-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.why-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.tick {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Contact */
.contact {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
}

.contact-form {
  background: white;
  padding: 40px;
  border-radius: 20px;
  color: var(--text);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.3s;
  box-sizing: border-box;
  display: block;
}

.form-control:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-item {
  margin-bottom: 0;
  background: white;
  color: var(--text);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: all 0.3s ease;
}

.info-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.info-item strong {
  display: block;
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--serif);
}

.info-item p {
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
  color: var(--text);
}

.info-item a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.info-item a:hover {
  color: var(--accent);
}

/* Team */
.team-section {
  background: var(--bg);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.team-card {
  text-align: center;
  background: #ffffff;
  padding: 48px 40px;
  border-radius: 28px;
  border: 1px solid #eceff1;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  border-color: #e0e7ff;
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.team-avatar {
  width: 180px;
  height: 180px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
  border: 6px solid #ffffff;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.team-card:hover .team-avatar img {
  transform: scale(1.05);
}

.team-info h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 24px;
  color: var(--text);
  font-weight: 700;
}

.team-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.contact-details p {
  margin: 0;
}

.contact-details a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #111827;
  text-decoration: none;
  font-size: 15px;
  padding: 12px 24px;
  background: #f9fafb;
  border-radius: 999px;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  font-weight: 600;
}

.contact-details a:hover {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.contact-details a::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.contact-details a[href^="tel:"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
}

.contact-details a[href^="mailto:"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Marquee / Clients */
.clients-section {
  background: var(--bg);
  overflow: hidden;
  padding: 60px 0;
}

.marquee-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  display: flex;
  width: max-content;
  animation: scroll 40s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

.client-logo {
  flex: 0 0 auto;
  width: 200px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.client-logo img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  filter: none;
  opacity: 1;
  transition: all 0.4s ease;
}

.client-logo:hover img {
  transform: scale(1.1);
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* Footer */
footer {
  background: #052e16;
  color: #a7c5b5;
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

footer a {
  color: #86efac;
}

footer a:hover {
  color: #4ade80;
}

/* ================================================
   RESPONSIVE – Mobile First
   ================================================ */
@media (max-width: 768px) {

  /* ── Topbar / Nav ── */
  .topbar {
    padding: 12px 16px;
    background: transparent;
  }
  
  .container {
    padding: 0 16px;
  }

  /* ── Pill nav → hamburger ── */
  .main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    padding: 0 18px;
    border-radius: 40px;
  }

  .main-nav .horizontal-nav {
    justify-self: unset;
  }

  /* Hamburger button */
  .hamburger-btn {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
  }

  .hamburger-box {
    width: 26px;
    height: 20px;
    display: inline-block;
    position: relative;
  }

  .hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -1px;
    width: 26px;
    height: 2px;
    background: var(--accent);
    position: absolute;
    transition: transform 0.22s ease;
  }

  .hamburger-inner::before,
  .hamburger-inner::after {
    content: "";
    display: block;
    width: 26px;
    height: 2px;
    background: var(--accent);
    position: absolute;
    transition: transform 0.22s ease;
  }

  .hamburger-inner::before { top: -8px; }
  .hamburger-inner::after  { bottom: -8px; }

  .hamburger-btn.is-active .hamburger-inner            { background: transparent; }
  .hamburger-btn.is-active .hamburger-inner::before    { top: 0; transform: rotate(45deg); }
  .hamburger-btn.is-active .hamburger-inner::after     { bottom: 0; transform: rotate(-45deg); }

  /* Mobile slide-in menu */
  .horizontal-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1001;
    overflow-y: auto;
  }

  .horizontal-nav.is-open { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0;
    gap: 0;
  }

  .nav-list li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .horizontal-nav.is-open .nav-list li            { opacity: 1; transform: translateY(0); }
  .horizontal-nav.is-open .nav-list li:nth-child(2) { transition-delay: 0.07s; }
  .horizontal-nav.is-open .nav-list li:nth-child(3) { transition-delay: 0.14s; }
  .horizontal-nav.is-open .nav-list li:nth-child(4) { transition-delay: 0.21s; }
  .horizontal-nav.is-open .nav-list li:nth-child(5) { transition-delay: 0.28s; }
  .horizontal-nav.is-open .nav-list li:nth-child(6) { transition-delay: 0.35s; }

  .nav-list a {
    padding: 18px 24px;
    font-size: 22px;
    font-family: var(--serif);
    font-weight: 700;
    color: var(--text);
    display: block;
  }

  .nav-list a.active { color: var(--accent); }
  .nav-indicator     { display: none; }

  .logo-img { height: 36px; }

  /* ── Typography ── */
  .section-head h1,
  .section-head h2 { font-size: 26px; margin-bottom: 12px; }
  .section-head p  { font-size: 15px; }
  .section-head    { margin-bottom: 28px; }

  /* ── Hero (index.html) ── */
  .hero { padding-top: 100px !important; padding-bottom: 40px !important; }

  /* Inline hero-grid override */
  [style*="grid-template-columns: 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    align-items: center !important;
  }

  /* Inline hero-grid on index */
  .hero-grid { grid-template-columns: 1fr !important; text-align: center; gap: 24px; }
  .hero-visual { max-width: 340px; margin: 0 auto; width: 100%; }
  .hero-actions { justify-content: center; flex-wrap: wrap; gap: 10px; }

  /* Hero photos grid (2 lawyers) */
  .hero-visual {
    display: grid !important;
    flex-direction: unset !important;
    grid-template-columns: 1fr 1fr !important;
    max-width: 340px !important;
    margin: 0 auto !important;
    align-items: stretch !important;
  }
  .hero-lawyer-img { height: 220px !important; object-fit: cover !important; object-position: top center !important; }
  [style*="font-size: 48px"] { font-size: 30px !important; }
  [style*="font-size: 46px"] { font-size: 28px !important; }

  /* ── Buttons ── */
  .btn { padding: 12px 20px; font-size: 14px; }

  /* ── Grids → single column ── */
  .services-grid,
  .features-creative-grid,
  .contact-grid { grid-template-columns: 1fr !important; gap: 16px; }

  .feature-creative-card { min-height: auto; padding: 24px 20px; }
  .card-number { font-size: 60px; }

  /* ── Stats bar (o-nas.html) ── */
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── Team (zespol.html) ── */
  [style*="grid-template-columns: 320px 1fr"],
  [style*="grid-template-columns: 1fr 320px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* Photo column full-width on mobile */
  [style*="grid-template-columns: 320px 1fr"] > div:first-child,
  [style*="grid-template-columns: 1fr 320px"] > div:last-child {
    width: 100% !important;
    min-height: unset !important;
    padding: 36px 24px 32px !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Make circular photo bigger on mobile (55% of viewport width) */
  [style*="grid-template-columns: 320px 1fr"] > div:first-child > div:first-child,
  [style*="grid-template-columns: 1fr 320px"] > div:last-child > div:first-child {
    width: min(55vw, 220px) !important;
    height: min(55vw, 220px) !important;
  }

  /* Bio column padding on mobile */
  [style*="grid-template-columns: 320px 1fr"] > div:last-child,
  [style*="grid-template-columns: 1fr 320px"] > div:first-child {
    padding: 28px 20px 32px !important;
    text-align: center !important;
  }

  /* Center specialization tags on mobile */
  [style*="grid-template-columns: 320px 1fr"] > div:last-child > div[style*="display: flex; gap: 12px"],
  [style*="grid-template-columns: 1fr 320px"] > div:first-child > div[style*="display: flex; gap: 12px"] {
    justify-content: center !important;
  }

  /* Flip Kozielec card so photo comes first */
  [style*="grid-template-columns: 1fr 320px"] > div:last-child { order: -1; }

  /* ── Historia / dlaczego (o-nas.html) ── */
  [style*="grid-template-columns: 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Dlaczego my 2-col cards */
  [style*="grid-template-columns: 1fr 1fr; gap: 24px"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Dlaczego my (index.html) ── */
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* ── Footer ── */
  [style*="grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
  }

  /* ── Contact (kontakt.html) ── */
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 22px 18px; }
  .contact-info { gap: 14px; }
  .info-item { padding: 18px; text-align: center; }
  .info-item strong { text-align: center; }
  .info-item p { text-align: center; }

  /* ── Map iframe ── */
  iframe[height="420"] { height: 240px !important; }

  /* ── Map button on contact ── */
  [style*="display: flex; align-items: center; justify-content: space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  /* ── Blog ── */
  .blog-filters { padding: 14px 0 !important; top: 68px !important; }
  .filter-inner { gap: 6px; }
  .filter-btn   { padding: 6px 14px; font-size: 12px; }
  .post-modal-overlay { padding: 70px 12px 24px; }
  .post-modal-title   { font-size: 20px; }

  /* ── Modal ── */
  .modal-wrapper { width: 95%; max-height: 90vh; }
  .modal-content { padding: 20px; }
  .modal-close   { top: 8px; right: 8px; width: 40px; height: 40px; }

  /* ── Phone widget ── */
  .phone-float-bar { flex-direction: column; gap: 6px; }
}

/* ── Extra small (≤ 420px) ── */
@media (max-width: 420px) {
  .section-head h1,
  .section-head h2 { font-size: 22px; }

  [style*="font-size: 52px"] { font-size: 36px !important; }

  /* Footer single column on tiny screens */
  [style*="grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Stats single column */
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* CTA buttons full width */
  .hero-actions a,
  .hero-actions .btn { width: 100%; text-align: center; justify-content: center; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-wrapper {
  background: white;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.modal-overlay.active .modal-wrapper {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: white;
  border: 1px solid #eee;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f5f5f5;
  transform: rotate(90deg);
}

.modal-content {
  overflow-y: auto;
  padding: 40px;
}

.modal-content h2 {
  font-family: var(--serif);
  color: var(--text);
  margin-top: 0;
}

.modal-content img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}

/* Handwriting Effect */
.handwriting-effect {
  position: relative;
  display: inline-block;
}

.handwriting-effect .char {
  opacity: 0;
  display: inline-block;
  transform: translateY(10px) skewX(-10deg);
  filter: blur(2px);
  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.handwriting-effect.start-writing .char {
  opacity: 1;
  transform: translateY(0) skewX(0);
  filter: blur(0);
}

.accent-word .char {
  color: var(--accent);
}

/* Modal Contact Form */
.modal-footer-action {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.modal-contact-form {
  padding: 10px;
}

.contact-intro {
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--muted);
}

#contact-service-name {
  font-weight: 700;
  color: var(--accent);
}

.modal-contact-form .form-group {
  margin-bottom: 20px;
}

.modal-contact-form .form-control[readonly] {
  background-color: #f5f5f5;
  color: var(--muted);
  border-color: #e0e0e0;
  cursor: not-allowed;
}

.modal-contact-form button[type="submit"] {
  width: 100%;
  margin-bottom: 16px;
  padding: 16px;
}

.modal-contact-form .back-to-service {
  width: 100%;
  padding: 16px;
}


.handwriting-effect::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 1s ease-out 0.5s; /* Delay to start after text appears */
}

.start-writing::after {
  width: 100%;
}

/* Modal Advanced Layout */
.modal-body-flex {
  display: flex;
  gap: 40px;
  margin-top: 24px;
}

.modal-text {
  flex: 1;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.modal-text p {
  margin-bottom: 20px;
}

.modal-text ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.modal-text li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: white;
  color: var(--text);
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999;
  border-left: 4px solid var(--accent);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-text li::before {
  content: '•';
  color: var(--accent);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

.modal-text strong {
  color: var(--text);
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}

.modal-features-sidebar {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-sidebar-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 4px solid white;
}

.modal-sidebar-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-feature-card {
  background: var(--bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.modal-feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.modal-feature-card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.modal-content h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 auto 30px;
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  padding: 16px 40px;
  border-radius: 50px;
  display: table;
  box-shadow: 0 10px 25px rgba(22, 101, 52, 0.3);
  border-bottom: none;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .modal-body-flex {
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
  }
  
  .modal-features-sidebar {
    width: 100%;
    flex: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
  }

  .modal-feature-card {
    padding: 16px;
    background: #f8f9fa; /* Slightly darker bg to distinguish from white modal */
  }

  .modal-content h3 {
    font-size: 18px;
    padding: 12px 20px;
    width: 100%;
    display: block;
    box-sizing: border-box;
    margin-bottom: 20px;
    white-space: normal; /* Ensure text wraps */
  }
  
  .modal-text {
    font-size: 15px; /* Slightly smaller text */
  }
  
  .modal-text ul {
    padding-left: 0; /* Remove default padding since we use custom bullets */
  }
}

/* Floating phone widget */
.phone-float-widget {
  position: fixed;
  bottom: 30px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 9000;
}

.phone-float-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: bottom right;
}

.phone-float-widget.collapsed .phone-float-bar {
  opacity: 0;
  transform: scale(0.85) translateY(10px);
  pointer-events: none;
}

.phone-float-toggle {
  background: #166534;
  color: white;
  border: none;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(22, 101, 52,0.45);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.phone-float-toggle:hover {
  background: #14532d;
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(22, 101, 52,0.55);
}

.phone-float-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-float-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.phone-float-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.25);
}

.phone-float-btn svg {
  flex-shrink: 0;
}

.phone-float-btn--dark {
  background: #166534;
  color: white;
}

.phone-float-btn--light {
  background: white;
  color: #166534;
  border: 2px solid #166534;
}

@media (max-width: 600px) {
  .phone-float-widget {
    bottom: 16px;
    right: 16px;
  }
  .phone-float-btn {
    font-size: 13px;
    padding: 12px 16px;
  }
}

/* Team cards – mobile */
@media (max-width: 768px) {
  #zespol .container > div[style*="grid-template-columns: 320px"] {
    grid-template-columns: 1fr !important;
  }
  #zespol .container > div[style*="grid-template-columns: 1fr 320px"] {
    grid-template-columns: 1fr !important;
  }
  #zespol .container > div[style*="grid-template-columns: 320px"] > div:last-child {
    padding: 40px 24px !important;
  }
  #zespol .container > div[style*="grid-template-columns: 1fr 320px"] > div:first-child {
    padding: 40px 24px !important;
    order: 2;
  }
  #zespol .container > div[style*="grid-template-columns: 1fr 320px"] > div:last-child {
    order: 1;
  }
}

/* Footer link visibility on dark background */
footer a[style*="#166534"] {
  color: #86efac !important;
}

footer span[style*="#166534"] {
  color: #86efac !important;
}

footer p[style*="#166534"] {
  color: #86efac !important;
}

/* WCAG 1.4.3 – Footer contrast fixes for dark #052e16 background */
/* #bbb on #052e16 = 3.9:1 (fail normal text) → fix to #c9d8ce (≥4.5:1) */
footer p[style*="color: #bbb"],
footer [style*="color: #bbb"] {
  color: #c9d8ce !important;
}

/* #999 on #052e16 = 2.3:1 (fail) → fix to #a7c5b5 (≥4.5:1) */
footer span[style*="color: #999"],
footer [style*="color: #999"] {
  color: #a7c5b5 !important;
}

/* #999 copyright text in footer bottom bar */
footer div[style*="color: #999"],
footer > div > div[style*="color: #999"] {
  color: #a7c5b5 !important;
}

/* #ddd links in footer bottom = 9.4:1 on #052e16 — passes */

/* Updated for Vercel deployment - correct email */

/* ================================================
   O NAS page – layout classes
   ================================================ */
.onas-hero {
  padding: 160px 0 0;
  background: linear-gradient(135deg, #e8f5e8 0%, #e8f5e8 100%);
  margin-top: 0;
  overflow: hidden;
}

.onas-hero-text {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 64px;
}

.onas-hero-text h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  margin: 0 0 24px;
}

.onas-hero-text .lead {
  font-size: 16px;
  line-height: 1.85;
  color: #555;
  margin: 0 0 18px;
}

.onas-hero-text .hero-actions {
  margin-top: 36px;
}

.onas-stats-bar {
  display: flex;
  margin: 0 -24px;
}

.onas-stat {
  flex: 1;
  text-align: center;
  padding: 44px 24px;
  border-right: 1px solid rgba(22, 101, 52, 0.12);
}

.onas-stat:last-child {
  border-right: none;
}

.onas-stat--light {
  background: #ffffff;
}

.onas-stat--dark {
  background: #166534;
}

.onas-stat-num {
  font-family: 'Libre Baskerville', serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.onas-stat--light .onas-stat-num { color: #166534; }
.onas-stat--dark  .onas-stat-num { color: #ffffff; }

.onas-stat-num--gold { color: #f59e0b !important; }

.onas-stat-lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 10px;
}

.onas-stat--light .onas-stat-lbl { color: #888; }
.onas-stat--dark  .onas-stat-lbl { color: rgba(255, 255, 255, 0.7); }

/* Historia section */
.onas-historia-flex {
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.onas-historia-flex > div {
  flex: 1;
}

@media (max-width: 768px) {
  .onas-hero-text h1 { font-size: 28px; }
  .onas-stats-bar { flex-direction: column; margin: 0; }
  .onas-stat { border-right: none; border-bottom: 1px solid rgba(22, 101, 52,0.12); }
  .onas-historia-flex { flex-direction: column; gap: 40px; }
}
