/* Realizacje */
.portfolio-section {
  padding: 50px 20px;
}

.portfolio-section h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 2.5rem;
}

.portfolio-section .section-desc {
  text-align: center;
  color: #7f8c8d;
  max-width: 700px;
  margin: 0 auto 40px auto;
  font-size: 1.1rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.portfolio-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #eef2f3;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;

  /* DODAJ TE 3 LINIE: */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Spycha białą sekcję tekstową na sam dół */
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
  width: 100%;
  height: 400px; /* Przypisuje STAŁĄ wysokość dla wszystkich kafelków */
  overflow: hidden;
  background: #eceff1;
  flex-shrink: 0; /* Zapobiega ściskaniu kontenera zdjęcia */
}

.portfolio-img img,
.portfolio-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* Wymusza kadrowanie zawsze od samego ŚRODKA */
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-img.video-item a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

/* Trójkąt "Play" wewnątrz koła */
.play-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #f39c12; /* Pomarańczowy kolor (dopasowany do akcentów) */
}

.portfolio-info {
  padding: 20px;
  flex-grow: 1; /* Wypełnia pozostałą przestrzeń */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.portfolio-info h3 {
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  color: #2c3e50;
  border-bottom: 2px solid #f39c12;
  padding-bottom: 5px;
  display: inline-block;
}

.portfolio-info p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.portfolio-footer {
  text-align: center;
  font-style: italic;
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-top: 30px;
  padding: 20px;
  border-top: 1px dashed #bdc3c7;
}

.hidden-photo {
  display: none;
}

.portfolio-img.gallery-item a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

/* Okrągły przycisk LUPY wyśrodkowany na zdjęciu (styl identyczny z play-button) */
.zoom-icon,
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65px;
  height: 65px;
  background-color: rgba(44, 62, 80, 0.8); /* Ciemne półprzezroczyste tło */
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 15px rgba(243, 156, 18, 0.6),
    0 4px 15px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
  pointer-events: none; /* Kliknięcie przechodzi do linku <a> */
  z-index: 2;
}

/* Rysowanie kółka Lupy (pomarańczowy obrys #f39c12) */
.zoom-icon::before {
  content: "";
  position: absolute;
  top: 44%;
  left: 44%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border: 3.5px solid #f39c12; /* Pomarańczowy akcent dopasowany do trójkąta w play */
  border-radius: 50%;
}

/* Rysowanie rączki Lupy (pomarańczowa kreska #f39c12) */
.zoom-icon::after {
  content: "";
  position: absolute;
  top: 64%;
  left: 64%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 4px;
  height: 10px;
  background-color: #f39c12; /* Pomarańczowy akcent */
  border-radius: 2px;
}

/* Efekt rozświetlenia i powiększenia po najechaniu myszką (identyczny jak w play-button) */
.portfolio-item:hover .zoom-icon,
.portfolio-item:hover .play-button {
  transform: translate(-50%, -50%) scale(1.15);
  background-color: rgba(44, 62, 80, 0.95);
  box-shadow:
    0 0 25px rgba(243, 156, 18, 0.9),
    0 6px 20px rgba(0, 0, 0, 0.5);
}
