:root {
  --bright_c: #f5f5f5;
  --dark_c: #333;
  --white: #ffffff;
  --divider: #0e005f;
  --shadow_1: rgba(0, 0, 0, 0.1);
  --shadow_2: rgba(0, 0, 0, 0.2);
  --shadow_3: rgba(0, 0, 0, 0.3);
  --shadow_4: rgba(0, 0, 0, 0.4);
  --shadow_5: rgba(0, 0, 0, 0.5);
  --shadow_6: rgba(0, 0, 0, 0.6);
  --shadow_7: rgba(0, 0, 0, 0.7);
  --shadow_8: rgba(0, 0, 0, 0.8);
  --shadow_9: rgba(0, 0, 0, 0.9);
  --nima: rgba(255, 255, 255, 0);
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: var(--bright_c);
  color: var(--dark_c);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bright_c);
  padding: 20px;
  width: 100%;
  max-width: 1900px;
  margin: auto;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.header-left,
.header-center {
  display: flex;
  align-items: center;
    
}

.header-right {
  display:flex;
  align-items: center;
  margin-right: 10px;    
}

.site-logo {
  display: block;
  max-height: 80px;
}

header nav {
  display: flex;
  flex: 1 1 auto;
  gap: 15px;
  flex-wrap: nowrap;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  justify-content: space-between;
}


/* New unified nav styles */
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 0;
  margin: 0;
}

.main-nav li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;               /* Ensure consistent height */
  min-width: 80px;            /* Optional: ensures logo/fb don't shrink too much */
  padding: 0 5px;
}


.main-nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--dark_c);
  padding: 5px 10px;
}

.nav-icon {
  max-height: 40px;           /* Match approx. button height */
  height: 100%;               /* Make it scale to parent */
  width: auto;                /* Maintain aspect ratio */
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  padding: 5px;               /* Optional spacing */
  transition: transform 0.3s ease;
}


.nav-icon:hover {
  transform: scale(1.1);
}



nav ul li.social-icon {
  margin-left: auto;
}

nav a {
  text-decoration: none;
  color: var(--dark_c);
  padding: 5px 10px;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  text-shadow: 0 1px 3px var(--shadow_6);
  background: var(--divider);
  background-size: cover;
  background-position: center;
  text-align: center;
  height: 500px;
  min-height: 500px;
  max-height: 500px;
}

.hero > div {
  z-index: 0;
}

.hero h1 {
  font-size: 4rem;
  margin: 0;
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--shadow_4);
}

.container, .container_contact {
  width: 80%;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1 0 auto;
}

section {
  margin-bottom: 40px;
}

section h2 {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--divider);
  padding-bottom: 10px;
}

.columns {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: flex-start;
  margin-bottom: 15%;
}

.zajecia {
  display: flex;
  width: 90%;
}

.miasto {
  display: flex;
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: relative;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.miasto-anim {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  z-index: 1;
}

.miasto-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  position: absolute;
  width: 100%;
  height: 0;
  overflow: hidden;
  z-index: -1;
}

.kaszojady, .teens, .oldtimers {
  margin: 0;
  padding: 20px;
  background: var(--white);
  border-radius: 5px;
  box-shadow: 0 1px 3px var(--shadow_3);
  text-align: center;
  flex: 1;
}

.miasto .grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.Mysłowice, .Sosnowiec {
  display: flex;
  justify-content: center;
  width: 100%;
}

.Sosnowiec .grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  width: 100%;
  margin-left: 5%;
}

.Mysłowice .grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: auto;
}

.grid {
  width: 100%;
}

.kaszojady_v2, .oldtimers_v2 {
  background: var(--white);
  padding: 20px;
  box-shadow: 0 1px 3px var(--shadow_3);
  border-radius: 5px;
  text-align: justify;
  height: fit-content;
  margin: 5% 0;
}

.card {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px var(--shadow_2);
  text-align: center;
  flex: 1 1 250px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.gallery-item {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--shadow_2);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.coach-photo {
  width: 150px;
  height: 150px;
  margin-bottom: 1rem;
  border-radius: 25%;
  background: #ccc center/cover no-repeat;
  box-shadow: 0 2px 4px var(--shadow_3);
}

.input {
  border: var(--dark_c);
  border-width: 5px;
  border-radius: 15px;
}

.miasto-wybor {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.miasto-btn {
  padding: 10px 20px;
  border: none;
  background-color: #ccc;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.miasto-btn.active {
  background-color: var(--divider);
  color: var(--white);
}

.subtext {
  text-align: center;
}

p {
  text-align: justify;
}

footer {
  background: var(--dark_c);
  color: var(--white);
  padding: 20px;
  text-align: center;
  flex-shrink: 0;
}

footer a {
  color: var(--white);
  text-decoration: underline;
}

button svg {
  width: 2.5rem;
  height: 2.5rem;
  vertical-align: middle;
}

.card:hover, .gallery-grid:hover {
  transform: translateY(-5px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 10px var(--shadow_3);
}

.pdf-download-btn {
  position: relative;
  display: inline-block;
  padding: 16px 48px 16px 24px;
  margin: 10px;
  font-size: 18px;
  font-weight: 600;
  background-color: var(--divider);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.pdf-download-btn::after {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  opacity: 0;
  white-space: nowrap;
  font-size: 14px;
  transition: opacity 0.3s ease;
  color: #ffffffcc;
}

.pdf-download-btn:hover {
  background-color: #002244;
  transform: translateY(-2px);
}

.pdf-download-btn:hover::after {
  opacity: 1;
}

.fb-icon {
  height: 30px;
  width: 30px;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.fb-icon:hover {
  transform: scale(1.1);
}

.download-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
}

.download-wrapper {
  text-align: center;
}

.download-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-family: sans-serif;
  color: #000;
}

.image-box {
  width: 180px;
  height: 248px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.2s ease;
}

.image-box:hover {
  transform: scale(1.03);
}

.caption {
  margin-top: 0.7rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
}

.adres-dojo {
  margin-top: 2rem;
  text-align: center;
  font-size: 1.1rem;
}

/* MOBILE & TABLET */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 10px 0;
  }





     .main-nav ul {
    flex-direction: column;
    gap: 10px;
  }

    .nav-icon {
    max-height: 30px;
    padding: 3px;
  }

  .main-nav li {
    height: auto;
  }
   
  .header-left,
  .header-center,
  .header-right {
    justify-content: center;
    margin: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav ul li {
    flex: 1 1 auto;
  }

  .hero {
    min-height: unset;
    padding: 20px 0;
  }

  .hero h1 {
    font-size: 2rem;
    padding: 0 10px;
    line-height: 1.2;
  }

  .columns, .zajecia, .miasto .grid {
    flex-direction: column !important;
    width: 100%;
    align-items: center;
  }

  .Mysłowice .grid,
  .Sosnowiec .grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 15px !important;
    margin-left: 0 !important;
  }

  .kaszojady, .teens, .oldtimers,
  .card, .gallery-item {
    width: 90% !important;
    max-width: 300px !important;
  }

  .image-box {
    width: 90vw;
    height: auto;
    max-width: 300px;
  }

  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  .pdf-download-btn {
    font-size: 16px;
    padding: 12px 20px;
  }

  .caption {
    font-size: 1rem;
  }

  .adres-dojo {
    font-size: 1rem;
    padding: 0 10px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }
}

/* Main header layout */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bright_c);
  padding: 20px;
  width: 100%;
  max-width: 1400px;
  margin: auto;
  flex-shrink: 0;
}

/* Left and right blocks (logo, fb icon) */
.header-left,
.header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Center block (navigation menu) */
.header-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.header-center ul {
  display: flex;
  flex-wrap: nowrap;        /* keep items in one line */
  justify-content: space-evenly; /* distribute items evenly across the menu */
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  width: 100%;              /* span full width of center section */
  max-width: 1000px;        /* optional: control maximum width */
}

.header-center li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
}

.header-center li {
  min-width: max-content;   /* prevent shrinking of long items */
}

.header-center a {
  display: inline-block;
  text-decoration: none;
  color: var(--dark_c);
  padding: 5px 10px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.header-center a:hover {
  color: var(--divider);
}

/* Logo image */
.site-logo {
  max-height: 80px;
}

/* Facebook icon */
.fb-icon {
  height: 30px;
  width: 30px;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.fb-icon:hover {
  transform: scale(1.1);
}

/* Responsive behavior */
@media (max-width: 1024px) {
  .header-center ul {
    gap: 10px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 10px;
  }

  .header-center ul {
    flex-direction: column;
    white-space: normal;
    align-items: center;
  }
}

