/* --- ZMIENNE PREMIUM --- */
:root {
  --bg-base: #060608;
  --surface-dark: rgba(18, 18, 20, 0.5);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --text-primary: #fcfcfc;
  --text-secondary: #8a8a93;
  --accent-premium: #d4af37;
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & BAZA --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif; background-color: var(--bg-base);
  color: var(--text-primary); line-height: 1.7; overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

h1, h2, h3, h4, .brand { 
  font-family: 'Montserrat', sans-serif; font-weight: 800; 
  letter-spacing: -0.02em; 
}

a { text-decoration: none; color: inherit; transition: all 0.4s var(--ease-cinematic); }
ul { list-style: none; }

/* --- DYNAMICZNE TŁO --- */
.dynamic-bg { position: fixed; inset: 0; z-index: -3; overflow: hidden; background-color: var(--bg-base); }
.orb { position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.8; animation: float infinite ease-in-out alternate; }
.orb.gold { width: 40vw; height: 40vw; top: -5%; left: -5%; background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%); animation-duration: 25s; }
.orb.steel { width: 50vw; height: 50vw; bottom: -15%; right: -5%; background: radial-gradient(circle, rgba(100, 115, 145, 0.15) 0%, transparent 70%); animation-duration: 30s; animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(10%, 15%) scale(1.2); } }

.ambient-light {
  position: fixed; top: 0; left: 0; /* Zmienione na 0 */
  width: 700px; height: 700px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.06) 0%, transparent 65%);
  border-radius: 50%; z-index: -2; pointer-events: none; opacity: 0; transition: opacity 1s ease;
  will-change: transform; /* Informuje przeglądarkę z góry, że to będzie animowane na GPU */
}

.noise-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.025; pointer-events: none; z-index: 9999;
}

/* --- NAWIGACJA --- */
.site-header {
  position: fixed; top: 0; width: 100%; z-index: 100; display: flex; justify-content: space-between; align-items: center;
  padding: 2rem 5%; background: linear-gradient(to bottom, rgba(7,7,8,0.95) 0%, transparent 100%);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
}
.brand { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; }
.nav { display: flex; gap: 3rem; }
.nav a { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); position: relative; font-weight: 500; }
.nav a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--text-primary); transition: width 0.4s var(--ease-cinematic); }
.nav a:hover { color: var(--text-primary); }
.nav a:hover::after { width: 100%; }

/* --- UKŁAD SEKCJI (BAZA PC) --- */
section { padding: 12rem 5% 8rem; max-width: 1400px; margin: 0 auto; }
.section-header { margin-bottom: 6rem; max-width: 800px; }
.section-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent-premium); margin-bottom: 1.5rem; display: block; font-weight: 700; }
.section-header h2 { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.1; margin-bottom: 1.5rem; }
.section-header p { color: var(--text-secondary); font-size: 1.2rem; font-weight: 300; }

/* --- HERO SEKCJA --- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 15vh; }
.hero-content { max-width: 1000px; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 6rem); line-height: 1.1; margin-bottom: 2rem; background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero .lead { color: var(--text-secondary); font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 300; max-width: 600px; margin: 0 auto 3rem; }
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* To wyśrodkuje przyciski! */
  gap: 1.5rem;
  margin-top: 2.5rem;
}

/* Wymuszenie pierwotnej szerokości przycisków na komputerach */
.hero-buttons .btn {
  width: auto;
}
/* --- PRZYCISKI --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 1.1rem 3rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em;
  border: 1px solid var(--border-subtle); background: rgba(255,255,255,0.03); color: var(--text-primary);
  cursor: pointer; position: relative; overflow: hidden; font-weight: 600; backdrop-filter: blur(5px); text-align: center;
}
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: var(--text-primary); transition: transform 0.6s var(--ease-cinematic); z-index: -1; }
.btn:hover { color: var(--bg-base); border-color: var(--text-primary); }
.btn:hover::before { transform: translateX(100%); }

/* --- GRIDY I KARTY KOMPETENCJI --- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.service-card { padding: 3.5rem; border: 1px solid var(--border-subtle); background: var(--surface-dark); backdrop-filter: blur(10px); position: relative; overflow: hidden; transition: all 0.5s ease; border-radius: 12px; }
.service-card:hover { border-color: rgba(255,255,255,0.25); transform: translateY(-5px); }
.service-card h3 { font-size: 1.8rem; margin-bottom: 1.2rem; }
.service-card p { color: var(--text-secondary); font-size: 1rem; font-weight: 300; margin-bottom: 2rem; }
.feature-list li { margin-bottom: 0.9rem; font-size: 0.95rem; color: #ccc; display: flex; align-items: flex-start; gap: 12px; }
.feature-list li::before { content: ''; width: 4px; height: 4px; background: var(--accent-premium); border-radius: 50%; flex-shrink: 0; margin-top: 10px; }

/* --- PORTFOLIO --- */
.case-study { 
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: center; 
  padding: 5rem; border: 1px solid var(--border-subtle); background: var(--surface-dark); 
  backdrop-filter: blur(10px); border-radius: 16px; 
}

.case-visual { 
  width: 100%; aspect-ratio: 4/3; background: #0a0a0c; 
  border: 1px solid var(--border-subtle); border-radius: 12px; 
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.browser-bar {
  padding: 1rem 1.5rem; background: rgba(255, 255, 255, 0.03); 
  border-bottom: 1px solid var(--border-subtle);
  display: flex; gap: 8px; align-items: center;
}
.browser-dot {
  width: 10px; height: 10px; border-radius: 50%; 
  background: rgba(255, 255, 255, 0.15);
}
.browser-content {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem; text-align: center;
  background: radial-gradient(circle at center, rgba(212,175,55,0.06) 0%, transparent 80%);
}
.case-domain { 
  font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--text-primary);
  font-size: clamp(1.2rem, 3vw, 1.8rem); 
  letter-spacing: 1px; word-break: break-word; overflow-wrap: break-word;
}

.case-badge {
  display: inline-block; margin-top: 1rem; padding: 0.5rem 1.4rem; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.15em; border: 1px solid rgba(212, 175, 55, 0.3); color: var(--accent-premium);
  border-radius: 50px; background: rgba(212, 175, 55, 0.05); font-weight: 600; transition: all 0.3s ease;
}
a.case-badge:hover {
  background: rgba(212, 175, 55, 0.15); border-color: rgba(212, 175, 55, 0.6); color: var(--accent-premium);
  transform: translateY(-2px);
}

.case-content h3 { font-size: clamp(2rem, 3.5vw, 2.8rem); margin-bottom: 1.5rem; }
.case-content p { color: var(--text-secondary); margin-bottom: 1.5rem; font-weight: 300; }

.case-study:hover .card-image {
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

/* --- CENNIK --- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.pricing-card {
  padding: 4rem 3rem 6rem 3rem; border: 1px solid var(--border-subtle); background: var(--surface-dark); border-radius: 12px;
  display: flex; flex-direction: column; backdrop-filter: blur(10px); transition: all 0.5s var(--ease-cinematic); cursor: pointer; position: relative;
}
.pricing-card::after {
  content: 'Rozwiń szczegóły +'; position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%) translateY(15px);
  opacity: 0; color: var(--accent-premium); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; transition: all 0.5s var(--ease-cinematic); white-space: nowrap;
}
.pricing-card:hover { border-color: rgba(255,255,255,0.3); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.pricing-card:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.pricing-card.premium { border-color: rgba(212, 175, 55, 0.4); background: linear-gradient(180deg, rgba(212,175,55,0.1) 0%, rgba(18,18,20,0.5) 100%); }
.price { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(2.8rem, 5vw, 4.5rem); margin: 1.2rem 0; line-height: 1; }
.price span { font-size: 1.1rem; color: var(--text-secondary); font-family: 'Inter', sans-serif; font-weight: 400; }
.pricing-desc { color: var(--text-secondary); margin-bottom: 3rem; font-weight: 300; flex-grow: 1; font-size: 1.05rem; }

.hidden-details { display: none; margin-top: 3rem; border-top: 1px solid var(--border-subtle); padding-top: 3rem; }
.hidden-details h4 { font-size: 1.3rem; margin-bottom: 1.8rem; color: var(--text-primary); }

/* --- MODAL --- */
.modal-wrapper { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease-cinematic); }
.modal-wrapper.is-open { pointer-events: all; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 3, 4, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.modal-dialog { position: relative; width: 90%; max-width: 700px; max-height: 90vh; overflow-y: auto; background: var(--bg-base); border: 1px solid rgba(255,255,255,0.2); border-radius: 16px; transform: scale(0.9) translateY(30px); transition: transform 0.7s var(--ease-cinematic); box-shadow: 0 40px 80px rgba(0,0,0,0.9), 0 0 50px rgba(212,175,55,0.08); }
.modal-dialog::-webkit-scrollbar { width: 8px; } .modal-dialog::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.modal-wrapper.is-open .modal-dialog { transform: scale(1) translateY(0); }
.modal-close-btn { position: absolute; top: 1.5rem; right: 1.5rem; z-index: 10; background: rgba(255,255,255,0.08); border: 1px solid var(--border-subtle); color: var(--text-secondary); width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; backdrop-filter: blur(5px); }
.modal-body { padding: 5rem; display: flex; flex-direction: column; }
.modal-body .pricing-card::after { display: none; } 

/* --- KONTAKT --- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; }

/* Nowy, elegancki blok adresu e-mail */
.contact-direct {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}
.contact-direct-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.contact-email {
  font-family: 'Inter', sans-serif;
  font-weight: 400; 
  font-size: clamp(1rem, 3vw, 1.25rem); 
  color: var(--text-primary);
  display: inline-block;
  position: relative;
  transition: color 0.4s ease;
}
.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  transition: background 0.4s ease;
}
.contact-email:hover {
  color: var(--accent-premium);
}
.contact-email:hover::after {
  background: var(--accent-premium);
}

/* Style formularza kontaktowego, które zniknęły */
.form-group { margin-bottom: 2.5rem; position: relative; }
.form-group input, .form-group textarea { 
  width: 100%; 
  background: transparent; 
  border: none; 
  border-bottom: 1px solid var(--border-subtle); 
  padding: 1rem 0; 
  color: var(--text-primary); 
  font-family: inherit; 
  font-size: 1.15rem; 
  transition: border-color 0.4s ease; 
  border-radius: 0; 
}
.form-group input:focus, .form-group textarea:focus { 
  outline: none; 
  border-bottom-color: var(--text-primary); 
}
.form-group input::placeholder, .form-group textarea::placeholder { 
  color: #666; 
}
.contact-form .btn {
  width: 100%; /* Przycisk wyślij na całą szerokość kolumny */
}

.form-group textarea {
  resize: vertical;  /* Blokuje rozszerzanie na boki, pozwala tylko w dół/górę */
  min-height: 300px; /* Ustawia okno na tyle wysokie, by cała pre-wiadomość była od razu widoczna */
  max-height: 450px; /* Zabezpiecza przed rozciągnięciem pola w nieskończoność w dół */
}

/* --- CHECKBOX PREMIUM --- */
.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 2rem 0 2.2rem 0;
  cursor: pointer;
  user-select: none;
}

.consent-box input {
  display: none;
}

.custom-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  margin-top: 2px;
  position: relative;
  transition: all 0.25s ease;
  background: rgba(255,255,255,0.02);
}

.custom-check::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid var(--accent-premium);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: all 0.25s ease;
}

.consent-box input:checked + .custom-check {
  border-color: var(--accent-premium);
  box-shadow: 0 0 12px rgba(255,215,140,0.12);
}

.consent-box input:checked + .custom-check::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

.consent-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 300;
}

.consent-text a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.consent-text a:hover {
  color: var(--accent-premium);
  border-color: var(--accent-premium);
}

/* --- ANIMACJE SCROLLA --- */
.reveal { opacity: 0; filter: blur(15px); transform: translateY(80px) scale(0.95); transition: opacity 1.3s var(--ease-cinematic), filter 1.3s var(--ease-cinematic), transform 1.3s var(--ease-cinematic); }
.reveal.is-visible { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; }
/* --- STOPKA --- */
footer { 
  border-top: 1px solid var(--border-subtle); 
  padding: 4rem 5%; 
  color: var(--text-secondary); 
  font-size: 0.8rem; 
  letter-spacing: 0.15em; 
  text-transform: uppercase; 
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.footer-content p {
  margin: 0;
}
.footer-divider {
  display: none; /* Ukryte na telefonach, by zachować czysty układ */
  color: var(--border-subtle);
}
.footer-link {
  color: var(--text-secondary);
  transition: all 0.4s var(--ease-cinematic);
  position: relative;
}
.footer-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: transparent;
  transition: background 0.4s var(--ease-cinematic);
}
.footer-link:hover {
  color: var(--text-primary);
}
.footer-link:hover::after {
  background: var(--accent-premium); /* Złote podkreślenie przy najechaniu */
}

/* Wersja na komputery - elementy w jednej linii */
@media(min-width: 768px) {
  .footer-content {
    flex-direction: row;
    gap: 1.5rem;
  }
  .footer-divider {
    display: block;
  }
}

/* =========================================
   OPTYMALIZACJA MOBILNA
   ========================================= */
@media(max-width: 900px) {
  section { padding: 8rem 5% 4rem; }
  .section-header { margin-bottom: 4rem; }
  .case-study { grid-template-columns: 1fr; padding: 3.5rem 2.5rem; gap: 3rem; }
  .case-visual { aspect-ratio: 16/9; } 
  .contact-layout { grid-template-columns: 1fr; gap: 4rem; }
}

@media(max-width: 768px) {
  .site-header { flex-direction: column; padding: 1.5rem 5%; gap: 1rem; }
  .nav { display: flex; width: 100%; justify-content: space-between; gap: 0.5rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.5rem; }
  .nav a { font-size: 0.7rem; white-space: nowrap; }
  .brand { text-align: center; width: 100%; }

  section { padding: 6rem 5% 4rem; }
  .hero { padding-top: 12vh; }
  .grid-3 { gap: 1.5rem; }
  
  .service-card { padding: 2.5rem 2rem; }
  .case-study { padding: 2rem; gap: 2rem; }
  
  .pricing-card { padding: 3rem 2rem 5rem 2rem; }
  .pricing-card::after { opacity: 0.7; transform: translateX(-50%) translateY(0); color: var(--text-secondary); }
  .pricing-grid { gap: 1.5rem; }

  .modal-dialog { width: 95%; max-height: 95vh; border-radius: 12px; }
  .modal-body { padding: 3rem 1.5rem; }
  .modal-close-btn { top: 1rem; right: 1rem; width: 36px; height: 36px; font-size: 1.4rem; }

  .btn { width: 100%; padding: 1.2rem; }
  .ambient-light { display: none; }
}
/* --- ZGODA NA COOKIE --- */
.cookie-banner {
  position: fixed; bottom: -100%; left: 0; width: 100%; z-index: 9999;
  background: rgba(10, 10, 12, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle); padding: 1.5rem 5%;
  transition: bottom 0.8s var(--ease-cinematic);
}
.cookie-banner.show { bottom: 0; }
.cookie-content {
  max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 2rem;
}
.cookie-content p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; max-width: 800px; }
.cookie-actions { display: flex; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.cookie-link { font-size: 0.8rem; color: var(--text-secondary); text-decoration: underline; text-underline-offset: 4px; }
.cookie-link:hover { color: var(--text-primary); }
.btn.btn-small { padding: 0.6rem 1.5rem; font-size: 0.75rem; }

@media(max-width: 768px) {
  .cookie-content { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .cookie-actions { width: 100%; justify-content: space-between; }
}

/* =========================================
   KARUZELA DEMONSTRACYJNA
   ========================================= */
.demo-carousel-wrapper {
  position: relative;
  width: 100%;
}

.carousel-container {
  position: relative;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; 
  -ms-overflow-style: none; 
  padding-bottom: 2rem;
  scroll-behavior: smooth;
  width: 100%;
  -webkit-overflow-scrolling: touch; /* Wymusza płynne scrollowanie na iOS */
}

.carousel-track::-webkit-scrollbar {
  display: none; /* Ukrywa pasek w Chrome/Safari/Edge */
}

.carousel-card {
  flex: 0 0 calc(33.333% - 1.33rem); /* 3 karty na dużych ekranach */
  min-width: 320px;
  scroll-snap-align: start;
  border: 1px solid var(--border-subtle);
  background: var(--surface-dark);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease-cinematic), border-color 0.5s ease;
  backdrop-filter: blur(10px);
}

.carousel-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.3); /* Złoty akcent przy najeździe */
}

.card-visual {
  background: #0a0a0c;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  aspect-ratio: 16/10;
}

.card-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 80%);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding: 1rem;
}

.card-content {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  flex: 1;
  line-height: 1.6;
}

.btn-demo {
  padding: 0.8rem 1.5rem;
  font-size: 0.75rem;
  width: 100%;
}

.carousel-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: rgba(18, 18, 20, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.carousel-btn:hover {
  border-color: var(--accent-premium);
  color: var(--accent-premium);
  background: rgba(212, 175, 55, 0.1);
}

.carousel-btn.prev { left: -25px; }
.carousel-btn.next { right: -25px; }

/* RWD dla karuzeli */
@media(max-width: 1100px) {
  .carousel-card { flex: 0 0 calc(50% - 1rem); } /* 2 karty na tabletach */
}

@media(max-width: 768px) {
  .carousel-card { 
    flex: 0 0 85%; 
    min-width: auto; 
  } 
  
  /* Przywracamy i dostosowujemy strzałki dla telefonów */
  .carousel-btn { 
    display: flex; /* Zamiast display: none; */
    width: 40px; 
    height: 40px; 
    font-size: 1rem;
    background: rgba(18, 18, 20, 0.95); /* Mocniejsze tło, żeby nie znikały na zdjęciach */
  } 
  .carousel-btn.prev { left: 5px; }
  .carousel-btn.next { right: 5px; }
  
  .carousel-track { gap: 1rem; padding-bottom: 1rem; }
}

.carousel-btn.disabled {
  opacity: 0.2;
  pointer-events: none; /* Całkowicie blokuje możliwość kliknięcia */
  cursor: default;
}

/* --- AKTUALIZACJA MINIATUR KART (Obrazki zamiast tekstu) --- */
.card-image {
  flex: 1;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  /* Delikatne przyciemnienie obrazka, by pasował do mrocznego motywu. Znika po najechaniu */
  box-shadow: inset 0 0 80px rgba(0,0,0,0.8);
  transition: box-shadow 0.5s ease;
}

.carousel-card:hover .card-image {
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

/* --- STYLE DLA NOWEGO MODALA DEMO (Wielkie okno iframe) --- */
.modal-dialog.demo-dialog {
  max-width: 1400px;
  width: 95%;
  height: 85vh;
  padding: 0; /* Usuwamy padding, by iframe wypełniał całość */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Ucinamy rogi iframe, żeby pasowały do zaokrąglenia okna */
}

.modal-body.demo-body {
  padding: 0;
  flex: 1;
  position: relative;
  background-color: #fff; /* Tło pod iframe na biało, bo to cudze strony */
}

#demoIframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 2;
  background-color: #fff;
}

/* Tekst ładowania wyświetlany pod spodem zanim iframe się wczyta */
.iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  z-index: 1;
}

@media(max-width: 768px) {
  .modal-dialog.demo-dialog { width: 100%; height: 100vh; border-radius: 0; }
  .modal-dialog.demo-dialog .modal-close-btn { 
    background: rgba(0,0,0,0.8); 
    border-color: rgba(255,255,255,0.2); 
    color: #fff; 
  }
}

/* --- OPTYMALIZACJA WYDAJNOŚCI DLA TELEFONÓW --- */
@media (max-width: 768px) {
  /* Wyłączamy generowanie szumu na słabych procesorach */
  .noise-overlay {
    display: none !important;
  }
  
  /* Wyłączamy gigantyczny blur i animacje w tle */
  .dynamic-bg, .orb {
    display: none !important;
  }
}

/* ==================================================
   OSTATECZNY FIX SCROLLA W MODALU (BEZ BŁĘDÓW DOTYKU)
   ================================================== */
@media (max-width: 768px) {
  /* 1. Cały Wrapper staje się obszarem scrollowania. 
        Używamy samej klasy, aby objąć każdy modal. */
  .modal-wrapper {
    display: block !important; 
    overflow-y: auto !important; 
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important; /* Zatrzymuje "przebijanie" scrolla na body */
    padding: 5vh 0 !important; 
  }

  /* 2. Tło (backdrop) sztywno przyklejone pod spód */
  .modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1 !important;
  }

  /* 3. Okno modala to teraz zwykły blok. Odbieramy mu prawa do scrollowania. */
  .modal-dialog {
    position: relative !important;
    margin: 0 auto !important; 
    width: 95vw !important;
    max-height: none !important; /* Karta ma rosnąć w dół wraz z tekstem */
    height: auto !important;
    overflow: visible !important; /* ZERO wbudowanego scrolla - to rozwiązuje 90% problemu */
    transform: none !important; /* Wyłącza animacje, które psują układ na iOS */
    transition: none !important;
    z-index: 2 !important;
    touch-action: pan-y !important; /* Wymusza przekazywanie gestu "w dół/górę" do rodzica */
  }

  /* 4. Środek okna również bez ograniczeń */
  .modal-body {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* 5. KLUCZOWE: Wyłączamy blur tylko wewnątrz modala na mobile, 
        żeby odblokować zamrożone zdarzenia dotykowe na iPhonach */
  .modal-wrapper .pricing-card {
    backdrop-filter: none !important; 
    -webkit-backdrop-filter: none !important;
  }

  /* 6. Przycisk zamknięcia "zawieszamy" w rogu ekranu, a nie w dokumencie */
  .modal-wrapper .modal-close-btn {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 9999 !important;
  }
}

/* ==================================================
   NAPRAWA WYSWIETLANIA MODALA DEMO NA TELEFONACH
   ================================================== */
@media (max-width: 768px) {
  /* Nadpisujemy height: auto !important dla modala z Iframe */
  .modal-dialog.demo-dialog {
    height: 90vh !important; 
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important; /* Upewniamy się, że rogi nie będą wystawać */
  }

  .modal-body.demo-body {
    flex: 1 !important;
    height: 100% !important;
    display: block !important;
  }
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 2;
}

.price-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding: 0.6rem 0;
}

.price-list li:last-child {
  border-bottom: none; /* Usuwa kreskę pod ostatnim elementem */
}

/* --- FAQ AKORDEON (MODERN) --- */
.faq-accordion {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color 0.4s ease;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 2.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.4s var(--ease-cinematic);
}

/* Ikona plusa/minusa tworzona w CSS (bez plików graficznych!) */
.faq-icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text-primary);
  transition: transform 0.5s var(--ease-cinematic), background-color 0.4s ease;
}

.faq-icon::before {
  width: 100%;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 100%;
}

/* Magia CSS Grid do płynnego otwierania */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s var(--ease-cinematic), opacity 0.5s var(--ease-cinematic);
}

.faq-answer-inner {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  padding-right: 10%; /* Odstęp z prawej, żeby tekst nie wchodził pod ikonę */
}

.faq-answer-inner p {
  margin-bottom: 2.5rem; /* Margines dolny ukryty, gdy zamknięte */
}

/* --- STANY AKTYWNE (OTWARTE PYTANIE) --- */
.faq-item.active .faq-question {
  color: var(--accent-premium);
}

.faq-item.active .faq-icon::before,
.faq-item.active .faq-icon::after {
  background-color: var(--accent-premium);
}

/* Animacja zamiany plusa w minus */
.faq-item.active .faq-icon::after {
  transform: rotate(90deg) scale(0);
}

.faq-item.active .faq-icon::before {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* Mobilne dopasowania */
@media (max-width: 768px) {
  .faq-question {
    padding: 1.5rem 0;
    gap: 1rem;
  }
  .faq-answer-inner {
    font-size: 0.95rem;
    padding-right: 0;
  }
  .faq-answer-inner p {
    margin-bottom: 1.5rem;
  }
}

/*Kalkulator*/

:root {
  --calc-bg: #1a1a1a;
  --calc-card-bg: #252525;
  --calc-border: #333;
  --calc-accent: #d4af37; /* Złoty premium */
  --calc-accent-hover: #e8c34f;
  --calc-text: #f0f0f0;
  --calc-text-muted: #a0a0a0;
  --calc-radius: 12px;
}

.calc-wrapper {
  max-width: 900px;
  margin: 4rem auto;
  font-family: inherit;
  color: var(--calc-text);
  background: var(--calc-bg);
  padding: 3rem;
  border-radius: calc(var(--calc-radius) * 1.5);
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  border: 1px solid #2a2a2a;
}

.calc-header { text-align: center; margin-bottom: 3rem; }
.calc-header h2 { font-size: 2.2rem; margin: 0.5rem 0; color: #fff;}
.calc-header p { color: var(--calc-text-muted); max-width: 600px; margin: 0 auto;}

.calc-section { margin-bottom: 3.5rem; }
.calc-section h3 { font-size: 1.25rem; color: var(--calc-accent); margin-bottom: 1.5rem; border-bottom: 1px solid var(--calc-border); padding-bottom: 0.5rem; }

/* Grid dla kafli (Pakiety / Czas) */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.calc-card { cursor: pointer; display: block; }
.calc-card input { display: none; }
.calc-card-content {
  background: var(--calc-card-bg);
  border: 2px solid var(--calc-border);
  border-radius: var(--calc-radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}
.calc-card:hover .calc-card-content { border-color: #555; transform: translateY(-3px); }
.calc-card input:checked + .calc-card-content {
  border-color: var(--calc-accent);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.calc-card-content h4 { margin: 0 0 0.5rem 0; font-size: 1.1rem; color: #fff;}
.calc-card-content .price { font-weight: bold; font-size: 1.3rem; color: var(--calc-accent); }
.calc-card-content span { font-size: 0.85rem; color: var(--calc-text-muted); display: block; margin-top: 0.5rem; line-height: 1.4;}

/* Usługi Dodatkowe - Trzy kolumny, cena w prawym dolnym rogu */
.calc-addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  align-items: start; /* KLUCZOWE: Zapobiega nienaturalnemu rozciąganiu kolumn w dół */
}
.addon-group h4 { margin-bottom: 1.2rem; font-size: 1.05rem; color: #fff; }

.addon-item {
  display: grid;
  grid-template-columns: auto 1fr; /* Checkbox dopasowany, reszta przestrzeni dla tekstu */
  column-gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem; /* PRZYWRÓCONY ODSTĘP: Kafelki nie zlewają się ze sobą */
  background: var(--calc-card-bg);
  border-radius: 8px;
  border: 1px solid var(--calc-border);
  transition: 0.2s;
  cursor: pointer;
}
.addon-item:hover { border-color: #666; }

.addon-item input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1; /* ZMIANA: Checkbox jest teraz tylko w 1 wierszu (razem z tekstem) */
  width: 20px; 
  height: 20px; 
  accent-color: var(--calc-accent); 
  cursor: pointer;
  align-self: center; /* Wyśrodkowanie w pionie */
}

.addon-name { 
  grid-column: 2;
  grid-row: 1; /* Tekst jest w tym samym wierszu co checkbox */
  font-size: 0.95rem; 
  color: #ddd;
  line-height: 1.3;
  align-self: center; /* ZMIANA: Tekst obniżony i wyrównany idealnie z checkboxem */
}

.addon-price { 
  grid-column: 2;
  grid-row: 2; /* Cena przeskakuje do 2 wiersza (pod tekst) */
  justify-self: end; /* Spycha cenę maksymalnie do prawej strony */
  font-weight: bold; 
  color: var(--calc-accent); 
  font-size: 0.9rem; 
  margin-top: 0.8rem; /* Odstęp między tekstem a ceną */
}

/* Podsumowanie i Formularz */
.calc-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: #111;
  padding: 2.5rem;
  border-radius: var(--calc-radius);
  border: 1px solid var(--calc-accent);
  margin-top: 2rem;
}
.summary-box .totals { margin: 2rem 0; }
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 1.1rem; }
.total-row strong { 
  font-size: 2rem; 
  color: var(--calc-accent); 
  white-space: nowrap; /* KLUCZOWE: Zabrania przełamywania tekstu na spacji */
  text-align: right;
  margin-left: 1rem; /* Zapewnia odstęp od tekstu po lewej stronie, gdyby zrobiło się bardzo ciasno */
}
.summary-note { font-size: 0.85rem; color: var(--calc-text-muted); line-height: 1.5; border-top: 1px solid #333; padding-top: 1rem;}

.lead-form h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.3rem; color: #fff;}
.lead-form input {
  width: 100%; padding: 1rem; margin-bottom: 1rem;
  background: var(--calc-card-bg); border: 1px solid var(--calc-border);
  color: #fff; border-radius: 6px; outline: none; transition: 0.3s;
}
.lead-form input:focus { border-color: var(--calc-accent); background: #1a1a1a; }
.submit-btn {
  width: 100%; padding: 1rem; background: var(--calc-accent);
  color: #000; border: none; border-radius: 6px;
  font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: 0.3s;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.submit-btn:hover { background: var(--calc-accent-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3); }
.hidden-msg { display: none; margin-top: 1rem; padding: 1rem; background: rgba(46, 204, 113, 0.15); border: 1px solid #2ecc71; color: #2ecc71; border-radius: 6px; text-align: center; font-weight: bold;}

@media(max-width: 850px) {
  .calc-addons-grid { grid-template-columns: 1fr; gap: 0; }
  .addon-group { margin-bottom: 2rem; }
}
@media(max-width: 650px) {
  .calc-summary { grid-template-columns: 1fr; }
  .calc-wrapper { padding: 1.5rem; margin: 2rem auto; }
}