/*
  Dark yet friendly theme for ModernSolutions.com.pl
  Colours are muted blues and greys on a deep background.  
  This sheet defines global styles, navigation layout and utility classes.  
*/

/* CSS custom properties for easy theming */
:root {
  /*
    Jasna wersja kolorystyczna portalu. Używamy bardzo jasnego tła i białych paneli,
    a tekst jest ciemny dla wysokiego kontrastu. Delikatne odcienie niebieskiego
    tworzą przyjazny akcent.
  */
  --color-bg: #f7f9fc;         /* bardzo jasne tło */
  --color-panel: #ffffff;      /* karty i nawigacja */
  --color-panel-alt: #f3f4f6;  /* alternatywna szarość do wypełnień */
  --color-text: #0f172b;       /* ciemny tekst dla kontrastu */
  --color-muted: #475569;      /* szary dla drugorzędnego tekstu */
  --color-accent: #2563eb;     /* wyrazisty niebieski akcent */
  --color-accent-hover: #3b82f6; /* jaśniejszy niebieski po najechaniu */
  --border-radius: 10px;
  --transition-speed: 0.2s;
  font-size: 16px;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-speed);
}
a:hover {
  color: var(--color-accent-hover);
}

/* Navigation bar */
header {
  background-color: var(--color-panel);
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: bold;
}

.nav-menu {
  display: flex;
  gap: 20px;
}
.nav-menu a {
  padding: 8px 12px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  color: var(--color-text);
}
.nav-menu a:hover {
  background-color: var(--color-panel-alt);
}

/* Layout helpers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.section {
  margin-bottom: 40px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.card {
  background-color: var(--color-panel);
  border-radius: var(--border-radius);
  padding: 20px;
  flex: 1;
  min-width: 260px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  transition: background-color var(--transition-speed);
}
.card:hover {
  background-color: var(--color-panel-alt);
}

/* Obrazy w kartach (usługi i sklep) – jednolity rozmiar i zaokrąglenie */
.card img,
.product-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 10px;
}

/* Hero header */
.hero {
  text-align: center;
  padding: 60px 20px;
}
.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}
.hero p {
  color: var(--color-muted);
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto 30px;
}

.btn {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-bg);
  padding: 10px 18px;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color var(--transition-speed);
}
.btn:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-bg);
}

/* Footer */
footer {
  background-color: var(--color-panel);
  padding: 20px;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8rem;
}
footer .social-links {
  margin-bottom: 8px;
}
footer .social-links a {
  margin: 0 10px;
  font-size: 0.9rem;
  color: var(--color-accent);
}
footer .social-links a:hover {
  color: var(--color-accent-hover);
}

/* Shop page */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.product-card {
  background-color: var(--color-panel);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.product-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.product-card p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.product-card .price {
  font-weight: bold;
  margin-bottom: 12px;
}

/* Ilustracje – siatka obrazów reprezentujących działalności */
.illustrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.illustrations-grid img {
  width: 100%;
  /* Ustaw stałą wysokość, aby wszystkie ilustracje w siatce miały jednakowy rozmiar */
  height: 160px;
  border-radius: var(--border-radius);
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.illustrations-grid figcaption {
  text-align: center;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .nav-menu {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
}

/* Additional responsive rules for very narrow screens */
@media (max-width: 600px) {
  /* Stack the logo and menu vertically on small screens to prevent overflow */
  .nav-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Wrap navigation links and align them to the start; reduce gap */
  .nav-menu {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 10px;
  }
  .nav-menu a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

/* Responsive video wrapper to embed YouTube in a 16:9 ratio */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 20px auto;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Promo section layout: video and three cards side by side */
.promo-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

/* Smaller video inside promo section */
.small-video {
  flex: 1 1 360px;
  max-width: 640px;
}

/* Cards column next to video */
.promo-cards {
  display: flex;
  flex-direction: column;
  flex: 1 1 300px;
  gap: 20px;
}

/* Cards inside promo section – reuse general card style */
.promo-card {
  flex: 1;
}

/* Shrink specific images (e.g., Kali) to half width inside a card */
/* Obrazy z klasą half-img są zmniejszane, aby nie dominowały treści karty */
.half-img {
  max-width: 50%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}