@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=Zilla+Slab:wght@400;500;600;700&display=swap");

:root {
  /* ──── Foundation Colors ──── */
  --bg-main: #fcfaf8; /* creamy warm white */
  --bg-alt: #f4f1eb; /* soft beige */
  --text-main: #3d3935;
  --text-muted: #736b66;

  /* ──── Accent Palette ──── */
  --color-teal: #4a5d4e; /* deep olive/sage */
  --color-sage: #8ba88e; /* soft sage */
  --color-rust: #d48c70; /* muted terracotta/peach */
  --color-mustard: #e2b478; /* soft mustard/sand */

  /* ──── Pastel Card Backgrounds ──── */
  --card-1: #e8efe9; /* sage tint */
  --card-2: #fdf3eb; /* peach tint */
  --card-3: #edf0f5; /* sky hint */
  --card-4: #f8efef; /* rose hint */

  --radius-lg: 32px;
  --radius-md: 20px;
}

[data-bs-theme="dark"] {
  --bg-main: #23201e; /* deep warm charcoal */
  --bg-alt: #2d2927;
  --text-main: #f4efea;
  --text-muted: #b3aaa4;

  --card-1: #38423b;
  --card-2: #4d3d33;
  --card-3: #393e47;
  --card-4: #48393b;
}

/* ═══════════════════ TYPOGRAPHY & BODY ═══════════════════ */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

h1,
h2,
h3,
h4,
.section-title,
.accordion-button,
.trust-card .fs-2 {
  font-family: "Zilla Slab", serif;
  font-weight: 600;
  color: var(--text-main);
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: inherit;
  color: var(--text-main) !important;
}

.text-accent-primary {
  color: var(--color-teal) !important;
}
.text-accent-secondary {
  color: var(--color-rust) !important;
}

/* ═══════════════════ NAVBAR ═══════════════════ */
.navbar {
  padding: 1.5rem 0;
  transition: all 0.3s ease;
  background: transparent;
  z-index: 1000;
}
.navbar.sticky-nav {
  padding: 1rem 0;
  background: var(--bg-main);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.nav-link {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  color: var(--text-main) !important;
  font-size: 1.05rem;
  margin: 0 1rem;
  transition: color 0.2s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-rust) !important;
}

/* Theme Toggle */
#theme-toggle {
  background: none;
  border: 1px solid var(--text-muted);
  color: var(--text-main);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
#theme-toggle:hover {
  background: var(--text-main);
  color: var(--bg-main);
}

/* ═══════════════════ SECTIONS ═══════════════════ */
section {
  padding: 6rem 0;
  background-color: var(--bg-main);
}
section:nth-of-type(even) {
  background-color: var(--bg-alt);
}

/* ═══════════════════ HERO ═══════════════════ */
.hero-wrapper {
  background-color: var(--bg-main);
  padding-top: 13rem !important;
  padding-bottom: 7rem !important;
  position: relative;
}
.hero-img-container img {
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05); /* very soft shadow */
  max-width: 90%;
  margin: 0 auto;
  display: block;
}
.hero-typing {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.7rem !important;
  color: var(--color-sage) !important;
}
.zu-read-more-box {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 2rem;
}
.zu-read-more-box strong {
  color: var(--color-teal);
  font-weight: 600;
}
.zu-read-more-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s ease;
}
.zu-read-more-text.show {
  max-height: 3000px;
}

/* ═══════════════════ TRUST BLOCKS (#zaufanie) ═══════════════════ */
#zaufanie {
  padding: 4rem 0 6rem;
  background-color: var(--bg-main);
}
.trust-card {
  border-radius: var(--radius-md) !important;
  padding: 3.5rem 2rem !important;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 100%;
  border: none !important;
  box-shadow: none !important;
}
.trust-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08) !important;
}

/* Match the Mindset reference solid colors */
#zaufanie .col-6:nth-child(1) .trust-card {
  background-color: var(--color-teal);
  color: #fff;
}
#zaufanie .col-6:nth-child(2) .trust-card {
  background-color: var(--color-rust);
  color: #fff;
}
#zaufanie .col-6:nth-child(3) .trust-card {
  background-color: var(--color-sage);
  color: #fff;
}
#zaufanie .col-6:nth-child(4) .trust-card {
  background-color: var(--color-mustard);
  color: #fff;
}

.trust-card i {
  font-size: 2.5rem !important;
  margin-bottom: 1.5rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
}
.trust-card .fs-2 {
  font-family: "Zilla Slab", serif;
  font-size: 4rem !important;
  font-weight: 700;
  color: #fff !important;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.trust-card .small {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.85);
}

/* ═══════════════════ OFFER CARDS (Pastel blocks) ═══════════════════ */
.card {
  border-radius: var(--radius-lg) !important;
  border: none !important;
  padding: 3rem 2.5rem !important;
  height: max-content !important;
  transition: transform 0.3s ease;
  box-shadow: none !important;
}
.card:hover {
  transform: translateY(-8px);
}
/* Assign alternating pastel colors to cards based on index */
#oferta .col-md-6:nth-child(4n + 1) .card {
  background-color: var(--card-1);
}
#oferta .col-md-6:nth-child(4n + 2) .card {
  background-color: var(--card-2);
}
#oferta .col-md-6:nth-child(4n + 3) .card {
  background-color: var(--card-3);
}
#oferta .col-md-6:nth-child(4n + 4) .card {
  background-color: var(--card-4);
}

.card-body h3 {
  font-family: "Zilla Slab", serif !important;
  font-size: 1.8rem !important;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.card-ill {
  height: 120px;
  width: auto;
  display: block;
  margin-bottom: 1.5rem;
}
.card-body h3 i {
  color: var(--text-main);
  margin-right: 0.5rem;
  font-style: normal;
  display: none; /* Hide old bootstrap icons since we add custom SVG */
}
.card-body ul,
.zu-read-more-box ul {
  padding-left: 0;
  list-style: none;
  margin-left: 0;
}
.card-body ul li,
.zu-read-more-box ul li {
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  display: flex !important;
  align-items: flex-start !important;
  line-height: 1.5;
}
.card-body ul li::before,
.zu-read-more-box ul li::before {
  content: "•";
  color: var(--color-teal);
  font-weight: bold;
  font-size: 1.8rem;
  margin-right: 0.7rem;
  line-height: 1;
  display: inline-block;
  margin-top: -0.15rem;
}

/* ═══════════════════ FAQ ACCORDION ═══════════════════ */
.accordion {
  gap: 1.5rem;
  display: flex;
  flex-direction: column;
}
.accordion-item {
  border: none !important;
  border-radius: var(--radius-md) !important;
  background-color: var(--bg-alt) !important;
  overflow: hidden;
}
.accordion-button {
  background-color: transparent !important;
  font-family: "Zilla Slab", serif !important;
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  padding: 2rem !important;
  box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
  color: var(--color-teal) !important;
}
.accordion-body {
  padding: 0 2rem 2rem 2rem !important;
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  background-color: transparent !important;
}

/* Wyjustowanie głównych bloków tekstowych (prośba klientki) */
.zu-read-more-box,
.accordion-body {
  text-align: justify;
  text-justify: inter-word;
}

/* ═══════════════════ PRICE TABLE ═══════════════════ */
.price-table-wrapper {
  border-radius: var(--radius-md);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-main);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.table {
  margin: 0;
}
/* Na wąskich ekranach tabela jest szersza niż ekran → poziomy scroll cennika */
.price-table-wrapper .table {
  min-width: 480px;
}
.table thead th {
  background-color: var(--color-teal) !important;
  color: white !important;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  padding: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none;
}
.table tbody td {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  font-weight: 500;
  vertical-align: middle;
  background-color: transparent !important;
}
.table tbody tr:hover td {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

/* ═══════════════════ FOOTER ═══════════════════ */
footer {
  background-color: var(--color-teal);
  color: white;
  padding: 6rem 0 3rem;
}
footer .section-title {
  color: white !important;
}
footer .text-accent-primary {
  color: var(--color-rust) !important;
}
footer a,
footer li {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 1.05rem;
}
footer a:hover {
  color: var(--color-mustard) !important;
}
footer h4 {
  font-family: "Zilla Slab", serif;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 2rem !important;
}
footer hr {
  border-color: rgba(255, 255, 255, 0.2);
  margin: 4rem 0 2rem;
}

[data-bs-theme="dark"] .navbar-brand img {
  filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] footer {
  background-color: #0e1210;
}

/* ═══════════════════ BUTTONS & FAB ═══════════════════ */
.btn-primary-custom {
  background-color: var(--color-teal);
  color: white !important;
  border-radius: 50px;
  padding: 14px 34px;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: normal;
}
.btn-primary-custom:hover {
  background-color: var(--color-sage);
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.fab-contact {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 64px;
  height: 64px;
  background-color: var(--color-rust);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 25px rgba(214, 98, 69, 0.4);
  z-index: 9998;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
  text-decoration: none;
}
.fab-contact:hover {
  transform: scale(1.1);
  color: white;
  background-color: #ca573a;
}

#toTop {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--color-teal);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
}
#toTop.show {
  opacity: 1;
  visibility: visible;
}
#toTop:hover {
  background: var(--color-sage);
  transform: translateY(-5px);
}

/* ═══════════════════ SCROLL INDICATOR ═══════════════════ */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--color-rust);
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress, 0));
  z-index: 1200;
}

.scroll-down-wrapper {
  margin-top: 7rem;
  display: flex;
  justify-content: center;
}

.scroll-down {
  color: var(--color-teal);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  transition: color 0.3s ease;
}
.scroll-down:hover {
  color: var(--color-rust);
}
.scroll-down .mouse {
  width: 26px;
  height: 40px;
  border: 2px solid currentColor;
  border-radius: 13px;
  margin-bottom: 0.8rem;
  position: relative;
}
.scroll-down .wheel {
  width: 4px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollMouse 2s infinite;
}
@keyframes scrollMouse {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 14px);
    opacity: 0;
  }
}

/* ═══════════════════ SWIPER / GALLERY ═══════════════════ */
.swiper {
  padding: 3rem 1rem !important;
}
.swiper-slide img {
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  width: 100%;
}
.swiper-slide img:hover {
  transform: scale(1.02);
}
.swiper-pagination-bullet {
  background: var(--text-muted) !important;
  opacity: 0.3;
  width: 10px;
  height: 10px;
}
.swiper-pagination-bullet-active {
  background: var(--color-rust) !important;
  opacity: 1 !important;
  width: 28px;
  border-radius: 5px;
}

/* Quote styling */
.cytat {
  border-left: 4px solid var(--color-rust);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-family: "Zilla Slab", serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--text-main);
  line-height: 1.6;
}

/* Modern Blurred Blob Decorations */
.zu-blob {
  display: block !important;
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
[data-bs-theme="dark"] .zu-blob {
  opacity: 0.06;
}
.zu-blob-1 {
  background: radial-gradient(circle, var(--color-sage) 0%, transparent 70%);
}
.zu-blob-2 {
  background: radial-gradient(circle, var(--color-rust) 0%, transparent 70%);
}

/* Elegant Botanical Backgrounds (Using bg-1.webp and bg-2.webp wisely) */
.botanical-bg {
  position: relative;
  z-index: 1;
}
.botanical-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.5; /* reduced overall opacity from 0.95 for an elegant, softer background wash */
  transition:
    opacity 0.3s ease,
    filter 0.3s ease;
}

/* Background Type 1 (Hero - bg-1.webp) */
.botanical-bg-1::before {
  background:
    radial-gradient(
      circle at center,
      rgba(252, 250, 248, 0.75) 20%,
      rgba(252, 250, 248, 0.3) 100%
    ),
    url("../img/bg-1.webp") no-repeat top center / 100% auto;
}
[data-bs-theme="dark"] .botanical-bg-1::before {
  background:
    radial-gradient(
      circle at center,
      rgba(35, 32, 30, 0.8) 20%,
      rgba(35, 32, 30, 0.4) 100%
    ),
    url("../img/bg-1.webp") no-repeat top center / 100% auto;
  filter: invert(0.9) brightness(0.4) contrast(1.3) saturate(0.8);
  mix-blend-mode: screen;
  opacity: 0.08; /* softer in dark mode for maximum contrast */
}

/* Background Type 2 (FAQ - bg-2.webp) */
.botanical-bg-2::before {
  background:
    radial-gradient(
      circle at center,
      rgba(252, 250, 248, 0.75) 20%,
      rgba(252, 250, 248, 0.3) 100%
    ),
    url("../img/bg-2.webp") no-repeat top center / 100% auto;
}
[data-bs-theme="dark"] .botanical-bg-2::before {
  background:
    radial-gradient(
      circle at center,
      rgba(35, 32, 30, 0.8) 20%,
      rgba(35, 32, 30, 0.4) 100%
    ),
    url("../img/bg-2.webp") no-repeat top center / 100% auto;
  filter: invert(0.9) brightness(0.4) contrast(1.3) saturate(0.8);
  mix-blend-mode: screen;
  opacity: 0.08; /* softer in dark mode for maximum contrast */
}

@media (max-width: 768px) {
  .botanical-bg::before {
    background-size: 140% auto; /* scale leaves slightly up for better presence on mobile */
  }
}

.zu-flower,
.parallax-layer {
  display: none !important;
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 991.98px) {
  .hero-wrapper {
    padding-top: 10rem !important;
  }
  .section-title {
    font-size: 3rem;
  }
  .navbar-collapse {
    background-color: var(--bg-main);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease;
    
    /* Perfect closing animation adjustments (Bootstrap height transition support) */
    padding: 0 1.5rem !important; /* Keep horizontal padding only */
    margin: 0 !important;         /* Remove outer margin to prevent height calculation jumps */
    overflow: hidden;             /* Clip content smoothly during closing/opening phase */
  }
  [data-bs-theme="dark"] .navbar-collapse {
    background-color: var(--bg-alt);
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  }
  .navbar-collapse .navbar-nav {
    padding-top: 1.5rem; /* Vertical padding shifted to inner list to allow clean 0px height collapse */
    margin-bottom: 0 !important;
  }
  .navbar-collapse .nav-link {
    margin: 0.5rem 0 !important;
    padding: 0.4rem 0;
  }
  .navbar-collapse #theme-toggle {
    margin-top: 1rem;
    margin-bottom: 1.5rem; /* Acts as the bottom padding of our menu panel */
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  section {
    padding: 4rem 0;
  }
  .section-title {
    font-size: 2.5rem;
  }
  .trust-card .fs-2 {
    font-size: 3rem !important;
  }
  .card {
    padding: 2rem 1.5rem !important;
  }
  .accordion-button {
    font-size: 1.3rem !important;
    padding: 1.5rem !important;
  }
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

/* ═══════════════════ BRAND PRELOADER ═══════════════════ */
body.preloader-active {
  overflow: hidden !important;
  height: 100vh !important;
}

#zu-preloader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-main);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s ease;
}

#zu-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 120px;
}

.preloader-logo {
  width: 100%;
  height: auto;
  z-index: 2;
  animation: logoPulse 2.4s infinite ease-in-out;
}

[data-bs-theme="dark"] .preloader-logo {
  /* elegant brightness inversion in dark mode */
  filter: brightness(0) invert(0.95);
}

.pulse-ring {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 168, 142, 0.25) 0%, transparent 70%);
  z-index: 1;
  animation: ringPulse 2.4s infinite ease-in-out;
}

.preloader-bar {
  width: 160px;
  height: 3px;
  background-color: var(--bg-alt);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.preloader-progress {
  width: 100%;
  height: 100%;
  background-color: var(--color-teal);
  border-radius: 10px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: progressFill 3.5s cubic-bezier(0.1, 0.8, 0.1, 1) forwards;
}

/* When the page is fully loaded, transition the progress bar to 100% instantly but smoothly */
#zu-preloader.loaded .preloader-progress {
  animation: none !important;
  transform: scaleX(1) !important;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes ringPulse {
  0%, 100% {
    transform: scale(0.6);
    opacity: 0;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.9;
  }
}

@keyframes progressFill {
  0% {
    transform: scaleX(0);
  }
  40% {
    transform: scaleX(0.55);
  }
  80% {
    transform: scaleX(0.78);
  }
  100% {
    transform: scaleX(0.85); /* soft cap at 85% to wait for load event */
  }
}
