/* =============================================
   RD-KLÍMA — Portfolio szekció
   portfolio.css — önálló modul
   ============================================= */

/* ── SZEKCIÓ ── */
#portfolio {
  background: var(--white);
  padding: 90px 8%;
}

/* ── GRID — 3 oszlop ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
}

/* ── KÁRTYA belépő animáció ── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ── KÁRTYA ── */
.portfolio-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--off-white);
  animation: cardIn 0.5s ease both;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(60, 156, 60, 0.18);
}

/* ── KÉP ── */
.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: brightness(0.95);
}

/* Hover: zoom + blur */
.portfolio-card:hover img {
  transform: scale(1.08);
  filter: brightness(0.55) blur(2px);
}

/* ── HOVER OVERLAY — zöld tinted réteg ── */
.portfolio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(60, 156, 60, 0.5) 0%,
    rgba(26, 46, 26, 0.72) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.portfolio-card:hover::before { opacity: 1; }

/* ── ZOOM IKON — középen jelenik meg ── */
.portfolio-zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 3;
  pointer-events: none;
}

.portfolio-card:hover .portfolio-zoom-icon {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* ── SZALAG LEÍRÁS ── */
.portfolio-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top,
    rgba(26, 46, 26, 0.95) 0%,
    rgba(26, 46, 26, 0.6) 60%,
    transparent 100%);
  padding: 2.5rem 1.2rem 1rem;
  transform: translateY(4px);
  transition: transform 0.35s ease;
  z-index: 2;
}

.portfolio-card:hover .portfolio-caption { transform: translateY(0); }

.portfolio-caption h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.portfolio-caption p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  font-weight: 300;
  line-height: 1.4;
}

/* ── PLACEHOLDER (ha még nincs kép) ── */
.portfolio-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--off-white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  gap: 1rem;
}

.portfolio-placeholder-icon {
  width: 52px;
  height: 52px;
  color: var(--teal);
  opacity: 0.5;
}

.portfolio-placeholder p {
  color: var(--mid);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.6;
}

/* ── LIGHTBOX ── */
.portfolio-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.portfolio-lightbox.open { display: flex; animation: lbIn 0.25s ease; }

@keyframes lbIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  animation: lbUp 0.3s ease;
}

@keyframes lbUp {
  from { transform: translateY(20px); opacity: 0.5; }
  to   { transform: none; opacity: 1; }
}

.lightbox-inner img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  text-align: center;
  margin-top: 1rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.lightbox-close:hover { opacity: 1; transform: rotate(90deg); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(60,156,60,0.85);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev { left: -64px; }
.lightbox-next { right: -64px; }

.lightbox-prev:hover { background: var(--teal-dk); transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { background: var(--teal-dk); transform: translateY(-50%) scale(1.1); }

/* ── RESZPONZÍV ── */
@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev { left: -44px; }
  .lightbox-next { right: -44px; }
}

@media (max-width: 600px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .lightbox-prev,
  .lightbox-next { display: none; }
}
