.root-fallback{display:block}
:root{
  --primary: #c41e2b; /* czerwony */
  --primary-contrast: #ffffff;
  --muted: #fff6f6;
  --muted-2: #f9f0f0;
  --accent: #7a0f12;
  --footer-red-1: #c1121f;
  --footer-red-2: #e11d48;
  --footer-text-light: rgba(255,255,255,0.95);
  --radius: 10px;
  --max-width: 960px;
}
*{box-sizing:border-box}
body{font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; margin:0; color:#0b0b0b; background:#fff}
.site-header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;background:linear-gradient(90deg,var(--primary) 0%, rgba(0,0,0,0.06) 100%);color:var(--primary-contrast)}
.brand{display:flex;align-items:center;gap:14px}
.brand img{width:72px;height:72px;max-width:100%;height:auto;object-fit:cover;border-radius:8px;border:3px solid rgba(255,255,255,0.15);background:var(--muted)}
.brand h1{margin:0;font-size:20px}
.nav a{color:#000;text-decoration:none;margin-left:12px;padding:6px 8px;border-radius:6px}
.nav a:hover{background:rgba(0,0,0,0.06)}

/* Mobile nav toggle button */
.nav-toggle{display:none;background:transparent;border:0;color:var(--primary-contrast);font-size:22px;padding:8px;border-radius:6px}
.nav-toggle:focus{outline:2px solid rgba(255,255,255,0.12)}
.site-header .brand h1{color:var(--primary-contrast)}
.hero{padding:48px 24px;text-align:center;background:linear-gradient(180deg,rgba(255,255,255,0.06),transparent)}
.hero h2{font-size:28px;margin:0 0 8px}
.hero p{margin:0 0 18px;color:rgba(0,0,0,0.7)}
.cta{display:inline-block;background:var(--primary-contrast);color:var(--primary);padding:10px 18px;border-radius:8px;text-decoration:none;font-weight:600;box-shadow:0 6px 18px rgba(196,30,43,0.14)}
.content{max-width:var(--max-width);margin:28px auto;padding:0 18px}

/* Services / hero cards */
.services .content{max-width:var(--max-width);margin:0 auto;padding:0 18px;text-align:center}
.services .lead{color:rgba(0,0,0,0.7);margin-top:6px}
.services .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;margin:20px auto 18px;justify-content:center;justify-items:center;width:100%;max-width:var(--max-width)}
.services .card{background:var(--muted-2);border-radius:12px;padding:16px;box-shadow:0 8px 24px rgba(0,0,0,0.04);text-align:center;display:flex;flex-direction:column;gap:8px;align-items:center}
.services .card h3{margin:0;font-size:18px;color:#111}
.services .card p{margin:0;color:#333;font-size:14px;line-height:1.45}
.services .card-icon{width:64px;height:64px;border-radius:10px;background:linear-gradient(135deg, rgba(196,30,43,0.06), rgba(255,255,255,0.02));display:flex;align-items:center;justify-content:center;margin:0 auto}
.services .card svg{display:block}

/* Vertically center hero services on the page */
.hero.services{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:60vh;padding-top:28px;padding-bottom:28px}

/* About two-column layout: text left, image right */
.about-grid{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start;max-width:var(--max-width);margin:28px auto;padding:0 18px}
.about-text p{color:#111;line-height:1.6;margin:10px 0}
.about-image img{width:100%;height:auto;border-radius:8px;box-shadow:0 8px 20px rgba(0,0,0,0.08);display:block}
.about-image .image-note{font-size:13px;color:#666;margin-top:8px;text-align:center}

@media(max-width:880px){
  .about-grid{grid-template-columns:1fr;}
  .about-image{order:2;margin-top:8px}
  .about-image img{max-width:420px;margin:0 auto}
}

/* Layout helper — sticky footer: main grows, footer stays at bottom when content short */
html{min-height:100%;}
body{display:flex;flex-direction:column;min-height:100vh}
main{flex:1}

.contact-section form{display:grid;gap:12px;max-width:720px}
label{display:block;font-size:14px}
input[type="text"],input[type="email"],textarea{width:100%;padding:12px;border-radius:8px;border:1px solid #e8d6d6;background:var(--muted-2)}
.form-actions{display:flex;align-items:center;gap:12px}
.btn{background:var(--accent);color:var(--primary-contrast);border:none;padding:10px 14px;border-radius:8px;cursor:pointer}
.btn.secondary{background:transparent;color:var(--primary-contrast);border:1px solid rgba(255,255,255,0.15)}
.form-status{font-size:14px;color:var(--accent)}
/* Footer: background drawn by ::before for full-bleed; keep container transparent */
.site-footer{position:relative;z-index:1;padding:28px 18px 18px;text-align:center;margin-top:24px;background:transparent;color:var(--footer-text-light);box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);overflow:visible}
/* make footer full-bleed across viewport (ignore parent centering) */
.site-footer::before{content:"";display:block;position:absolute;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw;top:0;bottom:0;background:linear-gradient(90deg,var(--footer-red-1) 0%, var(--footer-red2, var(--footer-red-2)) 100%);z-index:-1;opacity:0.96}

/* Footer top area: grid with contact + socials, visually separated */
.footer-top{max-width:var(--max-width);margin:0 auto;padding:12px 18px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid rgba(255,255,255,0.06)}
.footer-grid{display:flex;align-items:center;gap:18px;flex:1;min-width:0}
.footer-col{flex:1;min-width:160px;max-width:520px;padding:6px 8px}
.footer-col.contact-col{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.footer-socials-col{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:120px}
.footer-col h4{margin:0 0 .2rem 0;font-size:1rem}
.site-footer .footer-grid,.site-footer .footer-col{box-sizing:border-box}
.footer-col p, .footer-col a{color:var(--footer-text-light);font-size:.95rem;line-height:1.4;margin:2px 0}
.footer-col a{display:inline-block;margin:0;padding:0;text-decoration:none}
.site-footer a{margin-left:0 !important;padding-left:0 !important}
.site-footer p{margin-left:0 !important;margin-right:0 !important}

/* Details row below the main footer-top */
.footer-details{max-width:var(--max-width);margin:14px auto 8px auto;padding:8px 18px;text-align:center;background:transparent}
.footer-details p{margin:0;color:rgba(255,255,255,0.92);font-size:0.95rem}
.footer-details .fd-item{display:inline-block;margin:0 8px}
.footer-details .fd-sep{margin:0 10px;color:rgba(255,255,255,0.7)}
.site-footer .footer-details a{color:inherit;text-decoration:none;border-bottom:0}
.site-footer .footer-details a:hover{text-decoration:underline;color:inherit}

.footer-bottom{
  margin:8px auto 0 auto;
  padding-top:10px;
  text-align:center;
  color:rgba(255,255,255,0.85);
  font-size:.9rem;
  max-width:720px;
}

/* New: footer details inline layout and email style */
.footer-details{max-width:var(--max-width);margin:8px auto 0 auto;padding:6px 12px;text-align:center}
.footer-details p{margin:0;color:var(--footer-text-light);font-size:0.95rem;line-height:1.4}
.footer-details .fd-item{display:inline-block;margin:0 6px}
.footer-details .fd-sep{margin:0 8px;color:rgba(255,255,255,0.75)}
.site-footer .footer-details a{color:inherit;text-decoration:none;border-bottom:0}
.site-footer .footer-details a:hover{text-decoration:underline;color:inherit}

/* Social icon in footer */
.footer-col .socials{margin-top:6px}
.footer-social{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;background:rgba(255,255,255,0.06);margin:8px auto;color:var(--footer-text-light);text-decoration:none;transition:background .12s ease,transform .08s ease}
.footer-social svg{width:20px;height:20px;display:block;fill:var(--footer-text-light)}
.footer-social:hover{background:rgba(255,255,255,0.12);transform:translateY(-2px)}


@media(min-width:900px){
  .site-header{padding:22px 48px}
  .hero h2{font-size:36px}
}

@media(max-width:800px){
  .footer-grid{flex-direction:column;gap:12px;align-items:center}
  .footer-col{max-width:100%;text-align:center}
  /* center socials under contact on small screens */
  .footer-socials-col{display:flex;text-align:center;justify-content:center;align-items:center;padding-top:0;margin-top:6px;width:100%}
  /* ensure contact column stacks and centers neatly */
  .contact-col{display:flex;flex-direction:column;align-items:center;gap:6px}
  .contact-col p, .contact-col a{ text-align:center !important }
  /* small visual tweak for the icon */
  .footer-social{margin:6px 0 0 0;line-height:0}
  /* footer bottom full width and a subtler divider on small screens */
  .footer-bottom{width:100%;padding-top:10px;border-top:1px solid rgba(255,255,255,0.06);margin-top:12px}
}

/* On wide screens keep left-aligned contact text; on small screens allow centering */
@media(min-width:801px){
  .contact-col p, .contact-col a{ text-align:left !important }
}

/* Make social column a flex container so icon vertically centers with the contact column */
.footer-socials-col{display:flex;align-items:center;justify-content:flex-end}

/* Tweak icon sizing and spacing to align visually with contact text */
.footer-social{width:40px;height:40px;border-radius:8px;background:rgba(255,255,255,0.06);display:inline-flex;align-items:center;justify-content:center;margin:0}
.footer-social svg{width:18px;height:18px;fill:var(--footer-text-light);display:block}

/* Smaller screens: center socials under contact */
@media(max-width:800px){
  .footer-socials-col{justify-content:center}
  .contact-col p, .contact-col a{ text-align:center !important }
}

/* Responsive header and navigation */
@media(max-width:880px){
  .site-header{padding:14px 16px}
  .brand h1{font-size:18px}
  .brand img{width:56px;height:56px}
  .nav{position:fixed;top:64px;right:12px;background:var(--primary);color:var(--primary-contrast);padding:12px;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,0.12);display:flex;flex-direction:column;gap:8px;transform:translateY(-10px);opacity:0;visibility:hidden;transition:opacity .18s ease,transform .18s ease,visibility .18s}
  .nav{z-index:9999}
  .nav a{color:var(--primary-contrast);margin:0;padding:8px 10px}
  .nav-open .nav{opacity:1;visibility:visible;transform:translateY(0)}
  .nav-toggle{display:inline-flex}
  /* Prevent body scroll when mobile nav is open */
  .nav-open{overflow:hidden}
  /* Ensure nav-toggle is visible and on top of fixed nav */
  .nav-toggle{position:relative;z-index:10001}
  /* hide original inline nav on very small screens when closed */
}

/* Very short viewport: reduce header and hero height, force hamburger nav */
@media (max-height:620px){
  .site-header{padding:8px 12px}
  .brand img{width:42px;height:42px}
  .brand h1{display:none}
  .hero.services{min-height:36vh;padding-top:12px;padding-bottom:12px}
  .hero{padding:18px 12px}
  .nav-toggle{display:inline-flex}
  .nav{position:fixed;top:52px;right:10px;left:auto;padding:10px;transform:translateY(-8px);opacity:0;visibility:hidden}
  .nav-open .nav{opacity:1;visibility:visible;transform:translateY(0)}
  .site-footer{padding:14px 10px}
  .footer-details{font-size:0.88rem;padding:6px 8px}
  .services .cards{grid-template-columns:1fr}
}

/* Combine small width+height edge cases: ensure nav toggle always visible */
@media (max-width:980px) and (max-height:700px){
  .nav-toggle{display:inline-flex}
  .brand h1{display:none}
  .brand img{width:44px;height:44px}
}

@media(max-width:480px){
  .hero h2{font-size:22px}
  .hero{padding:28px 12px}
  .cta{padding:8px 12px}
}

/* Responsywne: na węższych ekranach przełącz na siatkę elastyczną */
@media(max-width:980px){
  .services .cards{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}
}

/* Page-specific improvements */
.inpage-nav{display:flex;gap:18px;flex-wrap:wrap;justify-content:flex-start;align-items:center;max-width:var(--max-width);margin:18px auto;padding:0 18px}
.inpage-nav a{color:#222;text-decoration:none;padding:8px 10px;border-radius:6px;font-weight:600}
.inpage-nav a:hover{background:rgba(196,30,43,0.06)}

.content h2{font-size:22px;margin:0 0 12px;color:#0b0b0b}
.content h3,.project h3{font-size:18px;margin:8px 0}
.project{background:#fff;border-radius:10px;padding:14px;border:1px solid #f0e6e6;margin:12px 0;box-shadow:0 4px 10px rgba(0,0,0,0.04)}

.gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.gallery figure{background:#fff;padding:8px;border-radius:8px;border:1px solid #f3e9e9;display:flex;flex-direction:column}
.gallery img{width:100%;height:160px;object-fit:cover;border-radius:6px;display:block}
.gallery .svg-card{display:flex;align-items:center;justify-content:center;height:160px;border-radius:6px;background:linear-gradient(180deg, rgba(196,30,43,0.04), rgba(255,255,255,0.02));}
.gallery figcaption{font-size:13px;color:#444;margin-top:8px;text-align:left}

.contact-cta{background:transparent;padding:18px 0}
.contact-cta .cta{background:var(--primary);color:var(--primary-contrast);box-shadow:none}

/* Make header brand a bit larger on wide screens */
@media(min-width:900px){
  .brand img{width:86px;height:86px}
  .brand h1{font-size:22px}
}

/* Small tweaks for print and accessibility */
@media print{
  .site-header,.site-footer,.nav{display:none}
  main{flex:initial}
}

/* Additional responsive improvements */
html{font-size:16px}
/* Fluid heading sizes */
.hero h2{font-size:clamp(20px,4.5vw,36px)}
.content h2{font-size:clamp(20px,3.2vw,28px)}
.content h3,.project h3{font-size:clamp(16px,2.2vw,18px)}

/* Narrower containers on very small screens */
@media(max-width:600px){
  :root{--max-width:640px}
  .brand h1{font-size:16px}
  .brand img{width:48px;height:48px}
  .services .cards{gap:12px}
  .services .cards{grid-template-columns:1fr}
  .inpage-nav{padding:0 12px}
  .gallery figcaption{text-align:center}
  .project figcaption{text-align:center}
  .footer-top{padding:10px}
}

/* Medium screens: two-column layout for services if space allows */
@media(min-width:601px) and (max-width:980px){
  .services .cards{grid-template-columns:repeat(2,minmax(220px,1fr));gap:14px}
  .about-grid{grid-template-columns:1fr}
}

/* Improve mobile nav UX: make it full-height slide-in */
@media(max-width:880px){
  .nav{right:12px;left:12px;top:64px;bottom:20px;padding:18px;overflow:auto}
  .nav a{padding:12px 14px}
  .nav{border-radius:12px}
}
