/* Gestionale Immobili - Frontend */

.gi-frontend { margin: 20px 0; }

.gi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.gi-card {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.gi-card__thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display:block;
}

.gi-card__body {
  padding: 14px;
}

.gi-card__meta {
  font-size: 12px;
  opacity: .7;
}

.gi-card__title { margin: 8px 0; font-size: 18px; }
.gi-card__price { font-weight: 700; }

.gi-front-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  align-items: start;
  margin: 18px 0;
}

.gi-front-hero__media img { border-radius: 14px; }

.gi-front-code { font-size: 13px; opacity: .7; }
.gi-front-title { margin: 6px 0 0; }
.gi-front-price { font-size: 22px; font-weight: 800; margin-top: 10px; }
.gi-front-meta span { display: inline-block; margin-right: 10px; opacity: .7; }

.gi-front-section { margin: 26px 0; }
.gi-front-table { width: 100%; border-collapse: collapse; }
.gi-front-table th, .gi-front-table td { padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.1); text-align: left; }

.gi-front-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.gi-front-gallery__link { display: block; text-decoration: none; }
.gi-front-gallery__item img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
  transition: transform .12s ease;
}
.gi-front-gallery__link:hover img { transform: scale(1.01); }

/* Lightbox */
body.gi-lightbox-open { overflow: hidden; }

.gi-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}
.gi-lightbox.is-open { display: block; }

.gi-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
}

.gi-lightbox__dialog {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.gi-lightbox__stage {
  max-width: 94vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gi-lightbox__img {
  max-width: 94vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  background: rgba(255,255,255,.04);
}

.gi-lightbox__meta {
  width: min(94vw, 980px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: rgba(255,255,255,.92);
  font-size: 14px;
}

.gi-lightbox__caption { opacity: .92; }
.gi-lightbox__counter { opacity: .75; white-space: nowrap; }

.gi-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.95);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
}

.gi-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.95);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 34px;
  line-height: 42px;
  cursor: pointer;
}
.gi-lightbox__nav--prev { left: 14px; }
.gi-lightbox__nav--next { right: 14px; }

.gi-lightbox__nav:focus,
.gi-lightbox__close:focus {
  outline: 2px solid rgba(255,255,255,.8);
  outline-offset: 2px;
}

.gi-immobili-filters__row {
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.gi-immobili-filters__row select,
.gi-immobili-filters__row button {
  padding: 8px 10px;
}

@media (max-width: 900px) {
  .gi-front-hero { grid-template-columns: 1fr; }
}


/* Video YouTube responsive */
.gi-front-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
}
.gi-front-video iframe,
.gi-front-video embed,
.gi-front-video object {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
