/* ==========================================================================
   SMARTHOUSE UNISERWIS V2.1 - REFINED PREMIUM (DARK & GLASS)
   ========================================================================== */

/* 1. RESET & ATOMIC VARIABLES */
:root {
  --c-dark-bg: #0B1220; 
  --c-true-black: #05080f;
  --c-card-bg: rgba(18, 28, 45, 0.4);
  
  --c-orange: #FF8A00;
  --c-orange-hover: #ff9d2a;
  --c-orange-glow: rgba(255, 138, 0, 0.15);
  
  --c-blue: #00A6E0;
  --c-blue-hover: #1abdf8;
  --c-blue-glow: rgba(0, 166, 224, 0.15);

  --c-text-primary: #F8FAFC;
  --c-text-secondary: #94A3B8;
  --c-border: rgba(255, 255, 255, 0.1);
  --c-border-hover: rgba(255, 255, 255, 0.25);

  --font-hero: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --nav-height: 100px;
  --container-max-w: 1280px;
  --radius-card: 20px;
  --radius-btn: 99px;
  
  --trans-base: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --trans-reveal: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. BASE RESET & ACCESSIBILITY */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; width: 100vw; max-width: 100%;}
body {
  font-family: var(--font-body);
  background: var(--c-dark-bg);
  background: linear-gradient(180deg, var(--c-true-black) 0%, var(--c-dark-bg) 20%, var(--c-dark-bg) 80%, var(--c-true-black) 100%);
  color: var(--c-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%; 
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: inherit; text-decoration: none; transition: all var(--trans-base); }
ul { list-style: none; }
button { font-family: inherit; }

/* 3. TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-hero); font-weight: 700; color: var(--c-text-primary); line-height: 1.15; letter-spacing: -0.02em; }
.hero-headline { font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 800; margin-bottom: 24px; }
.hero-subheadline { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--c-text-secondary); font-weight: 400; max-width: 800px; }
.section-title { font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 700; margin-bottom: 16px; }
.card-title { font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }

/* Refined Gradients */
.txt-gradient {
  background: linear-gradient(135deg, #FF8A00 0%, #ffc06a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.txt-gradient-blue {
  background: linear-gradient(135deg, #00A6E0 0%, #6be3ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.txt-orange { color: var(--c-orange); }
.txt-blue { color: var(--c-blue); }
.txt-dimmed { color: var(--c-text-secondary); }

/* 4. LAYOUT / GRID */
.container { width: 100%; max-width: var(--container-max-w); margin: 0 auto; padding: 0 24px; }
.relative { position: relative; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }

.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* 16 items grid specific (4 columns) */
.grid-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.py-hero { padding-top: 180px; padding-bottom: 100px; }
.py-section { padding-top: 100px; padding-bottom: 100px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-10 { margin-bottom: 40px; }
.mt-10 { margin-top: 40px; }
.mt-16 { margin-top: 64px; }

/* 5. BUTTONS & LINKS */
.btn {
  display: inline-flex; justify-content: center; align-items: center; text-align: center;
  padding: 16px 36px;
  font-family: var(--font-hero); font-weight: 600; font-size: 1.1rem;
  border-radius: var(--radius-btn); transition: all var(--trans-base); cursor: pointer; border: none; white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--c-orange); color: #000; box-shadow: 0 0 25px var(--c-orange-glow); }
.btn-primary:hover { background: var(--c-orange-hover); box-shadow: 0 0 40px rgba(255, 138, 0, 0.3); transform: translateY(-2px); }

.btn-outline { background: transparent; border: 1px solid var(--c-border); color: var(--c-text-primary); }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: var(--c-border-hover); }

.btn-blue { background: var(--c-blue); color: #fff; border: 1px solid var(--c-blue); font-weight: 600; box-shadow: 0 4px 14px rgba(0, 195, 255, 0.15); transition: all var(--trans-base); }
.btn-blue:hover { background: var(--c-blue-hover); border-color: var(--c-blue-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 195, 255, 0.3); color: #fff; }

.link-action { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-hero); font-weight: 600; color: var(--c-blue); }
.link-action svg { transition: transform var(--trans-base); }
.link-action:hover { color: var(--c-blue-hover); }
.link-action:hover svg { transform: translateX(6px); }

/* 6. GLASSMORPHISM NAVBAR */
/* MOBILE NAWIGACJA (Ukryta domyślnie na desktopie) */
.mobile-header, .mobile-nav-slider-container { display: none; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); z-index: 999;
  background: transparent; border-bottom: 1px solid transparent; transition: all var(--trans-base);
}
.nav.is-scrolled { background: rgba(6, 10, 19, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--c-border); }

.nav .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.nav-logo { display: flex; align-items: center; gap: 16px; transition: transform var(--trans-base); }
.nav-logo:hover { transform: scale(0.98); }
.nav-logo img { 
  height: clamp(45px, 6vw, 65px); 
  object-fit: contain; 
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
  transition: all var(--trans-base);
}
.nav-logo:hover img { transform: scale(1.05); }

.logo-text { display: flex; flex-direction: column; justify-content: center; }
.logo-text .top { 
  font-size: 0.75rem; font-family: var(--font-body); font-weight: 600; 
  letter-spacing: 2px; text-transform: uppercase; color: var(--c-text-secondary); 
  margin-bottom: 2px; line-height: 1;
}
.logo-text .bottom { 
  font-size: 1.4rem; font-family: var(--font-hero); font-weight: 800; line-height: 1; letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-item { position: relative; }
.nav-link { font-family: var(--font-hero); font-size: 1.05rem; font-weight: 500; color: var(--c-text-primary); display: flex; align-items: center; gap: 6px; }
.nav-link:hover { color: var(--c-orange); }

/* 7. HAMBURGER & MOBILE OVERLAY (USUNIĘTE W V2.3) */
/* 8. HERO, CARDS & SHOWROOM */
.hero { position: relative; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;}
.glow-orb { position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.12; animation: breathe 15s ease-in-out infinite alternate; pointer-events: none;}
.glow-orb-1 { width: 60vw; height: 60vw; top: -10%; right: -10%; background: var(--c-orange); }
.glow-orb-2 { width: 50vw; height: 50vw; bottom: 10%; left: -10%; background: var(--c-blue); animation-delay: -5s;}

.hero .container { position: relative; z-index: 10;}

.glass-panel {
  background: var(--c-card-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius-card); padding: 40px;
  backdrop-filter: blur(12px); transition: border var(--trans-base), transform var(--trans-base);
  height: 100%; display: flex; flex-direction: column;
}
.glass-panel:hover { border-color: var(--c-border-hover); transform: translateY(-4px); }
.icon-box { 
  width: 56px; height: 56px; border-radius: 14px; background: rgba(0,0,0,0.4); 
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; 
  color: #fff; border: 1px solid var(--c-border); font-size: 1.5rem;
}

/* Showroom Highlight */
.showroom-banner {
  background: linear-gradient(135deg, rgba(255,138,0,0.1) 0%, rgba(0,0,0,0) 100%);
  border: 1px solid rgba(255,138,0,0.3);
  border-radius: var(--radius-card); padding: 56px 40px;
  position: relative; overflow: hidden;
}

/* Feature Row */
.story-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; margin-bottom: 64px; }
.story-row.reverse { grid-template-columns: 1fr 1fr; }
.story-row.reverse .story-img { order: 2; }
.story-row.reverse .story-content { order: 1; }
.story-img {
  width: 100%; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--c-border); aspect-ratio: 4/3; background: #000;
  display: flex; justify-content: center; align-items: center; text-align: center; color: var(--c-text-secondary);
}

/* 9. FOOTER & FAB (MOBILE) */
.footer { border-top: 1px solid var(--c-border); padding: 80px 0 40px 0; background: var(--c-true-black); }
.footer-logo { height: 48px; width: auto; object-fit: contain; }
.footer .brand-col .nav-logo { justify-content: flex-start; }
.footer-title { font-size: 1.15rem; margin-bottom: 24px; font-family: var(--font-hero); color:#fff; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--c-text-secondary); transition: color var(--trans-base); font-size: 0.95rem; }
.footer-links a:hover { color: var(--c-orange); }
.footer-eu-banner { display: block; max-width: 320px; width: 100%; height: auto; opacity: 1; margin-top: 24px; border-radius: 8px; background: rgba(255,255,255,0.08); padding: 12px;}

.fab {
  position: fixed; bottom: 32px; right: 32px; z-index: 990;
  background: var(--c-orange); color: #000; font-family: var(--font-hero); font-weight: 700;
  display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-radius: 99px;
  box-shadow: 0 20px 40px var(--c-orange-glow);
  transform: translateY(150px); opacity: 0; transition: all var(--trans-base);
}
.fab.is-visible { transform: translateY(0); opacity: 1; }

/* 10. ANIMATIONS / REVEALS */
.reveal { opacity: 0; transform: translateY(30px); transition: all var(--trans-reveal); filter: blur(4px); }
.reveal.is-active { opacity: 1; transform: translateY(0); filter: blur(0); }
.d-100 { transition-delay: 0.1s; } .d-200 { transition-delay: 0.2s; } .d-300 { transition-delay: 0.3s; }

@keyframes breathe { 0% { transform: scale(1) translate(0px, 0px); } 100% { transform: scale(1.1) translate(-20px, 30px); } }

/* 11. MEDIA QUERIES (Mobile Fixes) */
@media (max-width: 1024px) {
  .hero-headline { font-size: 3.5rem; }
  .grid-4, .grid-3, .grid-features { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .story-row, .story-row.reverse { grid-template-columns: 1fr; gap: 40px; }
  .story-row.reverse .story-img { order: 1; }
  .story-row.reverse .story-content { order: 2; }
}

@media (max-width: 768px) {
  /* overflow-x: hidden na body/html blokuje position: sticky - zamiast tego blokujemy overflow tylko na głównym contencie */
  html { overflow-x: clip; }
  body { overflow-x: hidden; width: 100%; }
  main { overflow-x: hidden; }
  .fab { display: none !important; }

  /* Wyłączenie animacji Reveal na telefonach dla idealnej płynności przesuwania palcem */
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }

  /* Ukrycie paska głównego dla mobile */
  .nav { display: none !important; }
  
  /* MOBILNY HEADER */
  .mobile-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: rgba(6, 10, 19, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid var(--c-border);
  }
  .mobile-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
  .mobile-logo img { height: 32px; object-fit: contain; }
  .mobile-logo .logo-text .top { font-size: 0.6rem; margin-bottom: 0px; }
  .mobile-logo .logo-text .bottom { font-size: 1rem; }
  .btn-mobile-call {
    background: var(--c-orange); color: #000; font-family: var(--font-hero);
    font-weight: 700; font-size: 0.9rem; padding: 8px 16px;
    border-radius: 99px; text-decoration: none; box-shadow: 0 0 15px rgba(255, 138, 0, 0.2);
  }
  
  /* MOBILNY SLIDER (Coca-Cola style) */
  .mobile-nav-slider-container {
    display: block; /* Upewni się że pokazuje się pod 768px */
    width: 100%; background: var(--c-true-black);
    border-bottom: 1px solid var(--c-border);
    padding: 24px 0 16px 0; overflow: hidden;
  }
  .mobile-nav-slider {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 16px; padding: 0 50px 0 24px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .mobile-nav-slider::-webkit-scrollbar { display: none; }
  
  .mobile-nav-slide {
    flex: 0 0 calc(100vw - 80px); scroll-snap-align: center;
    background: var(--c-card-bg); border: 1px solid var(--c-border);
    border-radius: 16px; overflow: hidden; text-decoration: none;
    display: flex; flex-direction: column; transition: transform 0.3s ease;
  }
  .mobile-nav-slide:active { transform: scale(0.98); }
  
  .slide-img { width: 100%; aspect-ratio: 16/9; background: #000; overflow: hidden; }
  .slide-img img { width: 100%; height: 100%; object-fit: cover; }
  
  .slide-text { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
  .slide-title { font-family: var(--font-hero); font-weight: 700; font-size: 1.15rem; color: #fff; line-height: 1.2;}
  .slide-desc { font-family: var(--font-body); font-size: 0.85rem; color: var(--c-text-secondary); line-height: 1.3; }
  
  /* KROPKI SLIDERA */
  .mobile-nav-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
  .nav-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.3s ease; }
  .nav-dot.active { background: var(--c-orange); width: 24px; border-radius: 4px; }
  
  .grid-2, .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .grid-features { grid-template-columns: 1fr; }
  
  .py-hero { padding-top: 24px; padding-bottom: 40px; }
  .py-section { padding-top: 40px; padding-bottom: 40px; }
  .glass-panel { padding: 24px; }
  .showroom-banner { padding: 32px 24px; }
  
  .hero-headline { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  
  /* Fix overflow issues on small devices pushing content off screen */
  .container { padding: 0 16px; overflow-x: hidden; }
  .story-row { gap: 24px; margin-bottom: 40px; }
  .btn { width: 100%; white-space: normal; padding: 14px 20px;}
  .flex { flex-direction: column; width: 100%; }
  
  .fab { bottom: 16px; right: 16px; left: 16px; padding: 14px 20px; font-size: 1rem; justify-content: center; }
}
