:root {
  --main: #1A2A42;
  --text: #f5f5f5;
  --accent: #9BC7E5;
  --skyblue: #9BC7E5;
  --look: #2F80C8;
  --bg: #F7F9FC;
  --maintext: #234679;
}

/* nadpisanie inline style z <main style="width: 1400px; min-height: 600px;"> */
#container {
  width: 100% !important;
  max-width: 1200px;
  margin: 0 auto 60px auto;
  padding: 40px 20px 60px;
  min-height: 600px;
}

/* =========================================================
   FILTRY
   ========================================================= */

/* poprawka: w HTML masz id="filter-box" */
#filter-box {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 32px auto;
}

#filter-box-title {
  margin-top: 10px;
  margin-bottom: 30px;
  text-align: center;
  font-size: 30px;
  color: var(--maintext);
  font-weight: 600;
  letter-spacing: 1px;
}

#filters {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

/* przyciski z filtrami */
.filter-button {
  flex: 0 1 auto;
  padding: 0 18px;
  height: 60px;

  background-color: transparent;
  color: var(--main);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-align: center;

  border: 0;
  border-radius: 10px;
  transition: all 0.2s;
  white-space: nowrap;
}

.base-btn
{
	border-radius: 10px !important;
	height: 40px !important;
	font-size: 14px !important;
	display: flex;
	align-items: center;
	justify-content: center;
}

.filter-button.choose {
  background-color: var(--maintext);
  color: var(--bg);
}

.filter-button:hover {
  cursor: pointer;
  background-color: var(--maintext);
  color: var(--bg);
  scale: 1.02;
}

.filter-button:active {
  animation: clickAnim 0.2s;
}

@keyframes clickAnim {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* =========================================================
   KAFELKI REALIZACJI
   ========================================================= */

.realization-container {
  display: flex;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

/* pojedynczy kafelek (JS dodaje .box + .default / .hovered) */
.box {
  position: relative;
  overflow: hidden;

  flex: 0 1 calc(25% - 20px);   /* 4 w rzędzie na dużych ekranach */
  max-width: 250px;
  width: 100%;
  height: 250px;

  margin: 10px 0;

  background: rgba(26, 42, 66, 1);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border: 1px solid rgba(26, 42, 66, 0.3);
}

/* warstwy w kafelku */
.box .default,
.box .hovered {
  color: var(--bg);
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  transition: 0.3s;
}

.default {
  opacity: 1;
}

/* opis pojawia się dopiero po hoverze (desktop) */
.hovered {
  opacity: 0;
  font-size: 16px;
  text-align: left;
  padding: 15px;
}

/* hover → zamiana widoczności */
.box:hover .default {
  opacity: 0;
}

.box:hover .hovered {
  opacity: 1;
  scale: 1.05;
}

/* tekst tytułu w kafelku */
.s-box-text {
  margin-left: auto;
  margin-right: auto;

  color: #f5f5f5;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  line-height: 25px;
}

/* =========================================================
   TABLETY (<= 1199px)
   ========================================================= */

@media (max-width: 1199px) {
  #container {
    padding: 32px 20px 48px;
    margin-bottom: 50px;
  }

  #filters {
    gap: 10px;
  }

  .filter-button {
    flex: 0 1 calc(50% - 10px);   /* 2 przyciski w rzędzie */
    height: auto;
    padding: 10px 14px;
    white-space: normal;
    font-size: 13px;
  }

  .box {
    flex: 0 1 calc(33.333% - 20px);  /* 3 kafelki w rzędzie */
    max-width: 260px;
    height: 240px;
  }

  .hovered {
    font-size: 15px;
  }
}

/* =========================================================
   SMARTFONY (<= 768px)
   ========================================================= */

@media (max-width: 768px) {
  #container {
    padding: 24px 16px 40px;
    margin-bottom: 40px;
  }

  #filter-box-title {
    font-size: 24px;
    margin-top: 0;
  }

  #filters {
    gap: 8px;
    justify-content: center;
  }

  .filter-button {
    flex: 0 1 100%;          /* każdy filtr w osobnym wierszu */
    text-align: center;
    font-size: 13px;
    padding: 10px 12px;
  }

  .realization-container {
    gap: 16px;
  }

  .box {
    flex: 0 1 100%;          /* 1 kafelek na szerokość */
    max-width: 500px;
    height: 260px;
    margin: 8px auto;
  }

  .hovered {
    font-size: 14px;
    padding: 16px;
  }
}