/* =============================================
   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 ── */
.portfolio-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--light);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(60, 156, 60, 0.15);
}

/* Kép */
.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}

.portfolio-card:hover img {
  transform: scale(1.04);
}

/* Szalag leírás */
.portfolio-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(26, 46, 26, 0.92) 0%, transparent 100%);
  padding: 2rem 1.2rem 1rem;
  transform: translateY(0);
}

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

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

/* Nagyítás ikon */
.portfolio-card::after {
  content: '⊕';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(60, 156, 60, 0.85);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 32px;
  text-align: center;
}

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

/* ── 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;
}

.lightbox-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
}

.lightbox-inner img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
}

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

/* Bezárás gomb */
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

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

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

.lightbox-prev:hover,
.lightbox-next:hover { background: var(--teal-dk); }

/* ── SZŰRŐ GOMBOK ── */
.portfolio-szuro {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.szuro-gomb {
  padding: 0.45rem 1.1rem;
  border-radius: 2rem;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--mid);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.szuro-gomb:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.szuro-gomb.aktiv {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

/* ── 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; }
}
