/*
Theme Name: 2MR Theme
Theme URI: https://2mr.tech
Author: Patryk
Author URI: https://2mr.tech
Description: Custom one-page WordPress theme for 2MR based on cityarchitekci.pl
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twomr
Tags: one-page, modern, clean, responsive
*/

/* ========== Global ========== */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: url('images/backgroundsky.jpg') center center / cover no-repeat fixed; /* TUTAJ JEST TŁO DLA CAŁEJ STRONY */
  color: #fff;
  scroll-behavior: smooth;
}

h1, h2, h3 {
  color: #a22f1f;
  margin-bottom: 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.section-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

/* ========== Header & Menu ========== */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #2a2a2a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 40px;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 40px;
}

.navbar {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
}

.menu {
  display: flex;
  gap: 30px;
}

.menu li {
  list-style: none;
}

.menu li a {
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: all 0.3s ease;
}

.menu li a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #a22f1f;
  position: absolute;
  bottom: -5px;
  left: 0;
  transition: width 0.3s ease;
}

.menu li a:hover {
  color: #a22f1f;
}

.menu li a:hover::after {
  width: 100%;
}

/* ========== Mobile menu toggle button ========== */
.mobile-menu-toggle {
  display: none !important; /* Domyślnie ukryte */
  font-size: 2rem;
  cursor: pointer;
  color: white;
  padding: 10px;
}

/* ========== Slider ========== */
.slider {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: auto;
}

.slider img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  width: 100%;
  height: auto;
  z-index: 0;
}

.slider img.active {
  opacity: 1;
  position: relative;
  z-index: 1;
}

/* ========== Home Section ========== */
#home {
  min-height: 100vh;
  padding-top: 400px;
  background: transparent; /* Tło jest na body, więc tutaj jest transparentne */
}

.home-left img {
  max-width: 400px;
  width: 100%;
}

.slogan {
  font-size: 1.2rem;
  color: #fff;
  margin-top: 20px;
  font-style: italic;
}

.slide-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

/* ========== Offer Section ========== */
.offer-item {
  display: flex;
  align-items: flex-start;
  background-color: #f2f2f2; /* Jasno szare pudełka */
  color: #111;
  margin-bottom: 40px;
  padding: 20px;
  border-radius: 12px;
  gap: 30px;
  flex-wrap: nowrap;
}

.offer-item h3 {
  color: #b0241e;
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.offer-item p,
.offer-item ul {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  text-align: justify;
}

.offer-item img {
  width: 300px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.offer-slider {
  position: relative;
  width: 300px; /* Zmniejszona szerokość slidera w offer-item */
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.offer-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  border-radius: 10px;
}

.offer-slider img.active {
  opacity: 1;
  position: relative;
}

.offer-item div {
  flex: 1;
}


/* ========== Technology Section ========== */
.de-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 30px;
  padding: 20px;
  background-color: #f2f2f2; /* Jasno szare pudełka */
  color: #111;
  border-radius: 12px;
  margin-bottom: 40px;
  flex-wrap: nowrap;
}

.de-item img {
  width: 300px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.de-item div {
  flex: 1;
  color: #333; /* Ciemniejszy tekst */
}

.de-item h3 {
  color: #b0241e;
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.de-item p {
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;
}

/* ========== About Us & Relations Sections - Białe tło i stylizacja ========== */
#about-us .offer-item,
#relations .offer-item {
    background-color: #f2f2f2; /* Jasne tło */
    color: #111; /* Ciemny tekst */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Lekki cień */
    padding: 30px; /* Trochę więcej paddingu */
}

#about-us .offer-item h2,
#relations .offer-item h2 {
    color: #a22f1f; /* Czerwony nagłówek */
}

#about-us .offer-item p,
#relations .offer-item p {
    color: #333; /* Ciemniejszy tekst */
}

/* Układ sekcji Relations - tekst i zdjęcia pionowo, zdjęcia obok siebie na dużych, jedno pod drugim na małych */
.relations-container {
    display: flex;
    flex-direction: column; /* Układa zawartość (tekst, obrazki) pionowo */
    align-items: center; /* Wyśrodkowuje w poziomie */
    text-align: center; /* Wyśrodkowuje tekst */
}

.relations-container .relations-images {
    display: flex; /* Ustawia kontener zdjęć jako flex, by układały się obok siebie */
    flex-wrap: wrap; /* Pozwala zdjęciom na zawinięcie do nowej linii na małych ekranach */
    justify-content: center; /* Wyśrodkowuje zdjęcia w kontenerze */
    gap: 20px; /* Odstęp między zdjęciami */
    margin-top: 20px; /* Odstęp między tekstem a zdjęciami */
    width: 100%; /* Upewnia się, że kontener zajmuje pełną szerokość */
}

.relations-container .relations-images img {
    max-width: 590px; /* Zmieniona maksymalna szerokość, by idealnie pasowały obok siebie w kontenerze 1200px */
    width: 100%; /* Zapewnia, że zdjęcie zajmie dostępną szerokość */
    height: auto; /* Zachowuje proporcje obrazu */
    flex: 1 1 calc(50% - 20px); /* Nadal dwie kolumny (50% szerokości minus odstęp) */
    min-width: 480px; /* Zwiększona minimalna szerokość zdjęcia, aby były większe zanim zawiną na mobile */
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ========== Footer ========== */
.site-footer {
  background-color: #1c1c1c;
  color: #aaa;
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9rem;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    height: 70px;
  }

  .navbar {
    width: 100%;
  }

  .menu {
    flex-direction: column;
    width: 100%;
    display: none;
    background: #2a2a2a;
    padding: 10px 20px;
    border-radius: 8px;
    margin-top: 10px;
    position: absolute;
    top: 70px;
    left: 0;
    z-index: 1000;
  }

  .menu.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block !important;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1100;
  }

  .home-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .slider img,
  .home-left img {
    max-width: 100%;
  }

  /* Zmiana układu Offer Item na kolumnowy na mobile */
  .offer-item {
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
  }

  .offer-item img,
  .offer-item .offer-slider {
    width: 100%;
  }

  .offer-item div {
    text-align: left;
  }

  /* Zmiana układu Technology Item na kolumnowy na mobile */
  .de-item {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .de-item img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }

  .de-item div {
    width: 100%;
  }

  /* Zmiana układu Relations Images na kolumnowy na mobile */
  .relations-container .relations-images img {
    flex: 1 1 100%; /* Jedna kolumna na małych ekranach */
    min-width: unset; /* USUNIĘTO OGRANICZENIE MINIMALNEJ SZEROKOŚCI */
    max-width: 300px; /* NOWE: OGRANICZENIE MAKSYMALNEJ SZEROKOŚCI */
    margin-bottom: 15px; /* DODANO: Odstęp między zdjęciami pionowo */
  }

  /* Wyśrodkowanie tekstu i zawartości w Relations na mobile */
  #relations .offer-item.relations-container {
    text-align: center; /* Wyśrodkowanie tekstu */
    align-items: center; /* Wyśrodkowanie elementów w poziomie */
  }
  
  /* Upewnij się, że div zawierający tekst w relations też jest wyśrodkowany */
  #relations .offer-item.relations-container > div {
    width: 100%; /* Upewnij się, że zajmuje pełną szerokość */
    text-align: center; /* Wyśrodkowanie tekstu w tym divie */
  }


  #home {
    padding-top: 120px;
  }
}

/* Zmniejszenie odstępu dla sekcji About Us */
#about-us {
  padding-top: 40px;
}

/* === Contact Section - stylizacja z transparentnym tłem === */
#contact {
  background-color: transparent; /* Zmienione na transparent */
  color: #111; /* Ciemny tekst */
  padding: 60px 20px;
  text-align: center;
}

#contact h2 {
  color: #a22f1f;
  margin-bottom: 30px;
}

#contact img {
  display: block;
  margin: 0 auto;
  max-width: 200px;
}

#contact p {
  margin: 10px 0;
}