/* ============================================================
   Natural Beauty Lębork – style.css
   Custom overrides & extensions for Tailwind
   ============================================================ */

/* ──────────────────────────────────────────────────────────
   Base & Reset
────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

/* ──────────────────────────────────────────────────────────
   Navbar – dark
────────────────────────────────────────────────────────── */
#navbar {
  background-color: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.navbar-scrolled {
  background-color: rgba(10, 10, 10, 1);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

/* ──────────────────────────────────────────────────────────
   Logo – golden gradient
────────────────────────────────────────────────────────── */
.logo-brand {
  background: linear-gradient(
    100deg,
    #b8892a 0%,
    #e8c96a 30%,
    #f5e09a 50%,
    #e8c96a 70%,
    #b8892a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────
   Navbar links – gold hover
────────────────────────────────────────────────────────── */
#navbar .nav-link:hover,
#navbar #oferta-btn:hover {
  color: #e8c96a !important;
}

#navbar .nav-bar-cta:hover {
  color: #e8c96a !important;
  border-color: #e8c96a !important;
  background-color: transparent !important;
}

/* ──────────────────────────────────────────────────────────
   Oferta dropdown
────────────────────────────────────────────────────────── */
/* Uwaga: animacja musi zawierać translateX(-50%), ponieważ własność transform
   nadpisuje klasę -translate-x-1/2 z Tailwinda. Bez tego menu nie jest
   wyśrodkowane pod przyciskiem i wychodzi poza krawędź ekranu. */
#oferta-dropdown {
  animation: dropdownIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Miejsce na złotą kreskę rezerwujemy na stałe – dzięki temu najechanie
   kursorem nie zmienia szerokości tekstu i długie nazwy nie łamią się
   nagle na dwie linie. */
.dropdown-item {
  position: relative;
  padding-left: 18px;
  transition: color 0.2s ease;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  transform: scaleX(0);
  width: 12px;
  height: 1px;
  background: #e8c96a;
  transform-origin: left;
  transition: transform 0.2s ease;
}

.dropdown-item:hover {
  color: #fff;
}

.dropdown-item:hover::before {
  transform: scaleX(1);
}

/* ──────────────────────────────────────────────────────────
   Hero – full-width, fullscreen (iOS-safe)
────────────────────────────────────────────────────────── */

/*
  Strategy: hero + intro-strip together fill the screen.
  We use svh (small viewport height) – the safest unit on
  iOS Safari as it excludes browser chrome reliably.
  The section already has mt-16/mt-20 (Tailwind) for the
  navbar offset, so we subtract that from the viewport.
  Intro strip height ≈ 72px (py-7 + text).
*/
.hero-fullscreen {
  /* mobile: subtract navbar (64px) + intro strip (72px) */
  height: calc(100svh - 64px - 72px);
  min-height: 420px;
}

@media (min-width: 640px) {
  .hero-fullscreen {
    /* sm+: navbar is 80px */
    height: calc(100svh - 80px - 72px);
    min-height: 500px;
  }
}

/* svh fallback for very old browsers */
@supports not (height: 1svh) {
  .hero-fullscreen {
    height: calc(100vh - 64px - 72px);
  }
  @media (min-width: 640px) {
    .hero-fullscreen {
      height: calc(100vh - 80px - 72px);
    }
  }
}

/* Scroll line animation */
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}

.animate-scroll-line {
  animation: scrollLine 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ──────────────────────────────────────────────────────────
   Marquee – CSS infinite scroll, no JS reset
────────────────────────────────────────────────────────── */
.marquee-section {
  background: #0a0a0a;
}

.marquee-outer {
  overflow: hidden;
  width: 100%;
}

.marquee-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 0;
  width: max-content;
  animation: marqueeScroll 36s linear infinite;
  will-change: transform;
}

.marquee-outer:hover .marquee-inner {
  animation-play-state: paused;
}

.marquee-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
  padding: 0 2.5rem;
}

.marquee-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e8c96a;
  flex-shrink: 0;
  opacity: 0.6;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ──────────────────────────────────────────────────────────
   Sections – shared spacing
────────────────────────────────────────────────────────── */
section {
  position: relative;
}

/* ──────────────────────────────────────────────────────────
   Service Cards
────────────────────────────────────────────────────────── */
.service-card {
  will-change: transform, opacity;
}

/* ──────────────────────────────────────────────────────────
   Testimonials
────────────────────────────────────────────────────────── */
#testimonials-track {
  will-change: transform;
  cursor: grab;
  user-select: none;
}

#testimonials-track:active {
  cursor: grabbing;
}

.testimonial-card {
  flex-shrink: 0;
}

/* Responsive card widths */
@media (max-width: 639px) {
  .testimonial-card {
    width: 100%;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .testimonial-card {
    width: calc(50% - 12px);
  }
}

@media (min-width: 1024px) {
  .testimonial-card {
    width: calc(33.333% - 16px);
  }
}

/* Dot sizing */
.testimonial-dot {
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.testimonial-dot[aria-selected="true"] {
  width: 1.5rem;
}

/* ──────────────────────────────────────────────────────────
   Gallery
────────────────────────────────────────────────────────── */
#gallery .reveal {
  overflow: hidden;
}

/* ──────────────────────────────────────────────────────────
   Back to top button
────────────────────────────────────────────────────────── */
#back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top:hover {
  transform: translateY(-3px);
}

/* ──────────────────────────────────────────────────────────
   Cookie banner
────────────────────────────────────────────────────────── */
#cookie-banner {
  backdrop-filter: none;
}

/* ──────────────────────────────────────────────────────────
   Animations
────────────────────────────────────────────────────────── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ──────────────────────────────────────────────────────────
   Focus visible – accessibility
────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ──────────────────────────────────────────────────────────
   Selection
────────────────────────────────────────────────────────── */
::selection {
  background-color: #1a1a1a;
  color: #fff;
}

/* ──────────────────────────────────────────────────────────
   Scrollbar (subtle, Webkit)
────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #faf9f7;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(26, 26, 26, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(26, 26, 26, 0.4);
}

/* ──────────────────────────────────────────────────────────
   Reduced motion
────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* no hero parallax to disable */
  .marquee-inner {
    animation: none !important;
  }
}

/* ──────────────────────────────────────────────────────────
   Treść podstron (nb-prose)
────────────────────────────────────────────────────────── */
.nb-prose > *:first-child {
  margin-top: 0;
}

.nb-prose h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.875rem;
  line-height: 1.25;
  font-weight: 400;
  color: #1a1a1a;
  margin: 3rem 0 1.25rem;
}

.nb-prose h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 2rem 0 0.75rem;
}

.nb-prose h4 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(26, 26, 26, 0.85);
  margin: 1.5rem 0 0.5rem;
}

.nb-prose p {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(26, 26, 26, 0.7);
  margin-bottom: 1.25rem;
}

.nb-prose strong {
  font-weight: 500;
  color: #1a1a1a;
}

.nb-prose a:not(.not-prose a) {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nb-prose a:not(.not-prose a):hover {
  opacity: 0.7;
}

/* Zwykła lista wypunktowana */
.nb-prose ul:not(.nb-check-list):not(.nb-cross-list) {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.nb-prose ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.nb-prose ul:not(.nb-check-list):not(.nb-cross-list) li,
.nb-prose ol li {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(26, 26, 26, 0.7);
  margin-bottom: 0.5rem;
}

/* Listy z ikonami */
.nb-check-list,
.nb-cross-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 0.875rem;
}

.nb-check-list li,
.nb-cross-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(26, 26, 26, 0.7);
}

.nb-check-list li::before,
.nb-cross-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.6875rem;
}

.nb-check-list li::before {
  background-color: rgba(26, 26, 26, 0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.nb-cross-list li::before {
  background-color: rgba(180, 60, 60, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a83f3f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}

/* Wyróżniona ramka informacyjna w treści */
.nb-note {
  border-left: 2px solid #e8c96a;
  background: #faf9f7;
  border-radius: 0 1rem 1rem 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.nb-prose .nb-note p {
  margin-bottom: 0;
}

/* Ponumerowane kroki zabiegu */
.nb-steps {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0;
  counter-reset: nb-step;
  display: grid;
  gap: 1.25rem;
}

.nb-steps li {
  position: relative;
  padding-left: 3.25rem;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(26, 26, 26, 0.7);
  counter-increment: nb-step;
}

.nb-steps li::before {
  content: counter(nb-step);
  position: absolute;
  left: 0;
  top: -0.125rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nb-steps li strong {
  display: block;
  color: #1a1a1a;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

/* FAQ – ukryj domyślny marker */
.nb-faq summary::-webkit-details-marker {
  display: none;
}

/* ──────────────────────────────────────────────────────────
   Cennik – kontrakt klas dla zewnętrznego widżetu z cenami.
   Widżet renderuje HTML wewnątrz #cennik-widget; poniższe klasy
   nadają mu wygląd spójny z resztą strony.
   Pełna dokumentacja struktury: /cennik/przyklad.html
────────────────────────────────────────────────────────── */

/* Grupa (kategoria) */
.cennik-group + .cennik-group {
  margin-top: 3rem;
}

.cennik-group__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0 0 0.375rem;
}

.cennik-group__subtitle {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.6;
  color: #6b6b6b;
  margin: 0 0 1.5rem;
}

.cennik-group__title:last-child,
.cennik-group__subtitle:last-child {
  margin-bottom: 1.5rem;
}

/* Lista pozycji */
.cennik-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e8e4df;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

/* Pojedyncza pozycja */
.cennik-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid #e8e4df;
  transition: background-color 0.2s ease;
}

.cennik-item:last-child {
  border-bottom: 0;
}

.cennik-item:hover {
  background: #faf9f7;
}

.cennik-item__main {
  min-width: 0;
}

.cennik-item__name {
  font-size: 0.9375rem;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.5;
}

.cennik-item__desc {
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.6;
  color: #6b6b6b;
  margin: 0.25rem 0 0;
}

/* Cena */
.cennik-item__price {
  flex-shrink: 0;
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
}

/* Dopisek przy cenie, np. „za zabieg" */
.cennik-item__note {
  display: block;
  font-size: 0.75rem;
  font-weight: 300;
  color: #6b6b6b;
  margin-top: 0.125rem;
  white-space: nowrap;
}

/* Wyróżnienie, np. pakiet lub promocja */
.cennik-item--highlight {
  background: linear-gradient(90deg, rgba(232, 201, 106, 0.09), rgba(232, 201, 106, 0.03));
}

.cennik-item--highlight:hover {
  background: linear-gradient(90deg, rgba(232, 201, 106, 0.14), rgba(232, 201, 106, 0.05));
}

.cennik-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: 0.09em;
}

/* Informacja pod listą, np. o obowiązywaniu cennika */
.cennik-footnote {
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.7;
  color: #6b6b6b;
  margin: 1rem 0 0;
}

/* Telefony – cena ląduje pod nazwą zabiegu */
@media (max-width: 540px) {
  .cennik-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .cennik-item__price {
    text-align: left;
  }

  .cennik-item__note {
    display: inline;
    margin-top: 0;
  }

  .cennik-item__note::before {
    content: ' · ';
  }
}


/* ──────────────────────────────────────────────────────────
   Print
────────────────────────────────────────────────────────── */
@media print {
  #navbar,
  #back-to-top,
  #cookie-banner,
  #cookie-modal {
    display: none !important;
  }
}

/* Blok kodu na stronie dokumentacji widżetu */
.cennik-code {
  margin: 0;
  padding: 1.5rem;
  border-radius: 1rem;
  background: #0d0d0d;
  color: rgba(255, 255, 255, 0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  overflow-x: auto;
  tab-size: 2;
}

.cennik-code code {
  font: inherit;
  white-space: pre;
}
