/* Heads up, this css file is disgusting and I used AI too much because I was burnt out lol */

.main > div {
    width: 85%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main div .lease-info {
    align-items: flex-start;
}

/* ================================================== */
/* HORSE GRID (Modern + Interactive)                   */
/* ================================================== */

.horse-grid {
  width: 100%;
  margin-top: 18px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 50px;
}

.horse-card {
  position: relative;
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;

  border-radius: 18px;
  overflow: hidden;

  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.10);
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.horse-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;

  transform: scale(1);
  transition: transform 0.35s ease;
}

.horse-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.horse-card:hover img {
  transform: scale(1.05);
}

.horse-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.0));
  opacity: 0;
  transition: opacity 0.25s ease;
  width: 100%;
  height: 100%;
}

.horse-card:hover .horse-overlay {
  opacity: 1;
}

.horse-view {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-weight: 900;
  font-size: 0.9rem;
}

.lightbox-close {
  z-index: 10000;
}

.lightbox-img {
  position: relative;
  z-index: 9999;
}

/* ================================================== */
/* LIGHTBOX (Hidden by default)                        */
/* ================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);

  display: none; /* THIS IS THE KEY */
  align-items: center;
  justify-content: center;

  padding: 20px;
  z-index: 9999;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: min(1000px, 95vw);
  max-height: 85vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  position: relative;
  z-index: 9999;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;

  width: 44px;
  height: 44px;
  border-radius: 999px;

  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;

  font-size: 26px;
  font-weight: 900;
  cursor: pointer;

  z-index: 10000;
}

/* FORCE lightbox hidden unless explicitly opened */
div#horseLightbox.lightbox {
  display: none !important;
}

div#horseLightbox.lightbox.is-open {
  display: flex !important;
}



/* Responsive */
@media (max-width: 1100px) {
  .horse-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .horse-card img {
    height: 220px;
  }
}

@media (max-width: 650px) {
  .horse-grid {
    grid-template-columns: 1fr;
  }

  .horse-card img {
    height: 240px;
  }
}


/* Mobile */
@media (max-width: 1000px) {
    .main div {
        width: 90%;
    }
}