/* =========================
   RESET / GLOBAL
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #fff;
}

body {
  font-family: 'Roboto', sans-serif;
  color: #333;
  letter-spacing: 0.4px;
  font-weight: 400;
  font-style: normal;
  overflow-x: hidden;
}

/* Zmienne */
:root {
  --header-height: 60px;
  --header-height-mobile: 52px;
  --header-bg: #f0bb1c;
}

/* Rezerwacja miejsca pod fixed header */
#site-header {
  height: var(--header-height);
}

/* =========================
   HEADER
   ========================= */
#mainHeader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 20px;
  background: var(--header-bg);
  z-index: 99999;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 24px;

  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: auto;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.logo-container a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
}

.logo-container img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Desktop nav */
.center-links {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.center-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  padding: 0 2px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.center-links a:hover {
  color: #fff;
  transform: scale(1.05);
}

/* Flaga tylko w headerze i mobile menu */
.center-links .lang-switch,
.mobile-menu .lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.center-links .lang-switch img,
.mobile-menu .lang-switch img {
  width: 35px;
  height: auto;
  display: block;
}

/* Hamburger */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  position: relative;
  z-index: 100000;
  background: transparent;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: all 0.4s ease;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.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);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;

  background: var(--header-bg);
  padding: 20px;
  text-align: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;

  z-index: 99998;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 15px 0;
  text-decoration: none;
  color: #000;
  font-weight: 600;
  padding: 2px 6px;
  line-height: 1.1;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: #fff;
}

/* Desktop hard rules */
@media (min-width: 769px) {
  .center-links {
    display: flex !important;
  }

  .hamburger {
    display: none !important;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  #mainHeader {
    height: var(--header-height-mobile);
    padding: 0 14px;
    grid-template-columns: auto auto;
    justify-content: space-between;
    column-gap: 12px;
  }

  #site-header {
    height: var(--header-height-mobile);
  }

  .center-links {
    display: none !important;
  }

  .hamburger {
    display: inline-flex !important;
  }

  .mobile-menu {
    display: flex;
  }

  .logo-container img {
    height: 34px;
  }
}

/* =========================
   FOOTER
   ========================= */
.footer {
  border-top: 1px solid #000;
  background: var(--header-bg);
  color: #000;
  text-align: center;
  padding: 50px 20px;
}

.footer-subscribe h3 {
  margin-top: 0;
  margin-bottom: 40px;
  font-size: 22px;
  font-weight: 700;
}

/* usuwamy pseudo-linię */
.footer-subscribe::after {
  content: none;
}

.footer-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.footer .subscribe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  background: #fff;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #000;
  border-radius: 30px;
  transition: all 0.25s ease;
}

.footer .subscribe-btn:hover {
  background: #000;
  color: #fff;
  transform: scale(1.05);
}

.footer .subscribe-btn img {
  width: 24px;
  height: 24px;
}

/* wspólny wrapper dla linii i kolumn */
.footer-links-wrap {
  width: min(100%, 760px);
  margin: 0 auto 10px;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: #000;
  margin-bottom: 28px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 70px;
  align-items: start;
  text-align: left;
}

.footer-links-column {
  min-width: 0;
}

.footer-links-column h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links-list a {
  color: #000;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  transition: color 0.3s ease, transform 0.3s ease;
  transform-origin: left center;
}

.footer-links-list a:hover {
  color: #fff;
  transform: translateX(4px);
}

/* Footer accordion */
.footer-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: #000;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.footer-accordion-title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.footer-accordion-icon {
  display: none;
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
  transition: transform 0.3s ease;
  transform-origin: center;
}

.footer-accordion-content {
  overflow: visible;
  max-height: none;
}

.footer-accordion.active .footer-accordion-icon {
  transform: rotate(45deg);
}

/* Social */
.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 35px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-socials a img {
  height: 32px;
  width: auto;
  margin: 0 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-socials a:hover img {
  transform: scale(1.2);
  filter: brightness(0) saturate(100%);
}

.footer-socials .lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.footer-socials .lang-switch img {
  width: 35px;
  height: auto;
  display: block;
  margin: 0 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-socials .lang-switch:hover img {
  transform: scale(1.2);
  filter: brightness(0) saturate(100%);
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid #000;
  margin-top: 20px;
  padding-top: 12px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-bottom a {
  color: #000;
  text-decoration: none;
  transition: 0.3s;
}

.footer-bottom a:hover {
  color: #000;
}

.author-break {
  display: inline;
}

/* Tablet */
@media (max-width: 900px) {
  .footer-links-grid {
    gap: 30px 40px;
  }

  .footer-links-list a {
    font-size: 17px;
  }
}

/* Mobile + tablet footer accordion */
@media (max-width: 760px) {
  .footer {
    padding: 30px 20px;
  }

  .footer-subscribe h3 {
    margin-bottom: 15px;
  }

  .footer-buttons {
    margin-bottom: 24px;
    gap: 16px;
  }

  .footer-links-wrap {
    width: min(100%, 420px);
  }

  .footer-divider {
    margin-bottom: 20px;
  }

  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-links-column {
    text-align: left;
  }

  .footer-accordion-toggle {
    padding: 0;
  }

  .footer-accordion-title {
    font-size: 17px;
  }

  .footer-accordion-icon {
    display: block;
  }

  .footer-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, margin-top 0.35s ease;
  }

  .footer-accordion.active .footer-accordion-content {
    margin-top: 14px;
  }

  .footer-links-list {
    gap: 10px;
  }

  .footer-links-list a {
    font-size: 16px;
    transform-origin: left center;
  }

  .footer-links-list a:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  .footer-socials {
    gap: 6px;
    margin-bottom: 0;
  }

  .footer-socials a img {
    height: 24px;
    margin: 0 8px;
  }

  .footer-socials .lang-switch img {
    width: 30px;
  }

  .author-break {
    display: block;
    margin-top: 5px;
  }
}

/* Desktop: sekcje zawsze otwarte */
@media (min-width: 761px) {
  .footer-accordion-toggle {
    pointer-events: none;
  }

  .footer-accordion-icon {
    display: none !important;
  }

  .footer-accordion-content {
    max-height: none !important;
    overflow: visible !important;
    margin-top: 18px;
  }
}