.wp-content {
  line-height: 1.6;
  font-size: 18px;
  max-width: 950px;
  margin: 40px auto;
}

/* ---------- TYPOGRAFIA ---------- */

.wp-content p {
  margin: 0 0 1em;
}

.wp-content h1,
.wp-content h2,
.wp-content h3,
.wp-content h4,
.wp-content h5,
.wp-content h6 {
  margin: 1.5em 0 0.5em;
  line-height: 1.2;
}

.wp-content ul,
.wp-content ol {
  margin: 0 0 1em 1.5em;
}

.wp-content li {
  margin-bottom: 0.5em;
}

.wp-content a {
  text-decoration: underline;
}

.wp-content strong {
  font-weight: bold;
}

.wp-content em {
  font-style: italic;
}

/* ---------- OBRAZY ---------- */

.wp-content img {
  max-width: 100%;
  height: auto;
  border: 0 !important;
}

.wp-content figure {
  margin: 1em 0;
}

/* ---------- ALIGN ---------- */

.wp-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-content .alignleft {
  float: left;
  margin-right: 1em;
  margin-bottom: 1em;
  max-width: 50%;
}

.wp-content .alignright {
  float: right;
  margin-left: 1em;
  margin-bottom: 1em;
  max-width: 50%;
}

/* clearfix */
.wp-content::after {
  content: "";
  display: block;
  clear: both;
}

/* ---------- GALLERY (SHORTCODE) ---------- */

.wp-content .gallery .gallery-item {
    width: 100% !important;
}

.wp-content .gallery .gallery-item img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
}

.wp-content .gallery {
  display: grid;
  gap: 16px;
  margin: 1.5em 0;
}

.wp-content .gallery.gallery-columns-1 {
  grid-template-columns: 1fr;
}

.wp-content .gallery.gallery-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.wp-content .gallery.gallery-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.wp-content .gallery.gallery-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wp-content .gallery .gallery-item {
  margin: 0;
}

.wp-content .gallery .gallery-icon {
  margin: 0;
}

.wp-content .gallery .gallery-icon a {
  display: block;
}

.wp-content .gallery .gallery-icon img {
  width: 100%;
  height: auto;
  display: block;
}

.wp-content .gallery .gallery-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* usuwa stare <br clear="both"> */
.wp-content .gallery br {
  display: none;
}

/* ===== NOWA GALERIA GUTENBERGA ===== */

.wp-content .wp-block-gallery .wp-block-image {
    width: 100% !important;
}

.wp-content .wp-block-gallery .wp-block-image img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
}

.wp-content .wp-block-gallery {
  display: grid;
  gap: 16px;
  margin: 1.5em 0;
}

.wp-content .wp-block-gallery.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.wp-content .wp-block-gallery.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.wp-content .wp-block-gallery.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wp-content .wp-block-gallery.columns-default {
  grid-template-columns: repeat(3, 1fr);
}

.wp-content .wp-block-gallery .wp-block-image {
  margin: 0;
}

.wp-content .wp-block-gallery.is-cropped .wp-block-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.wp-content .wp-block-gallery.is-cropped .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wp-content .wp-block-gallery figcaption,
.wp-content .gallery .gallery-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {
  .wp-content .gallery.gallery-columns-2,
  .wp-content .gallery.gallery-columns-3,
  .wp-content .gallery.gallery-columns-4,
  .wp-content .wp-block-gallery.columns-2,
  .wp-content .wp-block-gallery.columns-3,
  .wp-content .wp-block-gallery.columns-4,
  .wp-content .wp-block-gallery.columns-default {
    grid-template-columns: 1fr;
  }

/* mobile */
@media (max-width: 768px) {
  .wp-content .gallery.gallery-columns-2,
  .wp-content .gallery.gallery-columns-3,
  .wp-content .gallery.gallery-columns-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- TABLE ---------- */

.wp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.wp-content table th,
.wp-content table td {
  border: 1px solid #ddd;
  padding: 8px;
}

.wp-content table th {
  background: #f5f5f5;
  text-align: left;
}

/* ---------- BLOCKQUOTE ---------- */

.wp-content blockquote {
  border-left: 4px solid #ccc;
  padding-left: 1em;
  margin: 1em 0;
  color: #555;
}

/* ---------- EMBED / IFRAME ---------- */

.wp-content iframe {
  max-width: 100%;
}

/* ---------- CAPTION ---------- */

.wp-content .wp-caption {
  max-width: 100%;
}

.wp-content .wp-caption-text {
  font-size: 0.85rem;
  color: #666;
  margin-top: 5px;
}

/* ---------- BUTTONS (jeśli się pojawią) ---------- */

.wp-content .wp-block-button__link {
  display: inline-block;
  padding: 0.6em 1.2em;
  background: #000;
  color: #fff;
  text-decoration: none;
}

/* ---------- CODE ---------- */

.wp-content pre {
  background: #f5f5f5;
  padding: 10px;
  overflow: auto;
}

.wp-content code {
  background: #f0f0f0;
  padding: 2px 4px;
}
