.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}

body.dark-mode .menu-toggle {
  color: #f0f0f0;
}

/* MENU STRONY MOBILNEJ */
/* 1) Reset dla mobilnego nav */
@media (max-width: 768px) {
  /* ukrywamy standardowe menu i pokażemy jedynie toggle */
  nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 30vh;
    overflow-y: auto;
    top: 80px;
    bottom: auto;
    width: 80%;
    max-width: 300px;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    box-shadow: -4px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  body.dark-mode nav {
    background: #1e1e1e;
  }
  nav a {
    display: block;         /* każdy link jako osobny blok */
    margin-bottom: 1rem;  /* tu ustalasz dowolny odstęp */
    /* opcjonalnie: większa czytelna czcionka */
    font-size: 1.1rem;
  }
  nav a:last-child {
    margin-bottom: 0;       /* żeby ostatni nie miał dodatkowego marginesu */
  }
/* Reguły overlay – ustawimy je niżej */
.overlay {
  position: fixed;      /* pewnie już masz */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 500;         /* <-- niżej od nav */
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

  /* toggle button */
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
    z-index: 1002;
  }
  body.dark-mode .menu-toggle {
    color: #f0f0f0;
  }
  
/* Hamburger wrapper */
.hamburger {
  position: relative;
  display: block;
  width: 25px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.3s ease;
  transform-origin: center;
}

/* Paski przed i po */
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 25px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, top 0.3s ease;
  transform-origin: center;
}

/* Górny pasek */
.hamburger::before {
  top: -8px;
}

/* Dolny pasek */
.hamburger::after {
  top: 8px;
}

/* Po kliknięciu – ukryj środkowy pasek */
.menu-toggle.active .hamburger {
  background: transparent;
}

/* Przekształcamy paski w "X" */
.menu-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

  /* aktywne menu – wysunięte i overlay widoczny */
  nav.active {
    transform: translateX(0);
  }
  .overlay.active {
    opacity: 1;
    visibility: visible;
  }
/* Reguły overlay – ustawimy je niżej */
  .overlay {
    position: fixed;      /* pewnie już masz */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 500;         /* <-- niżej od nav */
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
}

header {
  background: white;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

body.dark-mode header {
  background: #1e1e1e;
}

/* LOGO */
header a.logo {
  display: flex;
  align-items: center;
}

.logo img {
  content: url("grafika/logo-light.svg");
}

body.dark-mode .logo img {
  content: url("grafika/logo-dark.svg");
}

header img {
  height: 50px;
}

/* MENU STRONY DESKTOPOWEJ */

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s;
}

nav a.active {
  color: #0077aa;
  border-bottom: 2px solid #0077aa;
}

body.dark-mode nav a {
  color: #f0f0f0;
}

nav a:hover {
  color: #0077aa;
}

.section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 3rem auto;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: background 0.3s, color 0.3s;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* SEKCJA O MNIE */

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about img {
  max-width: 400px;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.about li {
  margin-left: 30px;
  margin-top: 5px;
}

.about-text {
  text-align: justify;
}

@media (min-width: 768px) {
  .about {
    flex-direction: row;
    text-align: left;
  }

  .about img {
    margin-right: 2rem;
    margin-bottom: 0;
  }
}

/* SEKCJA LECZONE ZABURZENIA */

.leczenie {
  text-align: justify;
}

.leczenie h3 {
  margin-bottom: 1.1rem;
  margin-top: 1rem;
}

/* ——— PODŚWIETLENIE TEKSTU H3 ——— */
h3.podswietlenie {
  position: relative;
  display: inline-block;
  padding: 0.2em 0.3em;
  margin-bottom: 10px;
  z-index: 1;
  text-align: left;
}

body.dark-mode h3.podswietlenie {
  color: #000;
}

h3.podswietlenie::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffcc80;
  transform: translateY(-0%) skewX(-12deg);
  border-radius: 0.2em;
  z-index: -1;
  transition: transform 0.3s ease;
}

h3.podswietlenie:hover::before {
  transform: skewX(-12deg) scaleX(1.04);
}

/* KOLORY TŁA */
#o-mnie {background-color: #e8f5e9;}
#certyfikaty {background-color: #f3e5f5;}
#leczenie {background-color: #e3f2fd;}
#rezerwacja {background-color: #fff3e0;}
#faq {background-color: #ffffff;}

body.dark-mode #o-mnie,
body.dark-mode #certyfikaty,
body.dark-mode #leczenie,
body.dark-mode #rezerwacja,
body.dark-mode #faq {
  background-color: #1e1e1e;
}

iframe {
  width: 100%;
  height: 400px;
  border: 0;
  margin-top: 2rem;
  border-radius: 0.5rem;
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.2rem;
}

footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

body.dark-mode footer {
  background-color: #111;
}

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 1rem;
}

/* ——— SEKCJA FAQ ——— */

.faq-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

.faq-answer {
  box-sizing: border-box;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-top 0.3s ease,
    padding-bottom 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
  color: #555;
}

.faq-item.active .faq-answer {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

/* ——— SEKCJA CERTYFIKATY ——— */

.certyfikaty-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.certyfikaty-galeria img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s;
}

.certyfikaty-galeria img:hover {
  transform: scale(1.05);
}

/* na start ukrywamy wszystkie „dodatkowe certyfikaty” */
.more-certs {
  display: none;
}

/* kontener dla przycisku – daje odstęp nad i pod */
.cert-btn-container {
  text-align: center;
  margin: 2rem 0;
}

/* Button zobacz więcej / zobacz mniej */
#button-certs {
  display: inline-block;
  position: relative;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-on-primary, #000);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1;
  transition: color 0.3s;
}

#button-certs::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5%;
  width: 110%;
  height: 1.2em;
  background: var(--accent, #ffcc80);
  transform: translateY(-50%) skewX(-20deg);
  z-index: -1;
  transition: background 0.3s, height 0.3s;
}

#button-certs:hover {
  color: var(--accent-contrast, #000);
}

#button-certs:hover::before {
  background: var(--accent-dark, #ffcc80);
  height: 1.5em;
}

/* ——— SEKCJA GABINETY ——— */

.gabinet-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  padding: 0rem;
  transition: transform 0.2s;
}

.tab-btn img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.75rem;
  transition: transform 0.3s;
}

.tab-btn:hover img {
  transform: scale(1.05);
}

/* ————— Wyrównanie kart gabinetów do góry w mobile ————— */
@media (max-width: 768px) {
  .gabinet-tabs {
    align-items: flex-start;
  }

  .gabinet-tabs .tab-btn {
    align-self: flex-start;
  }
}

.tab-btn span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted, #555);
  margin-top: 10px;
}

.tab-btn.active span {
  font-weight: 600;
  color: var(--accent, rgb(23, 97, 194));
}

.tab-btn:hover {
  transform: translateY(-3px);
}

.gabinet-contents {
  margin: 0 auto;
}

.gabinet-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.gabinet-content.active {
  display: block;
}

.gabinety h3 {
  margin-bottom: 10px;
}

.gabinety ul {
  padding-left: 2em;
  margin-top: 0.7em;
}

.gabinety li {
  margin-bottom: 0.7em;
  text-indent: -0.5em;
  padding-left: 0em;
}

.gabinety div#adres {
  background-color: #fdedd2;
  padding: 1em;
  border-radius: 1em;
  max-width: 500px;
  text-decoration: none;
}

.gabinety a, a:before, a:hover, a:active {
  text-decoration: none;
  color: #000000;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#wizyty, #cennik, #platnosci, #dojazd {
  margin-top: 20px;
  margin-bottom: 10px;
  text-align: left;
  padding: 1em;
}
.anchor {
  display: block;
  position: relative;
  top: -30px;
  visibility: hidden;
}

/* SEKCJA LECZONE ZABURZENIA */
.disorders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.disorder-card {
  background: #e3f2fd;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  text-align: left;
  transition: transform 0.2s;
}

.disorder-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.disorder-icon {
  width: 300px;
  height: 300px;
  margin-bottom: 12px;
  border-radius: 12px;
}

.disorder-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.disorder-desc {
  font-size: 0.9rem;
  color: #555;
  text-align: justify;
}

body.dark-mode .disorder-card,
body.dark-mode .disorder-desc {
  background-color: #1e1e1e;
  color: #fff;
}

article ul {
  padding-left: 2em;
  margin-top: 0.7em;
}

article li {
  margin-bottom: 0.7em;
  text-indent: -0.5em;
  padding-left: 0em;
}

/* kontener wyrównujący w prawo */
.dowiedzsie-right {
  text-align: right;
  margin-top: 1.5rem;
}

/* link dowiedz się więcej w leczonych zaburzeniach */
.link-dowiedzsie {
  position: relative;
  display: inline-block;
  padding-bottom: 0.15em;
  /* miejsce na „plamkę” */
  font-weight: 600;
  color: #0077aa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.link-dowiedzsie::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0.8em;
  /* grubość podkreślenia */
  background: #ffcc80;
  /* pastelowy akcent */
  clip-path: polygon(
    0% 100%,
    8% 75%,
    22% 85%,
    35% 70%,
    50% 90%,
    65% 68%,
    78% 84%,
    92% 77%,
    100% 100%
  );
  z-index: -1;
  transition: transform 0.3s ease;
}

.link-dowiedzsie:hover {
  color: rgb(1, 64, 100);
}

.link-dowiedzsie:hover::after {
  transform: scaleX(1.1) translateY(-0.05em);
}