/* ------ CSS RESET ------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;overflow-x:hidden}
body{font-family:'Poppins','Helvetica Neue',Arial,sans-serif;line-height:1.6;background:#000;color:#fff;overflow-x:hidden;max-width:100vw}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}
h1,h2,h3,h4{font-weight:800;line-height:1.2;margin-bottom:.5em}

/* ------ VARIABLES ------- */
:root{
  --clr-bg:#000;
  --clr-accent:#FF4A3B;
  --clr-white:#FFFFFF;
  --radius:12px;
  --shadow:0 4px 20px rgba(0,0,0,.6);
}

/* ------ UTILITIES ------- */
.container{width:90%;max-width:1200px;margin:0 auto}
section{overflow-x:hidden;max-width:100vw}
.flex{display:flex}
.between{justify-content:space-between}
.center{align-items:center}
.column{flex-direction:column}
.text-center{text-align:center}
.grid{display:grid}
.gap-2{gap:1rem}
.gap-4{gap:2rem}
.cols-2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.cols-3{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.mt-4{margin-top:2rem}
.small{font-size:.8rem}
.w-full{width:100%}

/* New project layout with 30/70 split */
.project-layout {
  display: grid;
  grid-template-columns: 30% 70%; 
  gap: 2rem;
  align-items: flex-start;
}

/* Links in project descriptions */
.project-layout a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.project-layout a:hover {
  color: #ff6b5d;
  border-bottom: 1px solid #ff6b5d;
}

/* Responsive adjustment for very small screens */
@media (max-width: 768px) {
  .project-layout {
    grid-template-columns: 1fr;
  }
}

/* ------ NAVBAR ------- */
.navbar{position:sticky;top:0;width:100%;background:rgba(0,0,0,.8);backdrop-filter:blur(6px);z-index:1000;padding:.75rem 0;transition:transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55)}
.brand{font-weight:800;font-size:1.2rem;letter-spacing:.5px}
.nav-links a{margin-left:1.5rem;font-weight:600;transition:color .2s}
.nav-links a:hover{color:var(--clr-accent)}
.hamburger{display:none;background:none;border:none;cursor:pointer;flex-direction:column;gap:4px}
.hamburger span{width:22px;height:2px;background:#fff;transition:all .3s}

/* Menu overlay (for mobile) */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  pointer-events: none;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ------ HERO ------- */
.hero {
  min-height: 100vh;
  padding: 4rem 0;
  background: #000;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.hero-parallax-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

#layer-1 {
  z-index: 5;
}

#layer-2 {
  z-index: 4;
}

#layer-3 {
  z-index: 3;
}

#layer-4-napis {
  z-index: 2;
  position: relative;
}

#layer-4 {
  z-index: 1;
}

.parallax-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.parallax-layer svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ------ FILM PROJECTOR EFFECT ------- */
/* More visible flickering animation - simulates old film projector light variations */
@keyframes film-flicker {
  0%, 100% { opacity: 1; }
  5% { opacity: 0.92; }
  15% { opacity: 0.88; }
  25% { opacity: 0.96; }
  35% { opacity: 0.90; }
  45% { opacity: 0.94; }
  55% { opacity: 0.86; }
  65% { opacity: 0.93; }
  75% { opacity: 0.97; }
  85% { opacity: 0.89; }
  95% { opacity: 0.95; }
}

/* Screen flicker using fill-opacity for SVG path */
@keyframes screen-flicker {
  0%, 100% { fill-opacity: 1; }
  5% { fill-opacity: 0.94; }
  15% { fill-opacity: 0.91; }
  25% { fill-opacity: 0.97; }
  35% { fill-opacity: 0.93; }
  45% { fill-opacity: 0.96; }
  55% { fill-opacity: 0.90; }
  65% { fill-opacity: 0.95; }
  75% { fill-opacity: 0.98; }
  85% { fill-opacity: 0.92; }
  95% { fill-opacity: 0.96; }
}

/* Improved weave/shake animation - more natural film gate vibration */
@keyframes film-weave {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  8% { transform: translate(0.2px, -0.15px) rotate(0.015deg); }
  16% { transform: translate(-0.15px, 0.2px) rotate(-0.01deg); }
  24% { transform: translate(0.25px, 0.1px) rotate(0.018deg); }
  32% { transform: translate(-0.1px, -0.2px) rotate(-0.015deg); }
  40% { transform: translate(0.18px, 0.18px) rotate(0.012deg); }
  48% { transform: translate(-0.2px, -0.08px) rotate(-0.015deg); }
  56% { transform: translate(0.15px, 0.25px) rotate(0.018deg); }
  64% { transform: translate(0.2px, -0.18px) rotate(-0.012deg); }
  72% { transform: translate(-0.18px, 0.15px) rotate(0.015deg); }
  80% { transform: translate(0.18px, -0.1px) rotate(-0.012deg); }
  88% { transform: translate(-0.12px, 0.2px) rotate(0.015deg); }
  96% { transform: translate(0.08px, -0.15px) rotate(-0.01deg); }
}

/* Apply animations to SVG elements */
.projector-screen,
#Screen {
  animation: screen-flicker 2.5s infinite ease-in-out;
  will-change: fill-opacity;
}

.projector-text,
#Text {
  animation: film-flicker 2.5s infinite ease-in-out, film-weave 1.8s infinite ease-in-out;
  will-change: opacity, transform;
  transform-origin: center center;
}

/* Optional: Projector light beam effect */
#layer-4-napis::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(ellipse at 100% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: film-flicker 5s infinite;
  opacity: 0.6;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .projector-screen,
  .projector-text,
  #Screen,
  #Text,
  #layer-4-napis::after {
    animation: none;
  }
}

.hero .container {
  position: relative;
  z-index: 10;
  justify-content: flex-end;
  padding-top: 43rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}
.subtitle{font-size:1.25rem;font-weight:300;margin-bottom:2rem}
.video-wrapper{width:100%;max-width:800px;margin:0 auto 2rem;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
iframe{width:100%;aspect-ratio:16/9}

/* ------ CTA SECTION ------- */
.cta-section {
  padding: 3rem 0;
  background: #000;
  display: none; /* Hidden by default, shown on mobile */
}

.cta-section .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ------ VIDEO PLAYER CUSTOMIZATION ------- */
.video-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Optional: Add subtle enhancements */
.video-wrapper video {
  filter: saturate(1.1); /* Slightly enhance colors */
}

/* ------ BUTTON BORDER ANIMATION ------- */
@keyframes borderFlare {
  0% {
    box-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 15px #FFA500;
  }
  100% {
    box-shadow: 0 0 10px #FFA500, 0 0 20px #FFA500, 0 0 30px #FFD700;
  }
}

/* ------ BUTTONS ------- */
.btn-primary,.btn-outline{display:inline-block;padding:.9rem 2rem;border-radius:var(--radius);font-weight:600;transition:all .3s ease;border:2px solid var(--clr-accent)}
.btn-primary{background:var(--clr-accent);color:#000;border-color:var(--clr-accent)}
.btn-primary:hover{background:#ff6b5d;transform:translateY(-2px)}
.btn-outline{background:none;color:var(--clr-accent)}
.btn-outline:hover{background:var(--clr-accent);color:#000}

/* ------ HERO CTA BUTTON ------- */
.btn-hero{display:inline-block;padding:.9rem 2rem;border-radius:var(--radius);font-weight:600;transition:all .3s ease;border:2px solid #FFD700;background:linear-gradient(135deg, #FFD700, #FFA500);color:#000}
.btn-hero:hover{animation:borderFlare 0.6s forwards;transform:scale(1.05)}

/* ------ OFFER & SERVICES ------- */
.offer,.services{padding:7rem 0}
.offer-block{background:#0d0d0d;padding:2rem;border-radius:var(--radius);box-shadow:var(--shadow)}
.offer-block h3{color:var(--clr-accent)}

.services img{border-radius:var(--radius);box-shadow:var(--shadow)}
.checklist{list-style:none;margin-top:1rem}
.checklist li{display:flex;align-items:flex-start;margin-bottom:0.75rem}
.checklist li::before{content:"✔";color:var(--clr-accent);margin-right:.5rem;flex-shrink:0;margin-top:0.1rem}

/* ------ WORK SECTION ------- */
.work{padding:4rem 0}
.work-grid .work-item{position:relative;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);aspect-ratio:16/9}
.work-grid .work-item img{width:100%;height:100%;object-fit:cover;object-position:center}
.overlay{position:absolute;inset:0;background:rgba(0,0,0,.6);display:flex;justify-content:center;align-items:center;font-weight:600;opacity:0;transition:opacity .3s}
.work-item:hover .overlay{opacity:1}

.work-title-mobile {
  display: none;
}

.work-title-desktop {
  display: block;
}

/* ------ CONTACT ------- */
.contact{padding:4rem 0;background:#0d0d0d}
.contact-form{display:flex;flex-direction:column;gap:1rem}
.contact-form label{display:flex;flex-direction:column;font-size:.9rem;font-weight:600}
.contact-form input,.contact-form textarea{padding:.8rem 1rem;border:none;border-radius:var(--radius);margin-top:.3rem}
.contact-form input:focus,.contact-form textarea:focus{outline:2px solid var(--clr-accent)}

/* ------ FOOTER ------- */
.footer{padding:2rem 0;color:#777}

/* ------ RESPONSIVE NAV ------- */
@media(max-width:768px){
  /* Hamburger icon */
  .hamburger {
    display: flex;
    z-index: 1001;
    position: relative;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
  }
  
  .hamburger span {
    position: absolute;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  .hamburger span:nth-child(1) {
    top: 8px;
  }
  
  .hamburger span:nth-child(2) {
    top: 14px;
  }
  
  .hamburger span:nth-child(3) {
    top: 20px;
  }
  
  /* Transform to X when open */
  body.menu-open .hamburger span:nth-child(1) {
    top: 14px;
    transform: rotate(45deg);
  }
  
  body.menu-open .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
  }
  
  body.menu-open .hamburger span:nth-child(3) {
    top: 14px;
    transform: rotate(-45deg);
  }
  
  /* Mobile navigation menu */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    width: 280px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    z-index: 1000;
  }
  
  /* Add brand name to mobile menu */
  .nav-links::before {
    content: 'SEGMENT F';
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--clr-accent);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
    transition-delay: 0.1s;
  }
  
  .nav-links.open::before {
    opacity: 1;
    transform: translateX(0);
  }
  
  /* Decorative line below brand */
  .nav-links::after {
    content: '';
    position: absolute;
    top: 4.5rem;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background: linear-gradient(90deg, var(--clr-accent), transparent);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all 0.5s ease;
    transition-delay: 0.2s;
  }
  
  .nav-links.open::after {
    opacity: 0.6;
    transform: scaleX(1);
  }
  
  /* Open state */
  .nav-links.open {
    transform: translateX(0);
  }
  
  body.menu-open {
    overflow: hidden;
  }
  
  .navbar .brand,
  .navbar .hamburger,
  main,
  section,
  footer {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  body.menu-open .navbar .brand,
  body.menu-open .navbar .hamburger,
  body.menu-open main,
  body.menu-open section,
  body.menu-open footer {
    transform: translateX(-50px);
  }
  
  /* Mobile nav-links positioning */
  .nav-links {
    transform: translateX(100%);
  }
  
  .nav-links.open {
    transform: translateX(0) !important;
  }
  
  /* Menu links styling */
  .nav-links a {
    display: block;
    margin: 0;
    padding: 1.2rem 0;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
  }
  
  /* Staggered animation for links */
  .nav-links.open a:nth-child(1) {
    transition-delay: 0.15s;
    opacity: 1;
    transform: translateX(0);
  }
  
  .nav-links.open a:nth-child(2) {
    transition-delay: 0.25s;
    opacity: 1;
    transform: translateX(0);
  }
  
  .nav-links.open a:nth-child(3) {
    transition-delay: 0.35s;
    opacity: 1;
    transform: translateX(0);
  }
  
  .nav-links.open a:nth-child(4) {
    transition-delay: 0.45s;
    opacity: 1;
    transform: translateX(0);
  }
  
  .nav-links.open a:nth-child(5) {
    transition-delay: 0.55s;
    opacity: 1;
    transform: translateX(0);
  }
  
  /* Hover effect on links */
  .nav-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--clr-accent);
    transition: height 0.3s ease;
  }
  
  .nav-links a:hover::before {
    height: 100%;
  }
  
  .nav-links a:hover {
    color: var(--clr-accent);
    padding-left: 1rem;
  }
  
  /* Overlay behind menu */
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* ------ JOURNEY TIMELINE ------- */
.journey {
  padding: 5rem 0;
  background: #0d0d0d;
}

.timeline {
  position: relative;
  margin: 3rem 0;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--clr-accent);
  opacity: 0.4;
  z-index: 1;
}

/* Add timeline progress marker that follows scroll */
.timeline::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--clr-accent);
  box-shadow: 0 0 10px var(--clr-accent);
  z-index: 5;
  opacity: 0;
  transition: top 0.1s ease-out, opacity 0.5s ease;
}

.timeline.scrolling::after {
  opacity: 1;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem; /* Increased from 3rem */
  position: relative;
  padding: 0 1rem;
  opacity: 0.6;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.timeline-item.active {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-number {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scale(1);
  background: var(--clr-accent);
  color: #000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 0 0 5px rgba(255, 74, 59, 0.2);
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item.active .timeline-number {
  transform: translateX(-50%) scale(1.15);
  box-shadow: 0 0 0 8px rgba(255, 74, 59, 0.3), 0 0 20px rgba(255, 74, 59, 0.5);
}

.timeline-content {
  background: rgba(13, 13, 13, 0.7);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 3px solid var(--clr-accent);
  grid-column: 2 / 3;
  margin-left: 2rem; /* Increased margin where boxes touch the line */
  backdrop-filter: blur(5px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.timeline-item:nth-child(even) .timeline-content {
  grid-column: 1 / 2;
  border-left: none;
  border-right: 3px solid var(--clr-accent);
  margin-left: 0;
  margin-right: 2rem; /* Increased margin where boxes touch the line */
}

.timeline-item.active .timeline-content {
  box-shadow: 0 8px 30px rgba(255, 74, 59, 0.2);
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  .timeline::before {
    display: none; /* Hide the vertical line on mobile */
  }
  
  .timeline::after {
    display: none; /* Hide the circle marker on mobile */
  }
  
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .timeline-number {
    display: none; /* Hide the timeline numbers on mobile */
  }
  
  .timeline-content {
    grid-column: 1 / -1 !important;
    padding-left: 1.5rem;
    margin-left: 0 !important;
    border-left: none !important;
    border-right: none !important;
    margin-right: 0 !important;
  }
}

/* ------ AI EVOLUTION COMPARISON ------- */
.ai-evolution {
  padding: 5rem 0;
  background: linear-gradient(to bottom, #0d0d0d, #000);
}

.video-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

.comparison-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comparison-item h3 {
  margin-bottom: 1rem;
  color: var(--clr-accent);
  position: relative;
  display: inline-block;
}

.comparison-item h3::after {
  content: '';
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: -5px;
  height: 2px;
  background: var(--clr-accent);
  opacity: 0.6;
}

.evolution-message {
  margin-top: 4rem;
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.intro-text {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--clr-accent);
}

.message-highlight {
  background: rgba(13, 13, 13, 0.7);
  border-left: 4px solid var(--clr-accent);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.message-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 74, 59, 0.05), transparent);
  z-index: -1;
}

.message-highlight p {
  margin-bottom: 1.5rem;
}

.message-highlight p:last-child {
  margin-bottom: 0;
}

.emphasis {
  color: var(--clr-accent);
  font-weight: 700;
}

.call-to-action {
  font-weight: 800;
  font-size: 1.2rem;
  text-align: center;
}

@media (max-width: 768px) {
  .video-comparison {
    grid-template-columns: 1fr;
    gap: 1rem; /* Reduced from 2rem for tighter spacing */
  }
  
  .comparison-item + .comparison-item {
    margin-top: 1rem; /* Reduced from 2rem for tighter spacing */
  }
}

/* ------ FAQ STYLES ------- */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-category {
  margin-bottom: 3rem;
}

.faq-category h3 {
  color: var(--clr-accent);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.faq-category h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--clr-accent);
  opacity: 0.6;
}

.faq-item {
  background: rgba(13, 13, 13, 0.7);
  border-left: 3px solid var(--clr-accent);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-question {
  padding: 1.5rem;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: all 0.3s ease;
}

.faq-answer ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 1500px;
  padding-bottom: 1.5rem;
  overflow: visible;
}

.faq-hero {
  padding: 3rem 0;
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), #000 url('image/Tło-kino.png') center/cover no-repeat;
}

/* ------ FAQ LINK STYLES ------- */
.faq-answer a {
  color: #4A90E2;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.faq-answer a:hover {
  color: #6BA3F0;
  text-decoration: underline;
}

/* ------ FORM LOADING SPINNER ------- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ------ POPUP MODAL SYSTEM ------- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: #0d0d0d;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(-30px) scale(0.9);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.popup-overlay.show .popup-content {
  transform: translateY(0) scale(1);
}

.popup-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
}

.popup-icon.loading {
  background: rgba(255, 74, 59, 0.1);
  border: 3px solid rgba(255, 74, 59, 0.3);
}

.popup-icon.success {
  background: rgba(76, 175, 80, 0.1);
  border: 3px solid #4CAF50;
  color: #4CAF50;
}

.popup-icon.error {
  background: rgba(244, 67, 54, 0.1);
  border: 3px solid #f44336;
  color: #f44336;
}

.popup-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 74, 59, 0.3);
  border-radius: 50%;
  border-top-color: var(--clr-accent);
  animation: spin 1s linear infinite;
}

.popup-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.popup-message {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #ccc;
}

.popup-close {
  background: var(--clr-accent);
  color: #000;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.popup-close:hover {
  background: #ff6b5d;
}

.popup-close.success {
  background: #4CAF50;
  color: white;
}

.popup-close.success:hover {
  background: #45a049;
}

/* ------ OFFER PAGE STYLES ------- */
.offer-hero-bg {
  background: #000;
}

.fancy-divider {
  width: 500px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--clr-accent) 50%, transparent 100%);
  position: relative;
  margin: 0 auto;
}

.fancy-divider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 74, 59, 0.5);
}

.offer-hero-image {
  position: relative;
  overflow: hidden;
  height: 35vh;
}

.offer-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.offer-hero-content {
  padding: 3rem 1rem;
}

.offer-hero-buttons {
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 6rem;
}

.why-us-container {
  max-width: 900px;
  margin: 0 auto;
}

.why-us-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.why-us-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: rgba(13, 13, 13, 0.7);
  padding: 2rem;
  border-radius: 12px;
  border-left: 4px solid var(--clr-accent);
}

.why-us-number {
  font-size: 2.5rem;
  color: var(--clr-accent);
  font-weight: 800;
  min-width: 50px;
}

.why-us-content h3 {
  margin-bottom: 0.5rem;
}

.why-us-content p {
  margin: 0;
}

/* ------ PRODUCT SHOWCASE ------- */
.product-showcase {
  padding: 5rem 0;
  background: #0a0a0a;
}

.product-showcase-intro {
  max-width: 900px;
  margin: 0 auto 3rem;
  font-size: 1.2rem;
  line-height: 1.6;
}

.product-showcase-grid {
  grid-template-columns: 0.6fr 1fr;
  gap: 4rem;
  align-items: center;
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
}

.product-image-wrapper {
  position: relative;
  width: 65%;
  margin-left: auto;
  margin-right: 60px;
}

.product-image-wrapper::after {
  content: '';
  position: absolute;
  right: -45px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 20px;
  height: 20px;
  border-top: 4px solid var(--clr-accent);
  border-right: 4px solid var(--clr-accent);
  filter: drop-shadow(0 4px 8px rgba(255, 74, 59, 0.5));
  z-index: 10;
}

.product-image-wrapper img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

.product-video-wrapper {
  width: 75%;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

/* ------ PRICING SECTION ------- */
.pricing-intro {
  max-width: 900px;
  margin: 0 auto;
}

.pricing-intro > p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  text-align: center;
}

.pricing-intro h3 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.pricing-list {
  max-width: 700px;
  margin: 0 auto 2rem;
  list-style: disc;
  list-style-position: outside;
  padding-left: 1.5rem;
}

.pricing-list li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.pricing-list li::marker {
  color: var(--clr-accent);
}

.pricing-cta {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--clr-accent);
}

/* ------ WHITE LABEL SECTION ------- */
.white-label-content {
  max-width: 900px;
  margin: 0 auto;
}

.white-label-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  text-align: center;
}

.white-label-list {
  max-width: 900px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
  list-style: none;
}

.white-label-list li {
  background: #0d0d0d;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: block;
}

.white-label-list li::before {
  margin-right: 0.8rem;
}

.white-label-closing {
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 2rem;
}

/* ------ FORM MESSAGES (fallback) ------- */
.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-weight: 600;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

.form-message-success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid #4CAF50;
  color: #4CAF50;
}

.form-message-error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid #f44336;
  color: #f44336;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   MOBILE RESPONSIVE FIXES - MOBILE ONLY
   ======================================== */

@media (max-width: 768px) {
  /* Hero section mobile fixes */
  .hero {
    min-height: 40vh; /* Changed from 50vh to 40vh - smaller */
    padding: 1rem 0 2rem;
  }

  .hero .container {
    padding-top: 6rem; /* Reduced from 8rem for smaller hero */
  }

  /* Parallax layers mobile optimization */
  .hero-parallax-container {
    height: 40vh; /* Match hero height - smaller */
  }

  .parallax-layer img,
  .parallax-layer svg {
    object-fit: cover;
    object-position: center top; /* Focus on top of images */
  }

  /* Hero button mobile sizing */
  .hero .btn-hero {
    display: none; /* Hide hero button on mobile */
  }

  /* Show CTA section on mobile */
  .cta-section {
    display: block;
    padding: 2rem 0;
    background: linear-gradient(to bottom, #000, #0d0d0d);
  }

  .cta-section .btn-hero {
    padding: 1rem 2rem;
    font-size: 1rem;
    width: 90%;
    max-width: 350px;
    text-align: center;
  }

  /* Offer section mobile */
  .offer {
    padding: 3rem 0;
  }

  .offer .cols-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .offer-block {
    padding: 1.5rem;
  }

  /* Services section mobile */
  .services {
    padding: 3rem 0;
  }

  .services .cols-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .services h2 {
    font-size: 1.8rem;
  }

  /* Work/Realizacje grid mobile */
  .work {
    padding: 3rem 0;
  }

  .work-title-mobile {
    display: block;
  }

  .work-title-desktop {
    display: none;
  }

  .work-grid.cols-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
    display: none; /* Hide entire grid on mobile */
  }

  .work-grid .work-item {
    display: none; /* Hide work item images on mobile */
  }

  .work .container h2 {
    margin-bottom: 2rem;
  }

  .work-btn {
    width: 100%;
    max-width: 300px;
    display: inline-block;
  }

  /* AI Evolution section mobile */
  .ai-evolution {
    padding: 3rem 0;
  }

  .ai-evolution h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .video-comparison {
    grid-template-columns: 1fr;
    gap: 1rem; /* Reduced from 2rem for tighter spacing */
  }

  .comparison-item h3 {
    font-size: 1.3rem;
  }

  .intro-text {
    font-size: 1.1rem;
    padding: 0 1rem;
  }

  .message-highlight {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }

  .message-highlight p {
    font-size: 0.95rem;
  }

  .call-to-action {
    font-size: 1.1rem;
  }

  /* Journey/Timeline section mobile */
  .journey {
    padding: 3rem 0;
  }

  .journey h2 {
    font-size: 1.8rem;
  }

  .timeline-item {
    margin-bottom: 3rem;
    padding: 0;
  }

  .timeline-content h3 {
    font-size: 1.2rem;
  }

  .timeline-content p {
    font-size: 0.95rem;
  }

  /* Contact section mobile */
  .contact {
    padding: 3rem 0;
  }

  .contact .cols-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact h2 {
    font-size: 1.8rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Buttons mobile */
  .btn-primary,
  .btn-outline {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Typography mobile */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  p {
    font-size: 0.95rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  /* Container mobile spacing */
  .container {
    width: 95%;
  }

  /* Popup modal mobile */
  .popup-content {
    width: 95%;
    padding: 2rem 1.5rem;
  }

  .popup-title {
    font-size: 1.3rem;
  }

  .popup-message {
    font-size: 1rem;
  }

  /* FAQ section mobile (if exists) */
  .faq-container {
    width: 100%;
  }

  .faq-question {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    font-size: 0.9rem;
  }

  .faq-hero {
    padding: 1rem 0; /* Reduced from 2rem 0 */
  }

  /* Footer mobile */
  .footer {
    padding: 1.5rem 0;
  }

  /* Video wrapper mobile */
  .video-wrapper {
    max-width: 100%;
    margin: 0 auto 1.5rem;
  }

  /* Gap utilities mobile */
  .gap-4 {
    gap: 1.5rem;
  }

  .gap-2 {
    gap: 0.75rem;
  }

  /* Margin utilities mobile */
  .mt-4 {
    margin-top: 1.5rem;
  }

  /* Product showcase mobile - video on top, images below with upward arrows */
  .product-showcase-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-showcase-grid {
    display: flex;
    flex-direction: column-reverse;
  }

  .product-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .product-image-wrapper {
    width: 100%;
    margin: 0;
    padding-top: 50px;
    position: relative;
  }

  .product-image-wrapper::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 15px;
    transform: translateX(-50%) rotate(-45deg);
    width: 20px;
    height: 20px;
    border-top: 4px solid var(--clr-accent);
    border-right: 4px solid var(--clr-accent);
    filter: drop-shadow(0 4px 8px rgba(255, 74, 59, 0.5));
  }

  .product-video-wrapper {
    width: 100%;
  }
}

/* Small mobile devices - extra small screens */
@media (max-width: 480px) {
  .hero {
    min-height: 40vh; /* Keep same height */
  }

  .hero .container {
    padding-top: 4rem; /* Further reduced for very small screens */
  }

  .hero-parallax-container {
    height: 40vh; /* Keep same height */
  }

  .btn-hero {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .navbar .brand {
    font-size: 1.1rem;
  }

  .timeline-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .offer-block,
  .timeline-content,
  .message-highlight {
    padding: 1.25rem;
  }

  .container {
    width: 95%;
  }
}

/* Landscape mobile orientation fix */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 50vh; /* Slightly taller in landscape */
    padding: 1rem 0;
  }

  .hero .container {
    padding-top: 8rem;
  }

  .hero-parallax-container {
    height: 50vh;
  }
}


