html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* To kluczowa linijka - blokuje ruch w bok na poziomie całego dokumentu */
  position: relative;
}
* {
  box-sizing: border-box;
  max-width: 100%; /* Żaden element nie wyjdzie poza ekran */
}

html {
  scroll-behavior: smooth;
}
:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-terminal: #020617;
  --accent-blue: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  --text-pure: #ffffff;
  --text-muted: #94a3b8;
  --border-soft: #334155;
  --font-main: "Inter", sans-serif;
  --font-mono: "Roboto Mono", monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-pure);
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Mniejszy padding na boki dla telefonów */
  width: 100%;
  overflow-x: hidden; /* Dodatkowe zabezpieczenie przed przewijaniem w bok */
}

/* --- POPRAWIONA NAWIGACJA DOCUFLOW --- */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
} /* <--- TEJ KLAMRY BRAKOWAŁO */

body {
  /* Rezerwujemy miejsce, aby Dashboard nie chował się pod paskiem */
  padding-top: 100px; 
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.logo {
  font-size: 1.5rem !important;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
  
  /* KLUCZOWE POPRAWKI: */
  overflow: hidden !important;   /* Zabrania wywietlania pasków przewijania */
  display: flex;                /* Upewnia się, że zawartoć jest wyrównana */
  align-items: center;
  padding: 5px 0;               /* Daje trochę miejsca na cienie/efekty glow */
}

/* Jeli masz efekt hover, który dodaje cień: */
.logo:hover {
  overflow: hidden !important;  /* Podwójne zabezpieczenie */
  scrollbar-width: none;        /* Ukrywa pasek w Firefox */
  -ms-overflow-style: none;     /* Ukrywa pasek w IE/Edge */
}

.logo::-webkit-scrollbar {
  display: none;                /* Ukrywa pasek w Chrome/Safari */
}
.logo span {
  color: var(--accent-blue);
}

/* Jeli masz linki "Lösungen" i "Projekt Anfragen" */
.nav-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* --- USTAWIONA GÓRA DLA KOMPUTERÓW --- */
body {
    /* Jeli Twój pasek na komputerze ma np. 70px, dajemy 90px marginesu */
    padding-top: 90px !important; 
}

/* Jeli chcesz, żeby sam Dashboard zjechał jeszcze niżej: */
.dashboard-container, .main-content {
    margin-top: 20px;
}

@media (max-width: 768px) {
  /* 1. Nowoczesny, "pływajšcy" Navbar */
  .navbar {
    padding: 12px 0 !important;
    background: rgba(15, 23, 42, 0.98) !important; /* Głębszy granat */
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  .nav-container {
    flex-direction: row !important; /* Powrót do linii - profesjonalny wyglšd */
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 20px !important;
  }

  /* 2. Logo - bardziej kompaktowe, ale wyrane */
  .logo {
    font-size: 1.3rem !important;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Efekt gradientu na logo */
  }

  /* 3. Nawigacja jako eleganckie "pigułki" (Pills) */
  .nav-links {
    gap: 6px !important;
  }

  .nav-links a {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
  }

  /* 4. Dashboard - konkretny przycisk akcji */
  .dashboard-btn, .btn-dashboard {
    background: var(--accent-blue) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-top: 0 !important; /* Kasujemy margines, bo zmieci się w linii */
  }

  /* 5. Naprawa widocznoci treci (Safe Area) */
  body {
    padding-top: 80px !important; /* Stały, bezpieczny odstęp */
  }

  /* Dodatkowy odstęp dla samej sekcji Dashboard, żeby "oddychała" */
  .dashboard-container, .main-content {
    padding: 20px 15px !important;
    margin-top: 10px !important;
  }
}


/* --- 03. LAYOUT HERO I TERMINAL --- */
.hero {
  position: relative;
  width: 100%;
  /* Zmiana ze 100vh na 90vh pozwala zobaczyÄ poczÄtek nastÄpnej sekcji */
  min-height: 90vh;
  padding-top: 140px;
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  /* Dodajemy pĹynne przejĹcie tĹa */
  background: radial-gradient(
    circle at 10% 20%,
    rgba(30, 41, 59, 0.5) 0%,
    var(--bg-main) 100%
  );
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.terminal {
  width: 100%;
  max-width: 550px;
  background: var(--bg-terminal);
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
  overflow: hidden;
}
.term-header {
  background: #1e293b;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
.dots {
  display: flex;
  gap: 8px;
  margin-right: 16px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.d-red {
  background: var(--accent-red);
}
.d-yel {
  background: var(--accent-yellow);
}
.d-grn {
  background: var(--accent-green);
}
.term-body {
  padding: 24px;
  font-size: 0.85rem;
  color: #e2e8f0;
}
.code-line {
  margin-bottom: 8px;
  display: block;
}
.cmd {
  color: var(--accent-blue);
  margin-right: 8px;
  font-weight: bold;
}

/* WIELGACHNE LOGO*/
.brand-header {
  all: unset;
  display: block;
  margin-bottom: 30px !important;
}
.logo-monumental {
  height: 180px !important;
  width: auto;
  display: block;
  margin-bottom: 0;
  animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 60px rgba(59, 130, 246, 0.7));
    transform: scale(1.03);
  }
}
.system-ready-pulse {
  margin-top: -10px !important;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-blue);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-blue);
  animation: dotBlink 1.5s infinite;
}
@keyframes dotBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* OFERTY I ICH SZCZEGĂLIKI:) */
.section {
  padding: 100px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-soft);
  padding: 30px;
  border-radius: 12px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.04);
}

.back-link {
  display: inline-block;
  color: var(--accent-blue);
  font-weight: bold;
  font-family: var(--font-mono);
  border: 1px solid var(--border-soft);
  padding: 10px 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
}
.back-link:hover {
  background: var(--accent-blue);
  color: #fff;
}

.system-tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}
.system-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.system-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-blue);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}
.system-img-container {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #000;
}
.system-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: 0.5s;
}
.system-card:hover .system-img-container img {
  opacity: 1;
  transform: scale(1.1);
}

/* FORMULARZ I GUZIKI */
.glass-card-premium {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 4px solid var(--accent-blue);
  padding: 45px;
  border-radius: 24px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px;
  color: #fff;
  transition: border-color 0.3s;
}
.form-input:focus {
  border-color: var(--accent-blue);
  outline: none;
}
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px; /* Lekko zaokrÄglony, nowoczesny kafelek */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font-main);
  text-align: center;
}

/* Niebieski Kafelek Primary */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-blue),
    #2563eb
  ); /* GĹÄbia koloru */
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.2); /* WewnÄtrzny poĹysk kafelka */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  background: linear-gradient(135deg, #4f46e5, var(--accent-blue));
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
  filter: brightness(1.1);
}

/* Niebieski Kafelek Rakieta (Anfrage) */
.btn-glow-rakiete {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1e40af 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-glow-rakiete::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: rotate(45deg);
  transition: 0.6s;
}

.btn-glow-rakiete:hover::after {
  left: 100%; /* Efekt bĹysku na kafelku */
}

.btn-glow-rakiete:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

/* PEĹEN EKRAN */
.fullscreen-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(10, 15, 25, 0.95);
  backdrop-filter: blur(10px);
  padding: 40px;
  justify-content: center;
  align-items: center;
}
.modal-content-wrapper {
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}
#fs-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
}
.fs-caption {
  margin-top: 30px;
}
#fs-title {
  color: var(--accent-blue);
  font-size: 2rem;
  margin-bottom: 10px;
}
.close-fs {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
}

/* CZAS I SIATKA */
.tech-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(59, 130, 246, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
  pointer-events: none;
}
.process-timeline-v2 {
  border-left: 2px solid var(--border-soft);
  padding-left: 30px;
  margin: 20px 0 20px 15px;
}
.timeline-node {
  position: relative;
  margin-bottom: 40px;
  display: flex;
  gap: 20px;
}
.node-icon {
  position: absolute;
  left: -47px;
  width: 32px;
  height: 32px;
  background: var(--bg-main);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
}
.timeline-node.active .node-icon {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-glow);
}
/* WIDOK NA TELEFONIE*/
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .logo-monumental {
    height: 100px !important;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .system-tour-grid {
    grid-template-columns: 1fr;
  }
}

/* --- POWIADOMIENIA FLASH (Alerts) --- */
.alert {
  padding: 15px 25px;
  margin-bottom: 20px;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideInDown 0.5s ease-out forwards;
}

/* Styl dla sukcesu (Zielony/Niebieski Glow) */
.alert-success {
  background: rgba(16, 185, 129, 0.85); /* Szmaragdowa zieleĹ */
  border-left: 5px solid #34d399;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Styl dla bĹÄdu (Czerwony Glow) */
.alert-danger {
  background: rgba(239, 68, 68, 0.85);
  border-left: 5px solid #f87171;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.close-btn {
  margin-left: 15px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.7;
  transition: 0.3s;
}
.close-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

@keyframes slideInDown {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- DISCLAIMER BOX (DocuFlow Standard) --- */
.disclaimer-box {
  background: rgba(245, 158, 11, 0.05); /* Bardzo delikatny bursztynowy */
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 4px solid var(--accent-yellow); /* PomaraĹczowy pasek ostrzegawczy */
  padding: 20px;
  border-radius: 12px;
  margin: 30px 0;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  max-width: 800px;
}

.disclaimer-icon {
  color: var(--accent-yellow);
  font-size: 1.4rem;
  font-weight: bold;
}

.disclaimer-box p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  font-family: var(--font-main);
}

/* --- GLOBALNE ZABEZPIECZENIA (Poza Media Query) --- */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Blokuje pływanie strony na boki w całym systemie */
    position: relative;
}

/* Wymu responsywnoć na głównych kontenerach */
main, section, .content-wrapper, .section {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    display: block;
}

@media (max-width: 768px) {
    
    /* 1. Naprawa układu Hero w index.html */
    .hero-grid {
        display: flex !important;
        flex-direction: column !important; /* Logo pod tekst */
        text-align: center;
        gap: 30px;
        padding: 40px 15px !important;
    }

    .hero-content h1 {
        font-size: 1.8rem !important; /* Zmniejszenie ogromnego tytułu */
        line-height: 1.2 !important;
    }

    .hero-visual img {
        max-width: 80% !important; /* Skalowanie logo J.C. Development */
        height: auto !important;
        margin: 0 auto;
    }

    /* 2. Naprawa Sekcji Oferty (grid-3) */
    .grid-3 {
        display: flex !important;
        flex-direction: column !important; /* Karty jedna pod drugš */
        gap: 20px;
        padding: 0 10px;
    }

    .card {
        width: 100% !important;
        margin-bottom: 10px;
    }

    h2 {
        font-size: 1.7rem !important; /* Zmniejszenie nagłówka sekcji */
        margin-bottom: 30px !important;
    }

    /* 3. Naprawa Przycisku DocuFlow (Rakieta) */
    .btn-glow-rakiete, .btn {
        width: 100% !important;
        display: block !important;
        font-size: 1.1rem !important;
        padding: 15px !important;
        text-align: center;
        margin: 20px auto !important;
    }

    /* 4. Dane użytkownika i systemowe */
    .user-name, .user-role, .user-id {
        font-size: 14px !important;
        word-break: break-all;
        display: block;
        margin-bottom: 8px;
        text-align: center;
    }

    /* 5. Formularze i Pola tekstowe */
    input, textarea, select {
        width: 100% !important;
        font-size: 16px !important; /* Blokuje ucišżliwy auto-zoom na iPhone */
        margin-bottom: 15px;
    }

    /* Usuwamy zbyt duże marginesy z desktopa */
    div[style*="margin-bottom: 80px"] {
        margin-bottom: 30px !important;
    }
}

/* Jeli używasz flex-row dla układów poziomych */
.flex-row {
    display: flex;
    flex-wrap: wrap; 
}