/* Globalny reset dla spójności */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Zmienne CSS dla łatwej konserwacji */
:root {
  --primary-bg: #091d3e;
  --text-color: #ffffff;
  --accent-color: #d32f2f;
  --accent-hover: #ff5722;
  --highlight-color: #ff9f1c;
  --spacing-sm: 15px;
  --spacing-md: 20px;
  --spacing-lg: 30px;
  --font-stack: system-ui, -apple-system, Arial, sans-serif;
}

/* Style stopki */
footer {
  background-color: var(--primary-bg);
  color: var(--text-color);
  font-family: var(--font-stack);
  width: 100vw;
  padding: var(--spacing-lg) 0 0;
  overflow-x: hidden; /* Zapobiega poziomemu przewijaniu */
}

/* Kontener stopki */
.footer-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Sekcje stopki */
.footer-section {
  text-align: center;
  padding: var(--spacing-md);
}

/* Logo */
.footer-logo img {
  max-width: 300px; /* Stała szerokość 300px dla laptopów */
  height: auto;
  margin-bottom: var(--spacing-md);
}

/* Sekcja kontaktowa */
.footer-contact p {
  margin: var(--spacing-sm) 0;
  line-height: 1.6;
  font-size: 1rem;
}

/* Nagłówki */
.footer-heading {
  font-size: 1.4rem;
  font-weight: 600;
  margin: var(--spacing-md) 0;
  text-transform: uppercase;
}

/* Przycisk kontaktowy */
.contact-btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin: var(--spacing-md) 0;
  min-height: 48px; /* Lepsza dostępność dotykowa */
}

.contact-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.contact-btn:focus {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* Link kontaktowy */
.contact-link {
  color: var(--text-color);
  font-size: 1.1rem;
  text-decoration: none;
}

.contact-link:hover {
  color: var(--highlight-color);
  text-decoration: underline;
}

.contact-link:focus {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* Linki społecznościowe */
.social {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.social li a img {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.social li a:hover img {
  transform: scale(1.15);
}

.social li a:focus {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* Linki w stopce */
.footer-links {
  list-style: none;
}

.footer-links li {
  margin: 10px 0;
}

.footer-links li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.footer-links li a:hover {
  color: var(--highlight-color);
}

.footer-links li a:focus {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* Sekcja polecana */
.footer-recommend img {
  max-width: 300px; /* Stała szerokość 300px dla laptopów */
  height: auto;
  margin: var(--spacing-sm) 0;
}

/* Sekcja nagród */
.footer-awards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
}

.footer-awards img {
  max-width: 300px; /* Stała szerokość 300px dla laptopów */
  height: auto;
  margin: var(--spacing-sm);
  object-fit: contain;
}

/* Dolna stopka */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: var(--spacing-md) auto 0;
  padding: var(--spacing-md) var(--spacing-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom-left p,
.footer-bottom-right ul {
  font-size: 0.9rem;
}

.footer-bottom-right ul {
  list-style: none;
  display: flex;
  gap: var(--spacing-md);
}

.footer-bottom-right li a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom-right li a:hover {
  color: var(--highlight-color);
}

.footer-bottom-right li a:focus {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

.bottom-link {
  color: var(--text-color);
  text-decoration: none;
}

.bottom-link:hover {
  color: var(--highlight-color);
}

/* Responsywność */

/* Tablety (768px - 991px) */
@media (max-width: 991px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }

  .footer-awards-section {
    grid-column: span 2;
  }

  .footer-logo img {
    max-width: 250px; /* Lekkie skalowanie dla tabletów */
  }

  .footer-recommend img {
    max-width: 250px; /* Lekkie skalowanie dla tabletów */
  }

  .footer-awards img {
    max-width: 250px; /* Lekkie skalowanie dla tabletów */
  }
}

/* Mobile (≤ 800px) */
@media (max-width: 800px) {
  .footer-container {
    grid-template-columns: 1fr; /* Pionowy układ sekcji */
    grid-template-rows: auto;
  }

  .footer-awards-section {
    grid-column: auto; /* Resetuje span dla mobile */
  }

  .footer-section {
    padding: 20px; /* Stały padding 20px */
  }

  .footer-logo img {
    width: calc(100% - 40px); /* Pełna szerokość minus padding 20px z każdej strony */
    max-width: none; /* Usuwa ograniczenie max-width */
    height: auto;
    margin: 0 auto var(--spacing-md);
  }

  .footer-recommend img {
    width: calc(100% - 40px); /* Pełna szerokość minus padding */
    max-width: none;
    height: auto;
    margin: var(--spacing-sm) auto;
  }

  .footer-awards img {
    width: calc(100% - 40px); /* Pełna szerokość minus padding */
    max-width: none;
    height: auto;
    margin: var(--spacing-sm) auto;
  }

  .contact-btn {
    font-size: 1.2rem;
    padding: 10px 20px;
    margin: 15px auto;
    min-height: 48px;
    width: fit-content;
  }

  .contact-link {
    font-size: 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
    padding-bottom: 20px;
  }

  .footer-bottom-right ul {
    flex-direction: column;
    gap: 12px;
  }
}

/* Bardzo małe ekrany (≤ 360px) */
@media (max-width: 360px) {
  .footer-section {
    padding: 15px; /* Mniejszy padding dla bardzo małych ekranów */
  }

  .footer-logo img,
  .footer-recommend img,
  .footer-awards img {
    width: calc(100% - 30px); /* Mniejszy padding 15px na bardzo małych ekranach */
  }

  .contact-btn {
    font-size: 1.1rem;
    padding: 8px 16px;
  }
}