/**
 * Strona Tworzenie oprogramowania – style (Matrix / Hacker / Brutalist)
 * Ładowane tylko dla template-tworzenie-oprogramowania.php
 * Kolory: neonowa zieleń (#00ff88) i błękit (#00d9ff)
 */

.tworzenie-wrap {
  position: relative;
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--text-primary);
}

.tworzenie-main {
  position: relative;
  z-index: 2;
}

/* ===== Spine + flow lines ===== */
.tworzenie-spine {
  position: fixed;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 5;
  pointer-events: none;
}

.tworzenie-spine-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(0, 255, 136, 0.25) 15%,
    rgba(0, 217, 255, 0.55) 50%,
    rgba(0, 255, 136, 0.35) 85%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.25), 0 0 12px rgba(0, 217, 255, 0.25);
}

.tworzenie-flow-line {
  position: fixed;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 255, 136, 0.35) 50%,
    transparent 100%
  );
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
  animation: tworzenie-flow 8s ease-in-out infinite;
}

.tworzenie-flow-line--1 { top: 25%; left: 0; width: 40%; animation-delay: 0s; }
.tworzenie-flow-line--2 { top: 55%; right: 0; left: auto; width: 35%; animation-delay: 1.5s; background: linear-gradient(90deg, transparent 0%, rgba(0, 217, 255, 0.35) 50%, transparent 100%); }
.tworzenie-flow-line--3 { bottom: 28%; left: 20%; width: 50%; animation-delay: 2.6s; }

@keyframes tworzenie-flow {
  0%, 100% { opacity: 0.2; transform: translateX(-20px); }
  50% { opacity: 0.7; transform: translateX(20px); }
}

/* ===== Sekcje wspólne ===== */
.tworzenie-section {
  position: relative;
  padding: 4rem 1.5rem;
}

.tworzenie-section-badge {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: rgba(0, 255, 136, 0.85);
  z-index: 6;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.35);
}

.tworzenie-section-badge--hero {
  top: 5rem;
}

.tworzenie-section::after {
  content: '';
  position: absolute;
  left: calc(1.5rem + 1px);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.2);
  border: 2px solid #00ff88;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
  z-index: 3;
  pointer-events: none;
}

.tworzenie-hero.tworzenie-section::after {
  top: 35%;
}

.tworzenie-section-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.tworzenie-h2 {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #00ff88;
  text-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
  margin-bottom: 1.25rem;
}

.tworzenie-lead {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(0, 217, 255, 0.95);
  margin-bottom: 1rem;
  font-weight: 600;
}

.tworzenie-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.tworzenie-body strong {
  color: #00ff88;
  font-weight: 600;
}

/* ===== Hero ===== */
.tworzenie-fullscreen {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
}

.tworzenie-hero {
  flex-direction: column;
  background: linear-gradient(180deg, #0a0e1a 0%, #0a0a12 100%);
  position: relative;
}

.tworzenie-hero-separator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 3;
  pointer-events: none;
}

.tworzenie-hero-separator-line {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 255, 136, 0.25) 15%,
    rgba(0, 217, 255, 0.55) 50%,
    rgba(0, 255, 136, 0.35) 85%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.25), 0 0 12px rgba(0, 217, 255, 0.25);
}

.tworzenie-matrix-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: tworzenie-matrix-fade-in 2s ease-in 0.5s forwards;
}

@keyframes tworzenie-matrix-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tworzenie-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Przy przeładowaniu: ukryte do momentu animacji (typing / JS) */
.tworzenie-hero-tagline,
.tworzenie-hero-desc {
  opacity: 0;
}

/* Hero H1: glitch wyłączony – warstwy ::before/::after nigdy nie pokazywane */
.tworzenie-hero .tworzenie-h1-matrix.tworzenie-h1-glitch::before,
.tworzenie-hero .tworzenie-h1-matrix.tworzenie-h1-glitch::after {
  content: none !important;
  display: none !important;
}

.tworzenie-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #00ff88;
  margin: 0 0 1rem 0;
  line-height: 1.25;
  /* Ostry tekst – bez filter (rozmycia), lekki neon */
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.55);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Glitch effect na H1 */
.tworzenie-h1-glitch {
  position: relative;
}

/* Podczas pisania (typing/done) nie pokazujemy pełnego tytułu z glitch – tylko tekst + kursor na końcu */
.tworzenie-h1-glitch.ai-typing[data-ai-status="typing"]::before,
.tworzenie-h1-glitch.ai-typing[data-ai-status="done"]::before {
  content: none !important;
  display: none;
}

.tworzenie-h1-glitch::before,
.tworzenie-h1-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tworzenie-h1-glitch::before {
  left: -3px;
  color: transparent;
  text-shadow: 3px 0 #ff0088, -1px 0 #00ffff;
  animation: tworzenie-glitch-1 2.5s infinite;
}

.tworzenie-h1-glitch::after {
  left: 3px;
  color: transparent;
  text-shadow: -3px 0 #00d9ff, 1px 0 #ff00aa;
  animation: tworzenie-glitch-2 2.5s infinite 0.08s;
}

/* Hero H1: czysty neon, bez glitcha. Po zakończeniu pisania – „oddech” świecenia */
.tworzenie-hero .tworzenie-h1-matrix {
  color: #00ff88;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.6), 0 0 28px rgba(0, 255, 136, 0.35);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tworzenie-hero .tworzenie-h1-matrix[data-ai-status="complete"] {
  animation: tworzenie-hero-glow-breath 3.2s ease-in-out infinite;
}

@keyframes tworzenie-hero-glow-breath {
  0%, 100% {
    text-shadow: 0 0 14px rgba(0, 255, 136, 0.55), 0 0 32px rgba(0, 255, 136, 0.3), 0 0 50px rgba(0, 255, 136, 0.12);
  }
  50% {
    text-shadow: 0 0 22px rgba(0, 255, 136, 0.85), 0 0 48px rgba(0, 255, 136, 0.5), 0 0 70px rgba(0, 255, 136, 0.2);
  }
}

@keyframes tworzenie-glitch-1 {
  0%, 88%, 100% { transform: translate(0, 0) skewX(0); opacity: 0.85; }
  90% { transform: translate(-4px, 2px) skewX(-2deg); opacity: 1; }
  92% { transform: translate(4px, -2px) skewX(2deg); opacity: 1; }
  94% { transform: translate(-3px, 3px) skewX(1deg); opacity: 1; }
  96% { transform: translate(3px, -1px) skewX(-1deg); opacity: 1; }
  98% { transform: translate(-2px, 2px) skewX(0); opacity: 0.9; }
}

@keyframes tworzenie-glitch-2 {
  0%, 88%, 100% { transform: translate(0, 0) skewX(0); opacity: 0.85; }
  90% { transform: translate(4px, -2px) skewX(2deg); opacity: 1; }
  92% { transform: translate(-4px, 2px) skewX(-2deg); opacity: 1; }
  94% { transform: translate(3px, -2px) skewX(-1deg); opacity: 1; }
  96% { transform: translate(-3px, 1px) skewX(1deg); opacity: 1; }
  98% { transform: translate(2px, -2px) skewX(0); opacity: 0.9; }
}

.tworzenie-typewriter-cursor {
  color: #00ff88;
  animation: tworzenie-cursor-blink 0.9s step-end infinite;
}

@keyframes tworzenie-cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.tworzenie-wrap .ai-typing[data-ai-status="typing"]::after,
.tworzenie-wrap .ai-typing[data-ai-status="done"]::after {
  content: var(--ai-typing-cursor, '_');
  color: #00ff88;
  animation: tworzenie-cursor-blink 0.9s step-end infinite;
}
.tworzenie-wrap .ai-typing[data-ai-status="complete"]::after {
  content: '';
  display: none;
}

/* Hero H1: bez kursora (_) – tylko typing + matrix glitch */
.tworzenie-hero .tworzenie-h1-matrix.ai-typing::after {
  content: none !important;
  display: none !important;
}

/* Tagline jak na stronie głównej – szary/neutralny, bez niebieskiego */
.tworzenie-hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  color: #cbcbcb;
  margin: 0 0 1.25rem 0;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.tworzenie-hero-desc {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 auto 1.75rem;
  max-width: 640px;
}

/* Terminal highlight - neonowe tło, czarne litery */
.tworzenie-terminal-highlight {
  background: #00ff88;
  color: #000;
  padding: 0.15rem 0.4rem;
  font-weight: 700;
  border-radius: 3px;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
  display: inline-block;
}

/* ===== CTA ===== */
/* Hero CTA ukryty od razu w CSS – unikamy migania przed animacją (JS pokaże o 3200 ms) */
.tworzenie-cta--hero {
  opacity: 0;
  transform: translateY(20px);
}

.tworzenie-cta {
  display: inline-block;
  padding: 1rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.4s ease;
  cursor: pointer;
  border: 2px solid #00ff88;
  color: #000;
  background: #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
  position: relative;
}

.tworzenie-cta::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, #00ff88, #00ff88);
  opacity: 0;
  z-index: -1;
  filter: blur(15px);
  transition: opacity 0.4s ease;
}

.tworzenie-cta:hover {
  background: #00ff88;
  color: #000;
  box-shadow: 
    0 0 25px rgba(0, 255, 136, 0.6),
    0 0 50px rgba(0, 255, 136, 0.4);
  transform: scale(1.02);
}

.tworzenie-cta:hover::before {
  opacity: 0.6;
}

.tworzenie-cta--red {
  border-color: #ff3366;
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.35);
  animation: tworzenie-pulse-red 2s ease-in-out infinite alternate;
}

.tworzenie-cta--red::before {
  display: none;
}

.tworzenie-cta--red:hover {
  background: #ff3366;
  color: #0a0a0f;
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.6);
  transform: none;
}

.tworzenie-cta--red:hover::before {
  display: none;
}

@keyframes tworzenie-pulse-red {
  from { box-shadow: 0 0 20px rgba(255, 51, 102, 0.35); }
  to   { box-shadow: 0 0 28px rgba(255, 51, 102, 0.55); }
}

/* ===== Lista HUD ===== */
.tworzenie-list--hud {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tworzenie-list-item {
  position: relative;
  padding: 0.9rem 0 0.9rem 2.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0, 255, 136, 0.15);
}

.tworzenie-list-item:last-child {
  border-bottom: none;
}

.tworzenie-list-icon {
  position: absolute;
  left: 0;
  top: 0.9rem;
  color: #00ff88;
  font-size: 0.7rem;
}

.tworzenie-list-item strong {
  color: #00ff88;
}

/* ===== Tabela Pełne Spektrum ===== */
.tworzenie-spektrum {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 15, 10, 0.15) 100%);
  border-top: 1px solid rgba(0, 255, 136, 0.2);
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.tworzenie-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.tworzenie-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-display), monospace;
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
}

.tworzenie-table th,
.tworzenie-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.tworzenie-table th {
  background: rgba(0, 255, 136, 0.08);
  color: #00ff88;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.tworzenie-table tbody tr:last-child td {
  border-bottom: none;
}

.tworzenie-table tbody tr:hover td {
  background: rgba(0, 255, 136, 0.05);
}

.tworzenie-table td {
  color: var(--text-primary);
}

.tworzenie-channel {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: #00ff88;
  font-weight: 600;
  border-radius: 2px;
}

/* ===== Terminal Demo (Sekcja 04) ===== */
.tworzenie-jak-dziala {
  background: rgba(0, 10, 5, 0.2);
  border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.tworzenie-terminal-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.tworzenie-terminal-wrap,
.tworzenie-result-wrap {
  background: rgba(0, 10, 5, 0.4);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
}

.tworzenie-terminal-header,
.tworzenie-result-header {
  padding: 0.75rem 1rem;
  background: rgba(0, 255, 136, 0.1);
  border-bottom: 1px solid rgba(0, 255, 136, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tworzenie-terminal-title,
.tworzenie-result-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #00ff88;
  text-transform: uppercase;
}

.tworzenie-terminal-status {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: rgba(0, 255, 136, 0.7);
  letter-spacing: 0.1em;
}

.tworzenie-terminal-body,
.tworzenie-result-body {
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

.tworzenie-terminal-line {
  color: #00ff88;
  margin-bottom: 0.5rem;
}

.tworzenie-terminal-line--output {
  color: rgba(0, 217, 255, 0.9);
  padding-left: 1rem;
}

.tworzenie-terminal-line--success {
  color: #00ff88;
  font-weight: 600;
}

.tworzenie-terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: #00ff88;
  animation: tworzenie-cursor-blink 0.9s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

.tworzenie-result-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tworzenie-result-card {
  text-align: center;
  padding: 1.5rem;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 4px;
}

.tworzenie-result-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.tworzenie-result-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 0.25rem;
}

.tworzenie-result-label {
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* ===== Stabilność ===== */
.tworzenie-stabilnosc {
  border-top: 1px solid rgba(0, 255, 136, 0.2);
}

/* ===== FAQ Accordion ===== */
.tworzenie-faq {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 15, 20, 0.25) 100%);
  border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.tworzenie-faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tworzenie-faq-item {
  padding: 1.25rem 1.5rem;
  background: rgba(0, 20, 30, 0.2);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.tworzenie-faq-item:hover {
  border-color: rgba(0, 255, 136, 0.4);
  background: rgba(0, 20, 30, 0.3);
}

.tworzenie-faq-q {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #00ff88;
  margin: 0;
  padding-right: 2rem;
  position: relative;
  user-select: none;
}

.tworzenie-faq-q::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.2rem;
  color: #00ff88;
  transition: transform 0.3s ease;
}

.tworzenie-faq-item--open .tworzenie-faq-q::after {
  content: '−';
  transform: rotate(180deg);
}

.tworzenie-faq-a-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0;
}

.tworzenie-faq-item--open .tworzenie-faq-a-wrap {
  max-height: 500px;
  padding-top: 1rem;
}

.tworzenie-faq-a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0;
}

/* ===== Final CTA ===== */
.tworzenie-final {
  padding-bottom: 5rem;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .tworzenie-terminal-demo {
    grid-template-columns: 1fr;
  }
  
  .tworzenie-result-body {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .tworzenie-section {
    padding: 3rem 0;
  }
  
  .tworzenie-section-inner {
    padding-left: 30px;
    padding-right: 15px;
  }
  
  .tworzenie-hero-content {
    padding-left: 30px;
    padding-right: 15px;
  }
  
  .tworzenie-hero-separator {
    left: 30px;
    right: 15px;
  }
  
  .tworzenie-section-badge {
    right: 1rem;
    top: 1.5rem;
    font-size: 0.65rem;
  }
  
  .tworzenie-section-badge--hero {
    top: 3rem;
  }
  
  .tworzenie-spine {
    left: 0.75rem;
  }
  
  .tworzenie-section::after {
    left: calc(0.75rem + 1px);
  }
  
  .tworzenie-h1 {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }
  
  .tworzenie-table-wrap {
    margin-left: 0;
    margin-right: 0;
  }
  
  .tworzenie-table th,
  .tworzenie-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .tworzenie-terminal-demo {
    gap: 1.5rem;
  }
  
  .tworzenie-result-body {
    grid-template-columns: 1fr;
  }
  
  .tworzenie-faq-q {
    font-size: 0.9rem;
    padding-right: 1.5rem;
  }
  
  .tworzenie-faq-a {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tworzenie-h1-glitch::before,
  .tworzenie-h1-glitch::after,
  .tworzenie-flow-line,
  .tworzenie-cta--red,
  .tworzenie-terminal-cursor,
  .tworzenie-typewriter-cursor {
    animation: none;
  }
  
  .tworzenie-terminal-cursor,
  .tworzenie-typewriter-cursor {
    opacity: 0.7;
  }
}
