/* --- ZMIENNE I REASET --- */
:root {
  /* Kolory na podstawie logo */
  --primary-color: #1a2a40; /* Ciemny granat */
  --secondary-color: #4a90e2; /* Jasny niebieski/woda */
  --text-color: #333333;
  --text-light: #666666;
  --bg-light: #f4f7f6;
  --white: #ffffff;
  --transition: all 0.3s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  color: var(--primary-color);
  margin-bottom: 15px;
}

p {
  margin-bottom: 1rem;
}

p:last-child,
ul:last-child {
  margin-bottom: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--bg-light);
}

/* --- NAGŁÓWEK (NAVBAR) --- */
.navbar {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo img {
  height: 60px;
  display: block;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px; /* Odstęp między obrazkiem a tekstem */
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 600;
}

.nav-links a:not(.btn-primary) {
  transition: var(--transition);
}

.nav-links a:not(.btn-primary):hover {
  color: var(--secondary-color);
}

/* --- HAMBURGER (MOBILE) --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- PRZYCISKI --- */
.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 5px;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  padding: 12px 30px;
  border: 2px solid var(--white);
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

/* --- SEKCJA HERO --- */
.hero {
  min-height: 100vh;
  padding-top: 80px;
  margin-top: 0;
  /* Wykorzystanie zdjęcia startujących łodzi z przyciemnieniem dla czytelności tekstu */
  background:
    linear-gradient(rgba(26, 42, 64, 0.7), rgba(26, 42, 64, 0.4)),
    url('./media/home_page_background.webp') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
}

/* --- SEKCJA SOCIALI W HERO --- */
.hero-socials {
  position: absolute;
  bottom: 40px; /* Odstęp od dolnej krawędzi ekranu */
  left: 50%;
  transform: translateX(-50%); /* Idealne wyśrodkowanie w poziomie */

  display: flex;
  align-items: center;
  gap: 15px;

  padding: 10px 15px 10px 30px;
  background: rgba(26, 42, 64, 0.6); /* Przezroczyste granatowe tło */
  border: 1px solid rgba(255, 255, 255, 0.2); /* Delikatna ramka */
  border-radius: 50px; /* Zaokrąglenie w kształt "pigułki" */
  backdrop-filter: blur(5px); /* Efekt szkła (rozmycie tła) */
  color: var(--white);
  z-index: 2;
}

.hero-socials span {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 10px;
}

/* Style okrągłych przycisków z ikonami */
.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--transition);
}

.hero-socials a:hover {
  background-color: var(
    --secondary-color
  ); /* Zmiana koloru na niebieski przy najechaniu */
  transform: translateY(-3px); /* Lekkie uniesienie */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Dostosowanie na urządzeniach mobilnych */
@media (max-width: 768px) {
  .hero-socials {
    bottom: 20px;
    padding: 8px 12px 8px 20px;
  }

  .hero-socials span {
    font-size: 0.75rem;
  }

  .hero-socials a {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

.next-event-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--secondary-color);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 25px;
  animation: fadeInDown 0.8s ease-out;

  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.next-event-badge:hover {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(74, 144, 226, 0.5);
}

.hero-btns {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.btn-primary-large {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 15px 35px;
  border-radius: 5px;
  font-weight: 800;
  text-transform: uppercase;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.btn-primary-large:hover {
  transform: translateY(-3px);
  background-color: var(--white);
  color: var(--primary-color);
}

/* --- SEKCJA LISTY ZAWODÓW --- */
.events-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 900px;
  margin: 0 auto;
}

.event-card {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-left: 5px solid #ccc;
  transition: var(--transition);
}

.event-card.highlight {
  border-left-color: var(--secondary-color);
  background: #f0f7ff;
}

.event-date {
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
  min-width: 80px;
  color: var(--primary-color);
}

.event-date span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
}

.event-info {
  flex: 1;
  padding: 0 30px;
}

.event-info h3 {
  margin-bottom: 5px;
  color: var(--primary-color);
}

.event-info p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-top: 5px;
}

.btn-event {
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-event:hover:not(.disabled) {
  background: var(--primary-color);
  color: var(--white);
}

.btn-event.disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
}

/* Animacja dla Badge */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- SEKCJA O NAS --- */
.about {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.divider {
  height: 4px;
  width: 60px;
  background-color: var(--secondary-color);
  margin-bottom: 20px;
}

.divider.center {
  margin: 0 auto 20px auto;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* --- GALERIA --- */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-img:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* --- SEKCJA SPONSORZY --- */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  align-items: center;
}

.sponsor-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  min-height: 100px;
  transition: var(--transition);
}

.sponsor-slot:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.sponsor-slot img {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
  transition: var(--transition);
}

.sponsor-slot:hover img {
  transform: scale(1.05);
}

.sponsor-placeholder {
  border: 2px dashed #d0d8e4;
  background: transparent;
  box-shadow: none;
}

.sponsor-placeholder:hover {
  box-shadow: none;
  transform: none;
}

@media (max-width: 768px) {
  .sponsors-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }

  .sponsor-slot {
    min-height: 80px;
    padding: 15px 10px;
  }
}

/* --- STOPKA --- */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 0 20px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

.footer-logo {
  height: 70px;
  margin-bottom: 15px;
  background-color: white; /* Dodane białe tło pod logo w stopce, by było widać czarne elementy */
  padding: 5px;
  border-radius: 5px;
}

.footer-col h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #aaaaaa;
}

/* --- PRZEŁĄCZNIK JĘZYKA --- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
}

.lang-btn {
  background: none;
  border: 1.5px solid transparent;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
  line-height: 1;
}

.lang-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.lang-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* --- RESPONSYWNOŚĆ (DLA TELEFONÓW) --- */
@media (max-width: 768px) {
  /* Nawigacja — hamburger */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a:not(.btn-primary) {
    padding: 15px 20px;
    border-bottom: 1px solid var(--bg-light);
  }

  .nav-links .btn-primary {
    margin: 15px 20px;
    text-align: center;
  }

  /* Odstępy sekcji */
  .section-padding {
    padding: 50px 0;
  }

  /* Typografia */
  .section-header h2,
  .about-text h2 {
    font-size: 1.9rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  /* Przyciski hero */
  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* Sekcja O nas */
  .about {
    flex-direction: column;
    gap: 30px;
  }

  /* Karty zawodów */
  .event-card {
    flex-wrap: wrap;
    gap: 12px;
  }

  .event-info {
    padding: 0 10px;
  }

  /* Galeria */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* Stopka */
  .footer-col {
    min-width: unset;
    flex: unset;
    width: 100%;
  }

  .footer-content {
    gap: 25px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  .next-event-badge {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

  .nav-container {
    height: 65px;
  }

  .logo img {
    height: 45px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .nav-links {
    top: 65px;
  }

  .btn-primary-large,
  .btn-secondary {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .hero {
    padding-top: 65px;
  }
}

@media (max-width: 380px) {
  .logo-text {
    display: none;
  }

  .lang-btn {
    padding: 3px 5px;
    font-size: 0.65rem;
  }
}
