/* Realizacje – podstawowe style (uzupełnimy w Kroku 8) */
:root {
  --realizacje-radius: 12px;
}

.realizacje-grid {
  display: grid;
  gap: 16px;
}

.realizacje-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* ważne dla równych miniaturek */
  border-radius: var(--realizacje-radius);
}

/* === Shortcode: Galeria Realizacji === */

.realizacje-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.realizacje-card {
  text-align: center;
}

.realizacje-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--realizacje-radius);
  transition: transform 0.3s ease;
}

.realizacje-card img:hover {
  transform: scale(1.05);
}

.realizacje-title {
  margin-top: 8px;
  font-size: 1.1em;
}

.realizacje-title a {
  color: inherit;
  text-decoration: none;
}

.realizacje-title a:hover {
  text-decoration: underline;
}

/* === Shortcode: Ostatnie Realizacje === */

.realizacje-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.realizacje-grid-3.gapless {
  gap: 10px;
}

.realizacje-card-large {
  position: relative;
  overflow: hidden;
}

.realizacje-card-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.realizacje-card-large:hover img {
  transform: scale(1.1);
}

.realizacje-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 10px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.realizacje-card-large:hover .realizacje-overlay {
  opacity: 1;
}

/* Wyłączenie zaokrąglenia w shortcode [ostatnie_realizacje] */
.realizacje-card-large img {
  border-radius: 0 !important;
}

/* Kontener całej strony pojedynczej realizacji */
.realizacja-single-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tytuł */
.realizacja-single-title {
  font-size: 2rem;
  margin-bottom: 20px;
}

/* Treść realizacji */
.realizacja-single-content {
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Kontener galerii */
.realizacja-gallery {
  display: grid !important; /* wymuszenie grid */
  grid-template-columns: repeat(4, 1fr) !important; /* 4 kolumny */
  gap: 10px;
  grid-auto-rows: 200px; /* stała wysokość rzędów */
}

/* Pojedynczy element galerii */
.realizacja-gallery-item {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.realizacja-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Responsywność */

/* Tablety - 3 kolumny */
@media (max-width: 1024px) {
  .realizacja-gallery {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Mniejsze tablety/duże telefony - 2 kolumny */
@media (max-width: 768px) {
  .realizacja-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Telefony - 1 kolumna */
@media (max-width: 480px) {
  .realizacja-gallery {
    grid-template-columns: 1fr !important;
  }
}
