/* Global styles */
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: url('img/background-site.webp') no-repeat center center fixed;
  background-size: cover;
  line-height: 1.6;
  color: #333;
}
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background-image: url('img/header-background.webp');
  background-size: cover;
  background-position: center;
  color: #000;
  padding: 2rem 1rem;
  position: relative;
}
.header-content {
  text-align: center;
}
.logo img {
  max-width: 150px;
  height: auto;
  margin: 0 auto;
}

/* Navigation */
.menu-toggle {
  display: none;
}
nav {
  position: relative;
}
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
nav ul li {
  margin: 0 1rem;
}
nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  padding: 0.5rem 0;
}
nav ul li a:hover,
nav ul li a:focus {
  color: #2a7cd8;
  border-bottom: 0.67px solid #2a7cd8;
}
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    background: transparent;
    border: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
  }
  .menu-toggle svg rect { fill: #365557; }
  .menu-toggle svg rect {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: 50% 50%;
  }
  .menu-toggle.active svg rect:nth-child(1) {
    transform: translateY(25px) rotate(45deg);
    transform-origin: center;
    }
  .menu-toggle.active svg rect:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active svg rect:nth-child(3) {
    transform: translateY(-25px) rotate(-45deg);
    transform-origin: center;
    }
  nav ul {
    flex-direction: column;
    background-color: rgba(255,255,255,0.95);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: translateY(-100vh);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }
  nav ul.open {
    transform: translateY(0);
  }
  nav ul li {
    margin: 0.5rem 0;
    text-align: center;
  }
}

/* Hero */
.hero {
  padding: 2rem 0;
}
.hero h1 {
  font-size: 2.5rem;
  margin: 0;
}
.hero p {
  font-size: 1.25rem;
  margin: 0.5rem 0 0;
}

/* Sections */
section {
  padding: 2rem 0;
  background: url('img/background-site.webp') no-repeat center center fixed;
  background-size: cover;
  border-bottom: 1px solid #eee;
}
section:last-of-type {
  border-bottom: none;
}
section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
section p {
  margin-bottom: 1rem;
}

/* Portrait */
.portrait {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 50%;
  display: block;
  margin: 1rem auto;
}

/* Usługi list */
#uslugi ul {
  list-style: none;
  padding: 0;
}
#uslugi ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
#uslugi ul li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: #2a7cd8;
  font-size: 1rem;
}

/* Contact section */
#kontakt {
  text-align: center;
}

.btn-tel {
  background: linear-gradient(to bottom, #3949ab, #1a237e);
  color: #ffffff;
  padding: 0.5em 1em;
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-tel:hover,
.btn-tel:focus {
  background-color: #1f5ca8;
  color: #ffffff;
  text-decoration: none;
}
.social-links a {
  color: #2a7cd8;
  text-decoration: underline;
  margin: 0 0.5rem;
}

/* Floating call button */
.fab-call {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: #2a7cd8;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}
.fab-call:hover,
.fab-call:focus {
  background-color: #1f5ca8;
}
.fab-call svg {
  width: 1.5rem;
  height: 1.5rem;
}


/* Language switcher styles */
.language-switcher {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}
.language-switcher img {
  width: 24px;
  height: auto;
  margin-left: 5px;
}

/* Emoji flag-based language switcher */
.language-switcher {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  z-index: 1000;
}
.language-switcher .flag-link {
  text-decoration: none;
  margin-left: 5px;
}

/* Enlarged hamburger menu by 1.5x */
.hamburger-menu, .menu-toggle {
    transform: scale(1.5);
    transform-origin: center;
}


/* Sticky hamburger and dropdown menu */
@media (max-width: 768px) {
  .menu-toggle {
    position: fixed !important;
    top: 1rem !important;
    left: 1rem !important;
    z-index: 1001 !important;
  }
  nav ul {
    position: fixed !important;
    top: 3.5rem !important;
    left: 0 !important;
    right: 0 !important;
  }
}

/* Enhanced Desktop Menu Buttons */
@media (min-width: 769px) {
  nav ul li a {
    display: inline-block;
    background-color: #fff;
    color: #365557;
    border: 2px solid #365557;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  nav ul li a:hover,
  nav ul li a:focus {
    background-color: #365557;
    color: #fff;
    border-color: #365557;
  }
}

/* Rounded border and symmetric X for hamburger toggle */
@media (max-width: 768px) {
  .menu-toggle {
    background-color: #fff;
    border: 2px solid #365557;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .menu-toggle .bar,
  .menu-toggle .bar::before,
  .menu-toggle .bar::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: #365557;
    transition: transform 0.3s ease, background 0.3s ease;
  }
  .menu-toggle .bar {
    position: relative;
  }
  .menu-toggle .bar::before {
    position: absolute;
    top: -8px;
  }
  .menu-toggle .bar::after {
    position: absolute;
    top: 8px;
  }
  /* Open state */
  .menu-toggle.open {
    background-color: #365557 !important;
    border-color: #365557 !important;
  }
  .menu-toggle.open .bar {
    background: transparent;
  }
  .menu-toggle.open .bar::before {
    transform: rotate(45deg);
    top: 0;
    background: #fff;
  }
  .menu-toggle.open .bar::after {
    transform: rotate(-45deg);
    top: 0;
    background: #fff;
  }
}

/* Fix close (X) icon symmetry and border touch */
.close-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
}
.close-icon::before,
.close-icon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 24px;
  background: currentColor;
  top: 0;
  left: 50%;
  transform-origin: center;
}
.close-icon::before { transform: translateX(-50%) rotate(45deg); }
.close-icon::after  { transform: translateX(-50%) rotate(-45deg); }



.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 3px solid #365557;
  border-radius: 50%;
  background: white;
  padding: 0;
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
}
.menu-toggle svg {
  width: 60%;
  height: 60%;
}



/* Span-based hamburger button */
.menu-toggle {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 48px;
  height: 48px;
  border: 3px solid #365557;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1001;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 60%;
  height: 3px;
  background-color: #365557;
  position: absolute;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle span:nth-child(1) {
  transform: translateY(-8px);
}
.menu-toggle span:nth-child(2) {
  transform: translateY(0);
}
.menu-toggle span:nth-child(3) {
  transform: translateY(8px);
}
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* Wymuszone wyświetlanie menu na desktopie */
@media (min-width: 769px) {
  .menu-toggle {
    display: none !important;
  }
  nav ul {
    display: flex !important;
  }
}


/* Home button style */
.btn-home {
    display: inline-block;
    background-color: #2a7cd8;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}
.btn-home:hover,
.btn-home:focus {
    background-color: #1f5ca8;
    color: #ffffff;
    text-decoration: none;
}

/* Responsive "About Me" image styling */
.about-image {
  text-align: center;
  margin: 1rem 0;
}
.responsive-img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* Ensure container bounds and responsive behavior */
.about-image {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 1rem auto;
  padding: 0 1rem;    /* internal horizontal padding */
  overflow: hidden;   /* prevent overflow */
}

.about-image picture,
.about-image img.responsive-img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .social-button {
    flex: 1 1 20%;
    max-width: 20%;
    padding: 5px;
  }
  .social-button img {
    width: 100%;
    height: auto;
  }
}

/* Social bar icons fill */


/* Override: move phone selector up by 10% so it no longer covers social bar */
.fab-call {
    bottom: 10% !important;
}
.btn-tel {
    bottom: 10% !important;
}

.social-button img, .social-bar img, .social-bar a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Desktop-only: Ensure social bar icons fill and hide specific labels */
@media (min-width: 769px) {
  .social-button, .social-bar a {
      padding: 0 !important;
      margin: 0 !important;
  }
  .social-button img, .social-bar img, .social-bar a img {
      width: 100% !important;
      height: 100% !important;
      object-fit: cover !important;
      display: block !important;
  }
  /* Hide text labels under Google Reviews and Znany Lekarz */
  .social-bar a[href*="goo.gl"] span,
  .social-bar a[href*="znanylekarz.pl"] span {
      display: none !important;
  }
}



/* Hide phone (receiver) icon on desktop only */
@media (min-width: 769px) {
  .fab-call { display: none !important; }
}

/* Added border for social buttons on mobile */
@media (max-width: 767px) {
  .social-bar .social-button,
  .social-bar a {
    border: 3px solid #365557;
    border-radius: 12px;
    /* Keep icon size and spacing unchanged */
  }
}

/* Updated border for social buttons on mobile to match hamburger menu color */
@media (max-width: 767px) {
  .social-bar .social-button,
  .social-bar a {
    border: 3px solid #365557;
    border-radius: 12px;
  }
}

/* Desktop social bar button styles override */
@media (min-width: 1024px) {
  .social-bar a, .social-bar button {
    transform: scale(0.6);
    border-radius: 20px;
    border: 6px solid #365557;
  }
  /* Remove red border from Google Review */
  .social-bar .google-review {
    border: none !important;
  }
}

.menu-toggle svg rect {
  height: 1.33px !important;
}


/* Mobile-only icon for FAQ link in the main menu */
@media (max-width: 767px) {
  .menu a.faq-link::before {
    content: "❓";
    display: inline-block;
    margin-right: 8px;
    line-height: 1;
  }
}
