
/* =========================================
   1. RESET & BASE STYLES
   ========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
  /* TŁO GŁÓWNE: Ciemny granat + Siatka + Ambientowe światła */
  background-color: #02040a;
  background-image: 
    /* Subtelna siatka (grid) */
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    /* Ambientowe światło: Fiolet (lewa góra) i Błękit (prawy dół) */
    radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.12) 0%, transparent 40%);
  background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%;
  background-attachment: fixed; /* Tło nieruchome przy przewijaniu */
  
  color: #f5f7fb;
  line-height: 1.6;
}

/* =========================================
   2. LAYOUT & CONTAINERS
   ========================================= */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =========================================
   3. NAVIGATION (TOP BAR)
   ========================================= */

.top-bar {
  background: rgba(2, 4, 10, 0.75); /* Półprzezroczyste tło */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px); /* Rozmycie tła pod spodem */
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  color: #4cc9ff;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(76, 201, 255, 0.3); /* Lekki blask logo */
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.96rem;
}

.nav a {
  color: #e2e8ff;
  text-decoration: none;
  position: relative;
  padding-bottom: 0.25rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* Animowana linia pod linkami */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4cc9ff, #a78bfa);
  border-radius: 999px;
  transition: width 0.18s ease-out;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

.nav a:hover,
.nav a:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.55rem 1rem 0.6rem;
  }

  .nav {
    gap: 0.9rem;
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 0.9rem;
  }
}

/* =========================================
   4. HERO SECTION & ANIMATIONS
   ========================================= */

.hero {
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden; /* Przycinanie wystających grafik */
  z-index: 1;
}

/* GRAFIKA: Molekuła / Sieć po prawej stronie */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5%; /* Wystaje poza prawą krawędź */
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  z-index: -1; /* Pod tekstem */
  opacity: 0.5;
  pointer-events: none;
  
  /* Zakodowany SVG (Sześciokąty i linie) */
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg stroke='%2338bdf8' stroke-width='1.5' opacity='0.6'%3E%3Cpath d='M100 0L0 173.2h200L100 0z' opacity='.1'/%3E%3Cpath d='M100 34.6L20 173.2h160L100 34.6z' opacity='.2'/%3E%3Ccircle cx='100' cy='100' r='4' fill='%23a78bfa' stroke='none'/%3E%3Ccircle cx='100' cy='34.6' r='3' fill='%2338bdf8' stroke='none'/%3E%3Ccircle cx='20' cy='173.2' r='3' fill='%2338bdf8' stroke='none'/%3E%3Ccircle cx='180' cy='173.2' r='3' fill='%2338bdf8' stroke='none'/%3E%3Cpath d='M100 100l40 69.2H60L100 100z'/%3E%3Cpath d='M100 100L60 30.8h80L100 100z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  
  /* Animacja */
  animation: floatMolecule 8s ease-in-out infinite;
}

/* Poświata (Glow) pod grafiką */
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(124, 58, 237, 0.05) 40%, transparent 70%);
  z-index: -2;
  filter: blur(50px);
}

/* Definicja animacji */
@keyframes floatMolecule {
  0% { transform: translateY(-50%) rotate(0deg); }
  50% { transform: translateY(-55%) rotate(2deg); }
  100% { transform: translateY(-50%) rotate(0deg); }
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr); /* Tekst po lewej */
  row-gap: 1.75rem;
  position: relative;
}

.breadcrumb {
  font-size: 0.9rem;
  color: #9ca8c8;
  margin-bottom: 0.75rem;
  font-family: monospace;
  opacity: 0.8;
}

.breadcrumb a {
  color: #c4d0ff;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #4cc9ff;
}

.hero-heading {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  
  /* Gradient na tekście nagłówka */
  background: linear-gradient(to right, #ffffff 20%, #cbd5e1 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-heading span.highlight {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: #dbeafe;
  font-weight: 500;
}

.hero-lead {
  margin-top: 0.85rem;
  font-size: 1rem;
  color: #94a3b8;
  max-width: 60ch;
}

/* Hero CTA Box */

.hero-cta-block {
  margin-top: 1.8rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  max-width: 90%;
}

.hero-cta-block::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #4cc9ff, #a78bfa);
}

.hero-cta-text {
  font-size: 1rem;
  color: #e2e8ff;
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

@media (max-width: 640px) {
  .hero {
    padding: 2.5rem 0 2rem;
  }
  /* Przesunięcie grafiki na mobilkach, żeby nie zasłaniała tekstu */
  .hero::after {
    right: -30%;
    top: 30%;
    width: 300px;
    height: 300px;
    opacity: 0.25;
  }
  .hero-heading {
    font-size: 1.9rem;
  }
  .hero-cta-block {
    max-width: 100%;
    padding: 1.2rem;
  }
}

/* =========================================
   5. BUTTONS
   ========================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.96rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: #e5f2ff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Żółty przycisk AI */
.btn-ai {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-ai:hover {
  background: linear-gradient(135deg, #fcd34d, #fbbf24);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
}

/* =========================================
   6. SECTIONS & CARDS
   ========================================= */

.section {
  padding: 3.5rem 0 4rem;
  position: relative;
}

/* Separator sekcji (Gradientowa linia) */
.section + .section {
  border-top: 1px solid transparent;
  background-image: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
}

.section-header {
  margin-bottom: 2rem;
}

.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.5rem;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f1f5f9;
}

.section-lead {
  margin: 0;
  color: #94a3b8;
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Stylizacja Kart (Glassmorphism) */
.card {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.6) 100%);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.card-title {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8fafc;
}

.card-text {
  margin: 0;
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* Lista artykułów (Wiedza) */
.articles-grid {
  display: grid;
  gap: 1.25rem;
}

.article-item {
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(145deg, rgba(23, 32, 51, 0.8), rgba(11, 15, 25, 0.9));
  transition: border-color 0.2s, transform 0.2s;
}

.article-item:hover {
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateX(4px);
}

.article-item a {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.3rem;
}

.article-item a:hover {
  text-decoration: none;
  color: #93c5fd;
}

.article-item p {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  color: #94a3b8;
}

/* =========================================
   7. TABLES & FORMS
   ========================================= */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8ff;
  font-weight: 600;
  text-align: left;
}

td {
  background: rgba(15, 23, 42, 0.4);
}

tr:last-child td {
  border-bottom: none;
}

form {
  display: grid;
  gap: 1rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.6);
  color: #f1f5f9;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(2, 6, 23, 0.8);
}

/* =========================================
   8. FOOTER & UTILITIES
   ========================================= */

.footer {
  flex-shrink: 0;
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #9ca8c8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(2, 4, 10, 0.8);
  backdrop-filter: blur(10px);
}

/* Override dla dymku czatu AI */
.cb-bubble {
  border-radius: 999px !important;
  background: #fbbf24 !important;
  color: #111827 !important;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4) !important;
}

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
