/* --- baza site --- */
body {
  margin: 0;
  font-family: Arial, sans-serif;
}

header {
  padding: 1rem 2rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo { font-weight: bold; font-size: 20px; }

nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
nav a { text-decoration: none; color: #333; font-weight: 500; }
nav a:hover { text-decoration: underline; }

.hero { background: #eee; text-align: center; padding: 4rem 2rem; }
.content { padding: 2rem; max-width: 1000px; margin: auto; }

/* --- galerie --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}

.item { position: relative; overflow: hidden; border-radius: 6px; }

.grid img {
  width: 100%;
  display: block;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.item:hover img { transform: scale(1.05); }

/* overlay gri + text centrat */
.overlay {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background-color: rgba(50,50,50,0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.overlay-text { color: #fff; font-size: 16px; line-height: 1.2; }

.item:hover .overlay { opacity: 1; }

/* --- lightbox corectat --- */
.lightbox {
  display: none;            /* ascuns implicit */
  position: fixed;
  inset: 0;                 /* ocupă tot ecranul */
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* când are clasa active, devine vizibil */
.lightbox.active {
  display: flex !important;
}

/* conținut lightbox */
.lightbox-content { text-align: center; max-width: 95%; }

.lightbox-img {
  max-width: 90%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-caption {
  color: #fff;
  margin-top: 10px;
  font-size: 16px;
  padding: 0 12px;
}

/* butoane */
.close, .prev, .next {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  padding: 8px;
}

.close { position: absolute; top: 18px; right: 28px; }
.prev { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); }
.next { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }

.close:focus, .prev:focus, .next:focus { outline: 2px solid #fff; }

/* --- contact & footer --- */
.contact-section {
  padding: 2rem;
  background: #f5f5f5;
  text-align: center;
  border-top: 1px solid #ddd;
}

.contact-section a { color: #333; text-decoration: none; }
.contact-section a:hover { text-decoration: underline; }

footer { text-align: center; padding: 1rem; background: #222; color: white; margin-top: 2rem; }

/* --- responsive tweaks --- */
@media (max-width: 600px) {
  .overlay-text { font-size: 14px; }
  .close, .prev, .next { font-size: 30px; }
}
