/* Reset i podstawowe style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #222;
  background: #ffffff;
  line-height: 1.6;
}

a {
  color: #007BFF;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Kontener główny */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Nagłówek strony - grafika główna */
.hero {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Sekcje */
.section {
  padding: 40px 0;
}
.section.white {
  background: white;
}
.section.light-pink {
  background-color: #FBF5F5;
}
.section.dark-red {
  background-color: #CB5A5C;
  color: white;
}
.section.dark-red a {
  color: white;
}

/* Pełna szerokość obrazów */
.full-width-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Układy kolumnowe */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.text-col, .image-col {
  flex: 1;
  min-width: 300px;
}

/* Sekcje dwukolumnowe */
.two-column {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.column-image, .column-text {
  flex: 1;
  min-width: 300px;
}

/* Kafelki */
.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.tile {
  flex: 1 1 300px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Zespół */
.team-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.team-grid.two {
  justify-content: center;
}

.team-member {
  text-align: center;
  width: 120px;
}

.team-member img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.team-member p {
  margin: 5px 0 0 0;
  font-size: 14px;
}

.team-member .name {
  font-size: 17px;
  font-weight: bold;
  color: #CB5A5C;
}

/* Formularze i przyciski */
button {
  padding: 12px 24px;
  background: #007BFF;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-radius: 4px;
  transition: background 0.3s;
}
button:hover {
  background: #0056b3;
}

/* Stopka */
.footer {
  text-align: center;
  background: #e0f0ff;
  padding: 20px;
  font-size: 14px;
  margin-top: 40px;
}

/* Tekst statyczny */
.static-text {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Galeria */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.gallery-grid a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

/* Responsywność - Desktop (min-width: 769px) */
@media (min-width: 769px) {
  /* Strona USŁUGI - zdjęcie pełnej szerokości */
  .section.white > .full-width-img {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* Strona O NAS - układ kolumnowy */
  .row {
    flex-direction: row;
  }
  
  /* Strona KONTAKT - mapa z prawej */
  .two-column-kontakt {
    display: flex;
    flex-direction: row;
    gap: 40px;
  }
  
  .column-map {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .column-map iframe {
    flex: 1;
    height: 100%;
  }
  
  /* Wyrównanie tekstu na O NAS */
  .section.dark-red .static-text {
    text-align: left;
  }
  
  /* Centrowanie tekstu na USŁUGI */
  .section.light-pink .static-text {
    text-align: left;
    max-width: 800px;
    margin: 0 auto 20px;
  }
}

/* Responsywność - Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }
  
  .row, .two-column {
    flex-direction: column;
  }
  
  .full-width-img {
    border-radius: 0;
  }
  
  /* Na mobilnej: galeria w 2 kolumnach - strona główna i galeria.php */
  .gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }
  
  .gallery-grid a {
    display: block !important;
  }

  .gallery-grid img {
    width: 100% !important;
    height: auto !important;
  }
  
  .hero {
    padding: 0;
  }
  
  .section {
    padding: 30px 0;
  }
  
  .team-grid {
    gap: 15px;
  }
  
  .tile {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
  }
  
  .tile-content {
    order: 1;
  }
  
  .tile img {
    order: 2;
    margin-top: 15px;
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Na mobilnej: O NAS - najpierw tekst, potem zdjęcie */
  .two-column-o-nas {
    flex-direction: column-reverse;
  }
  
  /* Na mobilnej: USŁUGI - najpierw tekst, potem zdjęcie */
  .two-column-uslugi {
    flex-direction: column !important;
  }
}
