/* Loaded last on every page: shared layout corrections across device sizes. */

/* Keep footer columns independent of the newsletter's intrinsic text width. */
.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(0, 2.1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.newsletter, .footer-links, .footer-links > div { min-width: 0; }
.newsletter h3 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
}
.newsletter-unavailable { max-width: 32ch; margin: 0; }
.footer-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
}
.footer-links h4 { margin: 0 0 12px; font-size: 22px; }
.footer-links a { padding: 6px 0; margin: 0; line-height: 1.5; }
.footer-bottom p { margin: 8px 0; }

/* Content height and width determine text heroes, including tall tablets. */
.hero:not(.home-hero), .hero:not(.home-hero) .container,
body.cennik-page .hero, body.cennik-page .hero .container {
  min-height: 0;
}
.hero:not(.home-hero) .container {
  padding-block: clamp(48px, 5vw, 80px);
}
.hero:not(.home-hero) h1,
.ac-hero .hero-text h1,
.gdpr-hero h1 {
  margin: 0 0 24px;
  font-size: clamp(32px, 5.2vw, 72px);
  line-height: 1.12;
  text-wrap: balance;
}
.hero:not(.home-hero) .hero-text p {
  margin: 0 0 28px;
  max-width: 72ch;
  font-size: 18px;
  line-height: 1.6;
}
.about-actions, .hero-actions { margin-top: 0; }
.btn-outline, .blog-actions .btn-outline { color: var(--kc-gold-text); }
.blog-actions .btn-outline:hover { color: var(--kc-ink); }
.contact-section .btn-outline { color: #dfbb74; }
.trust-row dt { color: #dfbb74; }
.history-year, .step.active span { color: var(--kc-ink); }
.pkg-combine-cta:hover { color: #fff; }
.service-pager a:hover .arrow { color: var(--kc-ink); }
.testimonials-header p { color: #e3ede5; }
.fw-subtitle { font-size: 13px; }

/* About: an image column that fits, and values that can shrink and reflow. */
.history-section { padding-top: 48px; }
.history-content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.history-main, .history-side { min-width: 0; max-width: none; width: 100%; }
.history-side { display: block; }
.history-image { width: 100%; max-width: none; margin: 0; }
.history-title { margin-top: 0; font-size: clamp(32px, 4vw, 54px); }
.history-desc { font-size: 17px; }
.history-timeline { margin-bottom: 0; }
.history-stats { margin-top: 40px; }
.history-stats .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.history-stat { font-size: clamp(36px, 4vw, 54px); }
.values-card { padding: 0; }
.values-title { font-size: clamp(32px, 4vw, 54px); margin-bottom: 28px; }
.values-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.value-item { min-width: 0; padding: 24px; }
.value-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  width: 100%;
}
.value-number { font-size: 44px; min-width: 0; }
.value-title { font-size: 28px; line-height: 1.15; }
.value-desc { font-size: 15px; line-height: 1.6; }
.values-card::before, .values-card::after { display: none; }
.value-item + .value-item { border-left: 1px solid #e9d9ba; }
.values-grid .value-item:nth-child(3n + 1) { border-left: 0; }
.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
}
.trust-intro, .trust-card { min-width: 0; }
.trust-title { font-size: clamp(32px, 4vw, 54px); line-height: 1.2; }
.trust-card { padding: 32px; }
.trust-link-sub { color: #626962; }

/* Process: one active panel, a larger visual, and controls with a stable home. */
.process-section { min-height: 0; padding-block: clamp(40px, 5vw, 72px); }
.process-container {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "timeline content"
    "timeline controls";
  column-gap: clamp(32px, 4vw, 64px);
  row-gap: 28px;
  width: calc(100% - 2 * clamp(20px, 5vw, 80px));
  max-width: 1480px;
  margin: 0 auto 40px;
  align-items: center;
}
.timeline { grid-area: timeline; }
.steps-content { grid-area: content; min-width: 0; min-height: 0; width: 100%; overflow: hidden; }
.step { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.step-item {
  display: none;
  position: static;
  align-items: center;
  gap: clamp(36px, 4vw, 72px);
  width: 100%;
  transition: none;
}
.step-item.active {
  display: flex;
  animation: process-panel-in 420ms cubic-bezier(.16, 1, .3, 1) both;
}
.step-item .text-block { flex: 1 1 42%; min-width: 0; max-width: 66ch; padding: 0; order: 0; }
.step-item h2 { margin: 0 0 16px; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.2; color: var(--kc-green); text-wrap: balance; }
.step-item p { margin: 0; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.7; }
.step-item img {
  flex: 1 1 54%;
  width: 54%;
  max-width: 650px;
  min-width: 0;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  order: 1;
  margin: 0;
}
@keyframes process-panel-in {
  from { opacity: 0; transform: translateX(18px); clip-path: inset(0 0 0 7%); }
  to { opacity: 1; transform: translateX(0); clip-path: inset(0); }
}
.process-controls {
  grid-area: controls;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 56px;
}
.process-status {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-right: 8px;
  color: #68746e;
  font-variant-numeric: tabular-nums;
}
.process-status strong { color: var(--kc-green); font-size: 20px; }
.process-nav {
  position: static;
  width: 54px;
  height: 54px;
  border: 1px solid var(--kc-green);
  padding: 0;
  transform: none;
  box-shadow: 0 8px 22px rgba(13, 64, 41, .16);
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.process-nav:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(13, 64, 41, .2); }
.process-nav:focus-visible { outline: 3px solid rgba(196, 154, 67, .55); outline-offset: 3px; }
.process-nav:disabled { opacity: .32; box-shadow: none; cursor: not-allowed; }
.nav-prev, .nav-next { left: auto; right: auto; }
.stats .container { gap: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Services: readable content surfaces and naturally wrapping calls to action. */
.service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-grid > :only-child { grid-column: 1 / -1; }
.feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
.info-cards { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.service-section, .service-faq {
  width: calc(100% - 2 * clamp(16px, 4vw, 64px));
  max-width: 1400px;
  background: #fff;
  border-radius: 20px;
  padding: clamp(24px, 3vw, 40px);
  margin: 28px auto;
}
.service-faq .faq-question { gap: 16px; }
.service-faq .faq-toggle { flex-shrink: 0; }
.faq-answer { transition: none; }
.faq-item.active .faq-answer { max-height: none; }
.price-note { flex-wrap: wrap; }
.price-note .price-amount { color: #dfbb74; }
.cta-box-small { white-space: normal; flex-wrap: wrap; }
.cta-box-small span { flex: 1 1 300px; min-width: 0; line-height: 1.6; }
.cta-box-small a { min-height: 48px; color: var(--kc-ink); }
.service-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.service-pager a { min-width: 0; }
.service-pager a:last-child { justify-self: end; text-align: right; }
.service-pager .arrow { flex-shrink: 0; }
.materialy-placeholder, .materialy-placeholder p { color: #626962; }
.materialy-placeholder h2 { color: var(--kc-green); }
.materialy-body { background: #f5f7f4; }
.floating-window.footer-visible { visibility: hidden; pointer-events: none; }
.cert-viewer-wrap { max-width: 760px; }
.cert-preview { display: block; width: 100%; height: auto; }

@media (max-width: 1200px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-links { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); }
  .newsletter h3 { max-width: none; }
  .hero:not(.home-hero) h1 br, .hero:not(.home-hero) .hero-text p br { display: none; }
  .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .values-grid .value-item { border-left: 0; border-top: 0; }
  .values-grid .value-item:nth-child(even) { border-left: 1px solid #e9d9ba; }
  .values-grid .value-item:nth-child(n + 3) { border-top: 1px solid #e9d9ba; }
  .process-container {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "timeline" "content" "controls";
    gap: 24px;
  }
  .timeline { flex-direction: row; justify-content: center; gap: 16px; }
  .timeline::before { display: none; }
  .step { margin: 0; }
  .step span { padding: 12px 18px; font-size: 16px; }
}
@media (max-width: 1000px) {
  .history-content, .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .history-side { max-width: 680px; justify-self: center; }
  .history-image { max-height: 440px; object-fit: cover; }
  .step-item, .step-item.active { flex-direction: column; align-items: stretch; }
  .step-item img { width: 100%; max-width: 760px; max-height: none; object-fit: contain; margin: 0 auto; }
  .process-controls { justify-content: center; }
}
@media (max-width: 767px) {
  .hero:not(.home-hero) .container { padding-bottom: 40px; }
  .hero:not(.home-hero) .hero-text p { font-size: 16px; }
  .hero:not(.home-hero) h1 .italic { font-size: inherit; }
  .values-grid { grid-template-columns: minmax(0, 1fr); }
  .values-grid .value-item { padding: 24px 0; border-left: 0; border-top: 0; }
  .values-grid .value-item + .value-item { border-top: 1px solid #e9d9ba; }
  .value-heading { grid-template-columns: auto minmax(0, 1fr); }
  .value-title { font-size: 26px; }
  .history-section { padding-top: 32px; }
  .history-desc { font-size: 16px; }
  .history-image { max-height: none; }
  .trust-card { padding: 28px 22px; }
  .process-section { padding-block: 32px; }
  .process-container { margin-bottom: 28px; }
  .step-item.active { animation-duration: 300ms; }
  .step-item p { font-size: 16px; }
  .stats .container { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-top { padding-inline: 24px; }
  .footer-links { grid-template-columns: minmax(0, 1fr); gap: 28px; text-align: center; }
  .newsletter { text-align: center; }
  .newsletter-unavailable { margin-inline: auto; }
  .footer-links a { min-height: 44px; }
  .blog-actions a { text-align: center; }
}
@media (max-width: 600px) {
  .history-stats .container { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature-list, .service-grid { grid-template-columns: minmax(0, 1fr); }
  .services-hero { min-height: 0; }
  .services-hero .container { padding: 40px 24px; }
  .services-hero h1 { font-size: clamp(28px, 7vw, 36px); line-height: 1.2; }
  .services-hero p { font-size: 16px; }
  .service-section h2, .service-faq h2 { font-size: 26px; line-height: 1.3; }
  .service-pager { grid-template-columns: minmax(0, 1fr); }
  .cta-box-small { padding: 24px 0; }
  .cta-box-small span { flex-basis: auto; }
  .cta-box-small a { width: 100%; }
  .timeline { gap: 10px; }
  .step span { padding: 10px 14px; font-size: 14px; }
}
@media (pointer: coarse) {
  .footer-links a { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .step-item, .process-nav, .timeline::before { transition: none; animation: none; }
}
