/* ==========================================================
   ROOT: zmienne globalne do łatwej zmiany kolorystyki strony
   ========================================================== */
:root {
  /* --- Kolory bazowe --- */
  --color-primary: #3399ff;        /* główny akcent strony */
  --color-primary-dark: #2872cc;   /* hover przycisków/elementów aktywnych */
  --color-secondary: #222222;      /* ciemny tekst na jasnym tle */
  --color-light: #ffffff;          /* jasny tekst na ciemnym tle */
  --color-highlight: #ffd700;      /* wyróżnienia tekstu */
  --kontakt-highlight-color: #ffd700; /*Wyróżnienie tylko email, telefon */

  /* --- Tła sekcji --- */
  --bg-navbar: #333333;
  --bg-hero: url(../img/showcase.jpg);
  --bg-services-menu: #f0f0f0;
  --bg-services-content: #ffffff;
  --bg-onas: #f4f4f4;
  --bg-onas-card: #ffffff;
  --bg-kontakt: var(--color-primary);
  --bg-footer: #222222;

  /* --- Teksty --- */
  --text-navbar: var(--color-light);
  --text-hero: var(--color-light);
  --text-services-menu: #333333;
  --text-services-content: #333333;
  --text-onas-card: #333333;
  --text-kontakt: var(--color-light);
  --text-footer: var(--color-light);
  --text-highlight: var(--color-highlight);

  /* --- Interakcje / akcenty --- */
  --navbar-hover-outline: var(--color-primary);
  --navbar-logo-primary: var(--color-primary);
  --services-menu-active-bg: var(--color-primary);
  --services-menu-active-text: var(--color-light);
  --form-button-hover-bg: var(--color-primary-dark);
}

/* ==========================================================
   GLOBAL: reset i podstawowe ustawienia
   ========================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--secondary-color);
}

/* Linki */
a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  color: var(--highlight-color);
}

/* Przycisk */
.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  background-color: var(--primary-color);
  color: var(--text-color);
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--form-button-hover-bg);
  transform: translateY(-2px);
}

/* ===========================
   NAVBAR
   =========================== */
#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10%;
  background-color: var(--bg-navbar);
  color: var(--text-navbar);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 70px;
}

#navbar .logo {
  display: flex;
  align-items: center;
  font-size: 2rem;
  font-weight: 600;
  gap: 10px;
}

#navbar .logo-img {
  height: 100%;
  max-height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-menu li a {
  color: var(--text-navbar);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-menu li a:hover {
  box-shadow: 0 0 0 2px var(--navbar-hover-outline) inset;
  color: var(--text-navbar);
  text-decoration: none;
}

.logo .text-primary {
  color: var(--navbar-logo-primary);
}

/* ===========================
   HAMBURGER
   =========================== */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.8rem;
  z-index: 200;
  
}

/* ===========================
   RESPONSYWNOŚĆ
   =========================== */
@media (max-width: 768px) {
  #navbar {
    flex-wrap: wrap; /* umożliwia złamanie linii */
    height: auto;
    padding: 10px 5%;
  }

  .hamburger {
    display: block; /* pokazuje hamburgera */
  }

  .nav-menu {
    display: none; /* ukryte menu */
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }

  .nav-menu.active {
    display: flex; /* menu po kliknięciu hamburgera */
  }

  .nav-menu li a {
    display: block;
    width: 100%;
    padding: 10px 0;
    text-align: left;
  }
}

/* ==========================================================
   HEADER / HERO
   ========================================================== */
#showcase {
  height: 90vh;
  background: var(--bg-hero) center/cover no-repeat;
  color: var(--text-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative; /* dla overlay */
}

/* Nakładka ciemna, żeby tekst był czytelny */
#showcase::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  z-index: 1;
}

/* Zawartość HERO */
#showcase .showcase-content {
  position: relative;
  z-index: 2; /* tekst nad overlay */
  max-width: 800px;
  padding: 0 20px;
}

#showcase .l-heading {
  font-size: 3rem;
  margin-bottom: 20px;
}

#showcase .lead {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* ==========================================================
   ANIMACJA PRZYCISKU
   ========================================================== */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#showcase .btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  background-color: var(--color-primary);
  color: var(--color-light);
  transition: all 0.3s ease;
  position: relative;
  animation: pulse 2s infinite; /* pulsowanie */
}

#showcase .btn:hover {
  background-color: var(--form-button-hover-bg);
  transform: translateY(-4px); /* unoszenie */
  animation: none; /* zatrzymanie pulsowania */
}

/* ==========================================================
   USŁUGI
   ========================================================== */
.services-section {
  display: flex;
  flex-direction: row;
  padding: 60px 10%;
  gap: 20px;
  flex-wrap: wrap; /* dla responsywności */
}

/* Menu po lewej */
.services-menu {
  flex: 1 1 200px;
  background-color: var(--bg-services-menu);
  list-style: none;
  padding: 20px;
  border-radius: 8px;
}

.services-menu li {
  padding: 12px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  color: var(--text-services-menu);
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 1.3rem;
}

.services-menu li:hover {
  background-color: var(--services-menu-active-bg);
  color: var(--services-menu-active-text);
}

.services-menu li.active {
  background-color: var(--services-menu-active-bg);
  color: var(--services-menu-active-text);
}

/* Zawartość po prawej */
.service-content {
  flex: 3 1 400px;
  background-color: var(--bg-services-content);
  color: var(--text-services-content);
  padding: 20px;
  border-radius: 8px;
}

/* Karty z usługami */
.service-card {
  display: none;
  text-align: left;
}

.service-card.active {
  display: block;
}

.service-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 15px;
}

/* Animacja fade-in dla kart usług */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card {
  display: none;
  text-align: left;
  opacity: 0; /* start od niewidocznej */
  transition: opacity 0.5s ease;
}

.service-card.active {
  display: block;
  animation: fadeIn 0.5s ease forwards; /* fade-in przy aktywacji */
}

/* ==========================================================
   O NAS
   ========================================================== */
#onas {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 85vh; /* większa wysokość sekcji dla lepszego scrolla */
  padding: 80px 10%;
  gap: 40px;
  flex-wrap: wrap;
  background-color: var(--bg-onas);
}

.onas-img {
  flex: 0 0 400px;  /* <-- stały wymiar: nie rośnie, nie maleje */
  width: 400px;
  height: 400px;
  background: url(../img/Onas.png) center/cover no-repeat;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.onas-img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.onas-content {
  /* kwadratowy panel tekstowy dopasowany do obrazu */
  flex: 1 1 600px; /* elastyczna szerokość, minimum ~600px */
  max-width: 750px; /* żeby nie rozciągał się za bardzo */
  height: 400px; /* wysokość zostaje bez zmian */
  display: flex;
  flex-direction: column;
  justify-content: center; /* pionowe wycentrowanie tekstu */
  gap: 16px;
  background-color: var(--bg-onas-card);
  color: var(--text-onas-card);
  padding: 40px 50px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, background-color 0.3s ease;
  text-align: left;
  line-height: 1.7;
  overflow: hidden; /* zabezpieczenie jeśli tekst za długi */
}

.onas-content:hover {
  transform: translateY(-4px);
}

.onas-content h2 {
  font-size: 2.1rem;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.onas-content p {
  font-size: 1.05rem;
  margin: 0;
  color: var(--onas-card-text);
}

/* Responsywność */
@media (max-width: 768px) {
  #onas {
    flex-direction: column;
    min-height: auto;
    padding: 40px 6%;
    gap: 20px;
  }

  .onas-img, .onas-content {
    flex: 1 1 100%;
    width: 100%;
    height: auto;           /* na mobile obraz i karta zajmują naturalną wysokość */
  }

  .onas-content {
    padding: 24px;
    justify-content: flex-start; /* lepsze układanie treści na mobile */
  }
}

/* ==========================================================
   KONTAKT
   ========================================================== */
#kontakt {
  padding: 80px 10%;
  background-color: var(--bg-kontakt);
  color: var(--text-kontakt);
}

.kontakt-content {
  text-align: center;
  margin-bottom: 30px;
}

.kontakt-content h2,
.kontakt-content h3 {
  margin-bottom: 20px;
}

.kontakt-content .dane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.kontakt-content .dane p b {
  color: var(--kontakt-highlight-color);
}

/* Wiersze danych kontaktowych */
.kontakt-content .dane p {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: default;
}

/* Podświetlenie całego wiersza przy hover */
.kontakt-content .dane p:hover {
  background-color: rgba(255, 215, 0, 0.1); /* lekki żółty akcent */
  transform: translateY(-2px);
}

/* Linki w wierszach – mail i telefon */
.kontakt-content .dane p a {
  color: var(--kontakt-highlight-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Hover na linku */
.kontakt-content .dane p a:hover {
  color: #ffaa00; /* ciemniejszy odcień żółtego dla efektu hover */
}

/* Ikony Font Awesome w wierszach */
.kontakt-content .dane p i {
  color: var(--kontakt-highlight-color);
  transition: color 0.3s ease;
}

/* Ikona reaguje na hover całego wiersza */
.kontakt-content .dane p:hover i {
  color: #ffaa00;
}


/* Responsywność */
@media (max-width: 768px) {
  #kontakt {
    padding: 50px 5%;
  }

  .kontakt-content .dane p {
    justify-content: flex-start;
    width: 100%;
  }
}

/* ==========================================================
   STOPKA
   ========================================================== */
#main-footer {
  background-color: var(--bg-footer);
  color: var(--text-footer);
  text-align: center;
  padding: 15px 10%;
}

#main-footer p {
  font-size: 0.9rem;
}
