/* --- 1. ZMIENNE GLOBALNE (KOLORY I CZCIONKI) --- */
:root {
  /* Kolory podstawowe */
  --primary: #1D837D;
  --primary-contrast: #ffffff;
  --dark: #0f172a;
  --gray: #64748b;
  --light: #f8fafc;

  /* Kolory tła i tekstu - tryb jasny */
  --bg-body: #ffffff;
  --text-main: #0f172a;
  --text-secondary: #64748b;
  --card-bg: #f8fafc;
  --nav-bg: #ffffff;
  --border-color: #e5e7eb;

  /* Zmienne czcionek */
  --font-size-base: 18px;
  --font-size-h1: 3rem;
  --font-size-h2: 2.2rem;
  --font-size-h3: 1.2rem;
  --font-size-small: 0.9rem;
  --font-weight-normal: 400;
  --font-weight-bold: 700;

  /* Marginesy */
  --header-offset: 80px;
}

/* Kolory dla trybu ciemnego */
body.dark {
  --bg-body: #0b1220;
  --text-main: #e5e7eb;
  --text-secondary: #94a3b8;
  --card-bg: #111827;
  --nav-bg: #0b1220;
  --border-color: #1e293b;
}

/* --- RESET I BAZOWE STYLE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background: var(--bg-body);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  font-size: var(--font-size-base);
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
.container { max-width: 1200px; margin: auto; padding: 0 20px; }
section { padding: 80px 0; scroll-margin-top: var(--header-offset); }

/* --- HEADER I NAWIGACJA --- */
header {
  border-bottom: 1px solid var(--border-color);
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  position: relative;
}

/* Logo */
.logo {
  font-weight: var(--font-weight-bold);
  font-size: 1.4rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  margin-left: 40px;
}

/* Prawa strona - kontener dla menu i przycisków */
.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-right: 40px;
}

/* Menu desktopowe (Linki) - po prawej stronie */
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-main);
}
.nav-links a:hover {
  color: var(--primary);
}

/* Przycisk Hamburgera (dla mobile) */
.hamburger {
  display: none; /* Ukryty na desktopie */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-main);
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
}

/* Animacja Hamburgera -> X */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Przyciski w headerze (Prawa strona) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Przycisk CTA ogólny */
.cta-btn {
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform .25s, box-shadow .25s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(29, 131, 125, 0.3);}

/* Przycisk przełączania motywu */
#themeToggle {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s;
}
#themeToggle:hover {
  background: var(--border-color);
  transform: rotate(15deg);
}

/* --- HERO SEKCJA --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
/* Tekst po lewej na desktop */
.hero-text { order: 1; }
/* Zdjęcie po prawej na desktop */
.hero-img {
  order: 2;
  /* background: #FFFFFF;  */
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* box-shadow: 0 20px 40px rgba(0,0,0,0.05); */
  transition: transform .3s;
}
.hero-img:hover { transform: scale(1.02); }
.hero-img img { width: 100%; height: auto; display: block; }

.hero h1 { font-size: var(--font-size-h1); line-height: 1.2; color: var(--text-main); margin-bottom: 10px; }
.hero p { margin: 20px 0; color: var(--text-secondary); font-size: 1.1rem; }
.hero-description { margin: 15px 0; color: var(--text-secondary); font-size: 1.1rem; }
.hero-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.secondary-btn { border: 2px solid var(--primary); color: var(--primary); padding: 10px 24px; border-radius: 999px; font-weight: 600; }

/* --- STEPS (Jak to działa) --- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; text-align: center; max-width: 1000px; margin: auto; }
.step { background: var(--card-bg); padding: 24px; border-radius: 20px; transition: transform .25s, box-shadow .25s; }
.step:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.step img { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; margin-bottom: 15px; }

/* --- FEATURES (Co potrafi Tapi Photo) --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
  border: 1px solid transparent;
}
.feature:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--primary); }
.feature-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
  background-color: #ddd;
}
.feature h3 { font-size: var(--font-size-h3); margin-bottom: 8px; color: var(--text-main); }
.feature p { color: var(--text-secondary); font-size: 0.9rem; }

/* --- VIDEOS (Jak to działa - wideo) --- */
.videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.video-tile {
  border-radius: 24px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  color: white;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  z-index: 1;
}
.video-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.3);
  transition: background 0.3s;
  z-index: 1;
}
.video-tile:hover::before { background: rgba(0,0,0,.1); }
.video-tile:hover { transform: none; }
.video-tile > div:first-of-type {
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease-out;
  z-index: 0;
}
.video-tile:hover > div:first-of-type {
  transform: scale(1.1);
}

/* Przycisk PLAY z podwójną ramką */
.video-play {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);

  /* Ramki: wewnętrzna turkusowa 2px, zewnętrzna biała 15px */
  border: 2px solid var(--primary);
  outline: 15px solid white;
}
.video-tile:hover .video-play {
  transform: scale(1.15);
}
.video-play svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
  margin-left: 4px;
}

/* --- BEFORE / AFTER (Przed i po) --- */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.3s;
}
.compare:hover { transform: scale(1.02); }
.compare .img-tile { height: 200px; background-size: cover; background-position: center; position: relative; transition: transform 0.3s; }
.compare .img-tile:hover { transform: scale(1.1); z-index: 2; }
.compare .img-tile.before .label { background: var(--primary); color: white; }
.compare .img-tile.after .label { background: #7742F4; color: white; }
.compare .label { position: absolute; bottom: 10px; left: 10px; color: white; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; z-index: 3; }

/* --- FAQ, TRUST, REVIEWS --- */
.faq-grid { max-width: 900px; margin: auto; display: grid; gap: 20px; }
.faq-item, .review, .trust-item { background: var(--card-bg); padding: 24px; border-radius: 20px; transition: transform 0.2s; }
.faq-item:hover, .review:hover, .trust-item:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.review .stars { color: #fbbf24; margin-bottom: 10px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; max-width: 1000px; margin: auto; text-align: center; }

/* --- FOOTER --- */
.final-cta { background: var(--primary); color: white; border-radius: 32px; padding: 60px 40px; text-align: center; margin-bottom: 40px; }

/* Social Media Links */
.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  text-decoration: none;
  font-weight: 500;
}
.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-color: var(--primary);
  color: var(--primary);
}
.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

footer { padding: 40px 0; text-align: center; color: var(--text-secondary); font-size: var(--font-size-small); border-top: 1px solid var(--border-color); }

/* --- MODALE (Pop-up) --- */
.modal, .feature-modal, .image-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  backdrop-filter: blur(5px);
}
.modal-content, .feature-modal-content, .image-modal-content {
  position: relative;
  width: 90%;
  max-width: 750px;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease;
}
.modal-close, .feature-modal-close, .image-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
  color: white;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--primary); }
.modal video, .feature-modal img, .image-modal img { width: 100%; height: auto; display: block; max-height: 98vh; margin: 0 auto; object-fit: contain; }
.feature-modal-body { padding: 30px; text-align: center; }
.feature-modal-body h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 10px; }
.feature-modal-body p { color: var(--text-main); }

/* --- STICKY CTA (Mobilne) --- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: none;
  padding: 15px 20px;
  background: var(--bg-body);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  display: none;
  justify-content: center;
  align-items: center;
}

/* --- MEDIA QUERIES (RWD) --- */
@media (max-width: 1024px) {

  /* HEADER - zmiana na widok mobilny */
  .nav {
    display: flex;
    justify-content: space-between;
  }

  .hamburger { display: block; }

  .logo { margin-left: 40px; }
  .header-actions { margin-left: auto; gap: 15px; }

  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    gap: 25px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: none;
  }

  .nav-links.active {
    display: flex;
    animation: slideDown 0.3s ease-out;
  }

  .nav-links .cta-btn {
    color: #ffffff !important;
    font-weight: 800 !important;
    background: var(--primary);
  }

  .header-actions .desktop-btn { display: none; }
}

@media (max-width: 768px) {

  /* Sticky CTA */
  .sticky-cta { display: flex; }
  .sticky-cta .cta-btn {
    width: 100%;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
  }

  /* HERO REARRANGE (Kolejność na mobile) */
  .hero {
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    order: 1;
    display: flex;
    flex-direction: column;
  }

  .hero h1 {
    order: 1; /* 1. Nagłówek */
    margin-bottom: 20px;
  }

  .hero-description {
    order: 2; /* 2. Drugi paragraf "Idealne do social mediów..." */
    margin-top: 10px;
    text-align: center;
  }

  .hero-actions {
    order: 3; /* 3. Przyciski */
    justify-content: center;
    margin-top: 20px;
  }

  .micro-copy {
    order: 4; /* 4. Mikro-tekst "Bez konta..." */
  }

  .hero-img {
    order: 5; /* 5. Zdjęcie - na końcu */
    margin: 30px 0 0 0;
    width: 100%;
  }

  .hero h1 { font-size: 2.3rem; }
}

/* Desktop specific: Ukrycie linku "Wypróbuj" z menu rozwijanego na dużych ekranach */
@media (min-width: 769px) {
  .nav-mobile-cta {
    display: none;
  }
}

/* Przesunięcie przycisku w sekcji Final CTA */
.final-cta a {
  margin-top: 40px;
  display: inline-block;
}

.skip-link { position: absolute; top: -40px; left: 20px; background: var(--primary); color: white; padding: 8px 12px; z-index: 2000; border-radius: 4px;}
.skip-link:focus { top: 20px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
