/* KONTAFIN – wersja 6 */

:root{
  --accent:#ef2b14;
  --accent-dark:#c91f0b;
  --text:#151515;
  --muted:#565656;
  --border:#e5e5e5;
  --bg:#ffffff;
  --soft:#f6f6f6;
  --max-width:1400px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.55;
}

a{color:inherit}
img{display:block;max-width:100%}

.container{
  width:min(calc(100% - 60px),var(--max-width));
  margin:0 auto;
}

/* HEADER */
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid var(--border);
  box-shadow:0 2px 10px rgba(0,0,0,.03);
}

.header-inner{
  min-height:82px;
  display:flex;
  align-items:center;
  gap:24px;
}

.brand{
  display:flex;
  align-items:center;
  gap:22px;
  min-width:0;
  text-decoration:none;
}

.logo-img{
  width:190px;
  height:auto;
  flex:0 0 auto;
}

.brand-name{
  font-size:1rem;
  font-weight:700;
  white-space:nowrap;
}

.main-nav{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:38px;
}

.main-nav a{
  position:relative;
  padding:30px 0 24px;
  text-decoration:none;
  font-size:.88rem;
  font-weight:800;
  text-transform:uppercase;
}

.main-nav a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:15px;
  height:3px;
  background:var(--accent);
  transform:scaleX(0);
  transition:transform .2s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after{
  transform:scaleX(1);
}

.menu-toggle{
  display:none;
  margin-left:auto;
  width:42px;
  height:42px;
  padding:7px;
  border:0;
  background:transparent;
  cursor:pointer;
}

.menu-toggle span{
  display:block;
  height:2px;
  margin:6px 0;
  background:var(--text);
}

/* HERO */
.hero{
  border-bottom:1px solid var(--border);
  background:#fff;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(420px,34%) minmax(0,66%);
  min-height:420px;
}

.hero-copy-wrap{
  display:flex;
  align-items:center;
  background:linear-gradient(90deg,#fff 0%,#f7f7f7 100%);
}

.hero-copy{
  width:min(calc(100% - 44px),500px);
  margin-left:max(30px,calc((100vw - 1400px)/2));
  padding:52px 0;
}

.hero h1{
  margin:0;
  max-width:470px;
  font-size:clamp(3rem,4.6vw,4.9rem);
  line-height:1.02;
  letter-spacing:-.045em;
}

.hero h1 span{
  display:block;
  color:var(--accent);
}

.hero-line{
  width:58px;
  height:3px;
  margin:24px 0 24px;
  background:var(--accent);
}

.hero-text{
  max-width:430px;
  margin:0;
  color:#343434;
  font-size:1.12rem;
  line-height:1.6;
}

.hero-actions{margin-top:26px}

.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:50px;
  padding:0 24px;
  border-radius:4px;
  text-decoration:none;
  font-weight:800;
  text-transform:uppercase;
  font-size:.88rem;
  transition:.2s ease;
}

.button-primary{
  color:#fff;
  background:var(--accent);
  box-shadow:0 8px 22px rgba(239,43,20,.18);
}

.button-primary:hover{
  transform:translateY(-2px);
  background:var(--accent-dark);
}

.mail-icon{
  font-size:1.05rem;
}

.hero-photo-wrap{
  min-width:0;
  overflow:hidden;
  background:#ddd;
}

.hero-photo{
  width:100%;
  height:100%;
  min-height:420px;
  object-fit:cover;
  object-position:center;
}

/* MAIN CONTENT */
.main-content{
  background:#fff;
}

.content-grid{
  display:grid;
  grid-template-columns:minmax(300px,34%) minmax(0,66%);
  column-gap:46px;
  row-gap:0;
  padding-top:24px;
}

.content-panel{
  padding:0 0 24px;
}

.about-panel{
  grid-column:1;
}

.offer-panel{
  grid-column:2;
}

.contact-panel{
  grid-column:1 / -1;
  padding-top:10px;
  border-top:1px solid var(--border);
}

.compact-heading{
  margin-bottom:14px;
}

.compact-heading h2{
  display:inline-block;
  position:relative;
  margin:0;
  padding-bottom:8px;
  font-size:1.58rem;
  line-height:1.1;
}

.compact-heading h2::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:42px;
  height:2px;
  background:var(--accent);
}

.about-panel p{
  margin:0 0 22px;
  color:#2f2f2f;
  font-size:.98rem;
}

/* OFFER */
.compact-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.card{
  min-height:210px;
  padding:22px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:3px;
  box-shadow:0 3px 12px rgba(0,0,0,.045);
  transition:.2s ease;
}

.card:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 20px rgba(0,0,0,.07);
}

.service-icon{
  width:50px;
  height:50px;
  margin-bottom:12px;
}

.service-icon svg{
  width:50px;
  height:50px;
  fill:none;
  stroke:var(--accent);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.card h3{
  margin:0 0 12px;
  font-size:1.08rem;
}

.card p{
  margin:0;
  color:#282828;
  font-size:.96rem;
}

/* CONTACT */
.contact-layout{
  display:grid;
  grid-template-columns:minmax(460px,39%) minmax(0,61%);
  gap:28px;
  align-items:stretch;
}

.contact-info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}

.contact-block{
  display:flex;
  gap:12px;
  padding:18px 18px 18px 0;
  min-height:92px;
  border-right:1px solid var(--border);
}

.contact-block:nth-child(2n){
  padding-left:18px;
  border-right:0;
}

.contact-symbol{
  flex:0 0 26px;
  color:var(--accent);
  font-size:1.55rem;
  line-height:1.2;
}

.contact-block strong,
.contact-block span,
.contact-block a{
  display:block;
  text-decoration:none;
  font-size:.92rem;
}

.contact-block a:hover{color:var(--accent)}

.phones{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.map-wrap{
  min-height:180px;
  border:1px solid var(--border);
  overflow:hidden;
  background:#eee;
}

.map-wrap iframe{
  display:block;
  width:100%;
  min-height:180px;
  height:100%;
  border:0;
}

/* FOOTER */
.site-footer{
  margin-top:14px;
  padding:28px 0;
  background:#11171c;
  color:#fff;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.25fr 1.15fr .75fr 1fr;
  gap:34px;
  align-items:start;
}

.footer-col{
  min-height:86px;
  padding-right:28px;
  border-right:1px solid rgba(255,255,255,.18);
}

.footer-col:last-child{
  padding-right:0;
  border-right:0;
}

.footer-col strong{
  display:block;
  margin-bottom:7px;
  font-size:.92rem;
}

.footer-col p{
  margin:2px 0;
  color:#ececec;
  font-size:.84rem;
  line-height:1.45;
}

.footer-col a{
  text-decoration:none;
}

.footer-main a[href*="kontafin.pl"]:last-child{
  color:var(--accent);
  font-weight:700;
}

.footer-copy{
  align-self:end;
  text-align:right;
}

/* RESPONSIVE */
@media(max-width:1120px){
  .brand-name{display:none}
  .main-nav{gap:26px}
  .content-grid{
    grid-template-columns:1fr;
    row-gap:24px;
  }
  .about-panel,
  .offer-panel,
  .contact-panel{
    grid-column:1;
  }
  .contact-layout{
    grid-template-columns:1fr;
  }
}

@media(max-width:820px){
  .container{
    width:min(calc(100% - 32px),var(--max-width));
  }

  .header-inner{min-height:74px}
  .logo-img{width:165px}

  .menu-toggle{display:block}

  .main-nav{
    display:none;
    position:absolute;
    top:74px;
    left:0;
    right:0;
    padding:14px 20px 20px;
    flex-direction:column;
    align-items:flex-start;
    gap:2px;
    background:#fff;
    border-bottom:1px solid var(--border);
  }

  .main-nav.is-open{display:flex}

  .main-nav a{
    width:100%;
    padding:9px 0;
  }

  .main-nav a::after{
    right:auto;
    bottom:2px;
    width:45px;
  }

  .hero-grid{
    grid-template-columns:1fr;
  }

  .hero-copy{
    width:min(calc(100% - 32px),680px);
    margin:0 auto;
    padding:48px 0;
  }

  .hero-photo{
    min-height:320px;
  }

  .compact-cards{
    grid-template-columns:1fr;
  }

  .card{
    min-height:auto;
  }

  .contact-info-grid{
    grid-template-columns:1fr;
  }

  .contact-block,
  .contact-block:nth-child(2n){
    padding:16px 0;
    border-right:0;
    border-bottom:1px solid var(--border);
  }

  .contact-block:last-child{
    border-bottom:0;
  }

  .footer-grid{
    grid-template-columns:1fr 1fr;
  }

  .footer-col:nth-child(2){
    border-right:0;
  }

  .footer-copy{
    text-align:left;
  }
}

@media(max-width:520px){
  .hero h1{
    font-size:clamp(2.65rem,13vw,3.8rem);
  }

  .hero-photo{
    min-height:250px;
  }

  .footer-grid{
    grid-template-columns:1fr;
  }

  .footer-col{
    padding:0 0 18px;
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.18);
  }

  .footer-col:last-child{
    padding-bottom:0;
    border-bottom:0;
  }
}

/* Korekta hero – wybrany obraz i mniejsza wysokość */
.hero-grid{
  min-height:360px;
}
.hero-photo{
  min-height:360px;
  object-fit:cover;
  object-position:center center;
}
.hero-copy{
  padding:42px 0;
}
@media(max-width:820px){
  .hero-photo{
    min-height:270px;
  }
}
@media(max-width:520px){
  .hero-photo{
    min-height:220px;
  }
}

/* Korekta v6.2 – więcej miejsca na tekst i mniejsze zdjęcie */
.hero-grid{
  grid-template-columns:minmax(500px,42%) minmax(0,58%);
  min-height:330px;
}

.hero-copy{
  width:min(calc(100% - 54px),570px);
  padding:34px 0 38px;
}

.hero h1{
  max-width:560px;
  font-size:clamp(2.75rem,3.65vw,4.15rem);
  line-height:1.01;
  letter-spacing:-.04em;
}

.hero h1 span{
  display:inline;
}

.hero-line{
  margin:18px 0 18px;
}

.hero-text{
  max-width:500px;
  font-size:1.04rem;
}

.hero-actions{
  margin-top:20px;
}

.hero-photo-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:330px;
  background:#fff;
  overflow:hidden;
}

.hero-photo{
  width:100%;
  height:auto;
  min-height:0;
  max-height:330px;
  object-fit:contain;
  object-position:center;
}

@media(max-width:1000px){
  .hero-grid{
    grid-template-columns:minmax(420px,45%) minmax(0,55%);
  }

  .hero h1{
    font-size:clamp(2.55rem,4.5vw,3.6rem);
  }
}

@media(max-width:820px){
  .hero-grid{
    grid-template-columns:1fr;
  }

  .hero-copy{
    width:min(calc(100% - 32px),680px);
    padding:42px 0;
  }

  .hero h1{
    font-size:clamp(2.7rem,10vw,4rem);
  }

  .hero-photo-wrap{
    min-height:0;
  }

  .hero-photo{
    width:100%;
    max-height:none;
    height:auto;
  }
}

/* ===== v6.4 FINAL – dopracowanie techniczne ===== */

/* Po kliknięciu menu nagłówek nie zasłania początku sekcji */
#start,
#o-nas,
#oferta,
#kontakt{
  scroll-margin-top:96px;
}

/* Czytelny focus dla obsługi klawiaturą */
a:focus-visible,
button:focus-visible{
  outline:3px solid rgba(239,43,20,.35);
  outline-offset:4px;
}

/* Ograniczenie animacji dla użytkowników, którzy tego oczekują */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,
  *::before,
  *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}


/* ===== v6.5 – prywatność i mapa ładowana na żądanie ===== */

.map-consent{
  display:block;
  min-height:180px;
}

.map-placeholder{
  min-height:180px;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:
    linear-gradient(rgba(255,255,255,.82),rgba(255,255,255,.82)),
    repeating-linear-gradient(45deg,#e9e9e9 0 10px,#f2f2f2 10px 20px);
}

.map-placeholder-inner{
  max-width:520px;
  text-align:center;
}

.map-pin{
  color:var(--accent);
  font-size:2rem;
  line-height:1;
  margin-bottom:5px;
}

.map-placeholder strong{
  display:block;
  margin-bottom:5px;
  font-size:1rem;
}

.map-placeholder p{
  margin:0 auto 12px;
  color:#555;
  font-size:.82rem;
  line-height:1.45;
}

.map-load-button{
  min-height:38px;
  padding:0 18px;
  border:0;
  border-radius:3px;
  background:var(--accent);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.map-load-button:hover{
  background:var(--accent-dark);
}

.privacy-inline-link{
  display:block;
  margin-top:9px;
  font-size:.78rem;
  color:#555;
}

.footer-privacy-link{
  display:inline-block;
  margin-top:8px;
  text-decoration:underline !important;
  text-underline-offset:3px;
}

.privacy-nav{
  margin-left:auto;
}

.privacy-nav a{
  color:var(--text);
  text-decoration:none;
  font-size:.9rem;
  font-weight:700;
}

.privacy-nav a:hover{
  color:var(--accent);
}

.privacy-main{
  background:#fff;
}

.privacy-content{
  max-width:980px;
  padding-top:60px;
  padding-bottom:70px;
}

.privacy-title{
  padding-bottom:32px;
  margin-bottom:34px;
  border-bottom:1px solid var(--border);
}

.privacy-kicker{
  margin:0 0 8px;
  color:var(--accent);
  font-size:.82rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.privacy-title h1{
  margin:0;
  font-size:clamp(2.2rem,5vw,3.8rem);
  line-height:1.05;
  letter-spacing:-.04em;
}

.privacy-lead{
  max-width:760px;
  margin:20px 0 0;
  color:#555;
  font-size:1.05rem;
}

.privacy-content section{
  margin:0 0 38px;
  scroll-margin-top:100px;
}

.privacy-content h2{
  margin:0 0 12px;
  font-size:1.35rem;
}

.privacy-content p{
  margin:0 0 13px;
  color:#343434;
}

.privacy-content a{
  color:var(--accent-dark);
}

.privacy-date{
  font-weight:700;
}

.privacy-footer{
  margin-top:0;
}

.privacy-footer p{
  margin:0;
  color:#ddd;
  font-size:.85rem;
}

@media(max-width:520px){
  .privacy-content{
    padding-top:38px;
    padding-bottom:48px;
  }

  .privacy-nav a{
    font-size:.8rem;
  }
}
