/* === SafeNest360 – Global Styles === */
:root {
  --navy: #0A2A43;
  --green: #2ECC71;
  --blue: #5FB3E0;
  --light: #F4F7FA;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 { font-weight: 700; }

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

/* Header */
.header { background: var(--white); border-bottom: 1px solid #eaeaea; }
.header-inner {
  display: flex; justify-content: space-between; align-items: center; padding: 15px 0;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 40px; }
.logo span { font-size: 26px; font-weight: 400; }

.nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
}

.btn-outline { padding: 8px 16px; border: 2px solid var(--green); border-radius: 6px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy), #06304f);
  color: var(--white);
  padding: 100px 0;
  text-align: center;
}

.btn-primary {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { transform: scale(1.05); }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--light); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-6px); }

.price { font-weight: 700; color: var(--green); }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.feature { text-align: center; padding: 20px; }

.icon {
  font-size: 40px;
  display: block;
  margin-bottom: 15px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Steps */
.steps { max-width: 700px; margin: auto; }
.steps li { margin-bottom: 15px; }

/* Footer */
.footer { background: var(--navy); color: var(--white); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; }
  .nav a { margin: 10px; }
}

html { scroll-behavior: smooth; }

#scrollTop {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

#scrollTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#scrollTop:hover { transform: translateY(-4px); }

/* === Forms (karty 2 i 3) === */
.service-form { margin-top: 25px; padding-top: 20px; border-top: 1px solid #eaeaea; }
.service-form h4 { margin-bottom: 15px; font-size: 16px; }

.service-form input,
.service-form select,
.service-form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-family: inherit;
}

.service-form textarea { min-height: 90px; resize: vertical; }

.service-form input:focus,
.service-form select:focus,
.service-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.btn-primary.full { width: 100%; }

.rodo { font-size: 13px; margin-bottom: 12px; display: block; }
.rodo a { color: var(--blue); text-decoration: underline; }

.form-note { font-size: 12px; color: #666; margin-top: 10px; }

/* === Toggle Forms === */
.form-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, opacity 0.4s ease;
  opacity: 0;
  margin-top: 20px;
}

.form-wrapper.active { max-height: 2000px; opacity: 1; }

/* File upload */
.file-upload { display: block; font-size: 14px; margin-bottom: 15px; }
.file-upload input[type="file"] { margin-top: 6px; }

/* ==========================================================
   === MODALE (IPKDiR + Polityka) ===
   ========================================================== */
.sn-modal-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.55);
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
}

.sn-modal-overlay.active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sn-modal-dialog{
  width: min(80vw, 1200px);
  min-width: 320px;
  max-height: 86vh;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
}

.sn-modal-header{
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sn-modal-header h4{ margin: 0; font-size: 16px; line-height: 1.2; }

.sn-modal-close{
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
}

.sn-modal-body{ padding: 18px; overflow: auto; }

.sn-badge{
  display: inline-block;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  margin-bottom: 10px;
}

/* Wizard */
.sn-progress{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sn-chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.75);
  user-select: none;
  cursor: pointer;
}

.sn-chip.active{
  background: rgba(0,0,0,.85);
  color: #fff;
}

.sn-step{
  display: none;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 14px;
  background: rgba(0,0,0,.02);
}

.sn-step.active{ display: block; }

.sn-step h5{ margin: 0 0 10px 0; font-size: 15px; }

/* Siatki */
.sn-grid-2{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.sn-grid-3{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

/* Pola modala */
.sn-form input,
.sn-form select,
.sn-form textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: #111;
  box-sizing: border-box;
  margin: 0 0 10px 0;
}

.sn-form textarea{ min-height: 96px; resize: vertical; }

.sn-subtitle{
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,.75);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.sn-actions{
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sn-btn-secondary{
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.2);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.sn-btn-secondary:disabled{ opacity: .5; cursor: not-allowed; }

.sn-rodo{
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sn-rodo input{ margin-top: 2px; }

.sn-note{ font-size: 12px; color: #666; margin-top: 10px; }

.sn-hidden{ display: none !important; }

.sn-ext-row{
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.sn-ext-label{ font-weight: 700; color: rgba(0,0,0,.75); }

.sn-hp{
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

@media (max-width: 980px){
  .sn-modal-dialog{ width: 94vw; }
  .sn-ext-row{ grid-template-columns: 1fr; }
}

/* Stan ładowania przycisku */
.sn-loading{
  opacity: .9;
  pointer-events: none;
}

/* ====== IPKDiR: numer zlecenia w nagłówku ====== */
.sn-orderline{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0,0,0,.65);
}

/* ====== EKRAN STATUSU / WYNIKU ====== */
.sn-result{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 16px;
  background: rgba(0,0,0,.02);
}

.sn-result-meta{
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.04);
  border: 1px dashed rgba(0,0,0,.14);
}

/* === Modal Polityki Prywatności (BEZ IFRAME) – 90% szer./wys. === */
.sn-modal-privacy{
  width: 90vw !important;
  height: 90vh !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
}

.sn-modal-privacy .sn-modal-body{
  overflow: auto;
}

/* Czytelna treść prawna w modalu */
.sn-legal{
  color: rgba(10,42,67,.95);
  font-size: 14px;
  line-height: 1.6;
}

.sn-legal h5{
  margin: 16px 0 8px 0;
  font-size: 15px;
}

.sn-legal h6{
  margin: 14px 0 8px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: rgba(10,42,67,.75);
}

.sn-legal ul{
  margin: 8px 0 12px 18px;
}

.sn-legal li{
  margin: 6px 0;
}
.sn-field{
  display: flex;
  flex-direction: column;
}

.sn-field label{
  margin: 0;          /* zeruje domyślne odstępy */
  padding: 0;
  line-height: 1.1;   /* „zbija” wysokość linii */
}

.sn-field input{
  margin-top: 0;      /* input przylega bezpośrednio do label */
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:url("assets/patterns/hero-grid.svg");
  background-repeat:repeat;
  background-size:520px 520px;
  opacity:.14;
  pointer-events:none;
}
.hero-inner{ position: relative; }
.hero-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:48px;
  align-items:center;
}
.hero-visual{ display:flex; justify-content:flex-end; }
.hero-visual img{
  width:100%;
  max-width:520px;
  height:auto;
  border-radius:14px;
  box-shadow:0 24px 80px rgba(0,0,0,.35);
}
@media (max-width: 900px){
  .hero-grid{ grid-template-columns:1fr; gap:24px; text-align:center; }
  .hero-visual{ justify-content:center; }
}

/* Dodatkowe zmiękczenie krawędzi obrazu (gdyby plik miał twarde brzegi) */
.hero-visual{ position: relative; }
.hero-visual::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: var(--radius-lg, 14px);
  pointer-events:none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline: 3px solid rgba(95,179,224,.55);
  outline-offset: 2px;
}
/* === SafeNest 360: HERO visual - bez ramek/kafla, grafika z alfą === */
.hero{
  background: linear-gradient(135deg, var(--navy), #06304f);
  overflow: hidden;
}
.hero-visual{ position: relative; display:flex; justify-content:flex-end; }
.hero-visual img{
  display:block;
  width:100%;
  max-width: 680px;
  height:auto;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Opcjonalne miękkie znikanie krawędzi (zabezpieczenie) */
@supports (mask-image: radial-gradient(circle, #000 60%, transparent 100%)) {
  .hero-visual img{
    -webkit-mask-image: radial-gradient(circle at 55% 55%, #000 66%, transparent 100%);
    mask-image: radial-gradient(circle at 55% 55%, #000 66%, transparent 100%);
  }
}

/* ==========================================================
   HERO: grafika na pełnej wysokości sekcji + płynne przejście
   - brak ramki, brak "klocka" (zero cieni/obramowań)
   - grafika jest w warstwie tła i zanika do lewej krawędzi
   ========================================================== */

.hero{
  position: relative;
  isolation: isolate; /* gwarantuje poprawne warstwowanie */
}

.hero-media{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.hero-media img{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(520px, 55vw, 980px);
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Płynne przejście pomiędzy tłem hero a grafiką */
@supports (mask-image: linear-gradient(to right, transparent, #000)) {
  .hero-media img{
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 28%, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 28%, #000 100%);
  }
}

/* Dodatkowe miękkie ściemnienie przy lewej krawędzi grafiki (fallback) */
.hero::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(10,42,67,1) 0%, rgba(10,42,67,.96) 28%, rgba(10,42,67,.65) 46%, rgba(10,42,67,0) 70%);
}

.hero-inner,
.hero-grid{
  position: relative;
  z-index: 1;
}

/* Układ: tekst po lewej, grafika po prawej (grafika w tle) */
.hero-grid{
  grid-template-columns: 1.05fr .95fr;
  align-items: stretch;
}

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

@media (max-width: 900px){
  .hero-media img{
    width: 100%;
    left: 0;
    right: 0;
    object-position: center;
  }

  @supports (mask-image: linear-gradient(to bottom, transparent, #000)) {
    .hero-media img{
      -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 100%);
      mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 100%);
    }
  }

  .hero::after{
    background: linear-gradient(180deg, rgba(10,42,67,1) 0%, rgba(10,42,67,.96) 22%, rgba(10,42,67,.65) 42%, rgba(10,42,67,0) 70%);
  }

  .hero-grid{ grid-template-columns: 1fr; }
  .hero-spacer{ display: none; }
}
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-name {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--navy);
  line-height: 1;
}

.logo-name strong {
  font-weight: 800;
  color: var(--green);
}
.footer-logo {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 6px;
}

.footer-logo strong {
  font-weight: 700;
  color: var(--green);
}

/* Załączniki (KT) */
.sn-file-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:8px;
}
.sn-file-row input[type="file"]{
  flex:1;
}


/* ===== Scroll-to-top button ===== */
.sn-to-top{
  position:fixed;
  right:18px;
  bottom:18px;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#ffffff;
  color:#0A2A43;
  box-shadow:0 10px 26px rgba(0,0,0,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
  z-index:9999;
}
.sn-to-top.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.sn-to-top:focus{
  outline:3px solid rgba(0,123,255,.25);
  outline-offset:2px;
}
