/* ==============================
   BLOG CONTAINER
================================ */
.blog-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==============================
   BLOG GRID
================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

/* ==============================
   BLOG TILE
================================ */
.blog-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 24px;
  overflow: hidden;
  position: relative;

  opacity: 0;
  animation: blogFadeUp 0.6s ease forwards;
}

/* ==============================
   IMAGE CONTAINER (FIXED SIZE)
================================ */
.blog-tile-image {
  position: relative;
  width: 100%;
  height: 350px;              /* 🔥 STAŁA WYSOKOŚĆ */
  overflow: hidden;
  border-radius: 24px;
  background: #111;

  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* OBRAZ ZAWSZE WYPEŁNIA KONTENER */
.blog-tile-image img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;          /* 🔥 KLUCZ */
  object-position: center;

  transition: transform 0.6s ease;
  display: block;
}

/* fallback gradient */
.blog-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1e1e, #2c2c2c);
}

/* ==============================
   PREMIUM HOVER
================================ */
.blog-tile:hover .blog-tile-image {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}

.blog-tile:hover img {
  transform: scale(1.08);
}

/* ==============================
   OVERLAY
================================ */
.blog-tile-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85),
    rgba(0,0,0,0.4),
    transparent 60%
  );

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;

  color: #fff;
}

.blog-tile-overlay h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.blog-tile-overlay p {
  font-size: 14px;
  margin-top: 8px;
  opacity: 0.85;
}

/* ==============================
   CATEGORY FILTER
================================ */
.blog-categories {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.blog-categories a {
  padding: 10px 22px;
  border-radius: 40px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  background: #f3f3f3;
  color: #333;
  transition: 0.3s ease;
}

.blog-categories a:hover {
  background: #111;
  color: #fff;
}

.blog-categories a.active {
  background: #111;
  color: #fff;
}

/* ==============================
   ANIMATION
================================ */
@keyframes blogFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-tile:nth-child(1) { animation-delay: 0.05s; }
.blog-tile:nth-child(2) { animation-delay: 0.1s; }
.blog-tile:nth-child(3) { animation-delay: 0.15s; }
.blog-tile:nth-child(4) { animation-delay: 0.2s; }
.blog-tile:nth-child(5) { animation-delay: 0.25s; }
.blog-tile:nth-child(6) { animation-delay: 0.3s; }

/* ==============================
   MOBILE
================================ */
@media (max-width: 768px) {
  .blog-grid {
    gap: 24px;
  }

  .blog-tile-image {
    height: 280px;
  }
}

/* ==============================
   BLOG POST CONTENT IMAGES
================================ */
.blog-image-block {
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: 20px;
  margin: 50px 0;
  position: relative;
}

.blog-image-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ==============================
   BLOG SEARCH (PREMIUM)
================================ */

.blog-search-section{
margin-top:40px;
margin-bottom:10px;
}

.blog-search{
display:flex;
justify-content:center;
}

.blog-search form{
position:relative;
width:420px;
max-width:90%;
}

/* INPUT */

.blog-search input{
width:100%;
padding:14px 20px;

border-radius:40px;
border:1px solid #e5e7eb;

font-size:15px;
font-family:inherit;

background:#f3f3f3;
color:#111;

transition:all .25s ease;
}

.blog-search input::placeholder{
color:#888;
}

.blog-search input:focus{
outline:none;
background:#fff;
border-color:#111;
box-shadow:0 5px 18px rgba(0,0,0,0.08);
}

/* BUTTON */

.blog-search button{
position:absolute;
right:6px;
top:50%;
transform:translateY(-50%);

padding:8px 18px;

border-radius:999px;
border:none;

font-size:13px;
font-weight:600;

background:#111;
color:#fff;

cursor:pointer;

transition:all .25s ease;
}

.blog-search button:hover{
transform:translateY(-50%) translateY(-1px);
background:#000;
}