body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f8fdfc;
  color: #333;
}

header {
  background: linear-gradient(135deg, #7fd1c9, #a8e6cf); /* seafoam + mint */
  color: #fff;
  padding: 2rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

nav {
  background-color: #6ec6b9;
  padding: 1rem;
  text-align: center;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 2rem;
}

.gallery img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.section {
  margin-bottom: 3rem;
}

.section h2 {
  color: #4a8f85;
  border-bottom: 2px solid #a8e6cf;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.ownerrez-widget {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #a8e6cf;
  border-radius: 8px;
  background-color: #f0fdfa;
}

footer {
  background-color: #6ec6b9;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}



/* Photo gallery + lightbox (replace previous gallery/lightbox CSS) */

/* --- Collage: hero-left (80%) with two stacked right items (20%) --- */
.gallery-collage {
  display: grid;
  grid-template-columns: 4fr 1fr; /* ~80% / 20% */
  gap: 2px;                       /* tightened to sit essentially flush */
  align-items: stretch;
  margin-bottom: 1rem;
  height: 320px;                  /* adjust lower for less vertical space */
  padding: 0;
  box-sizing: border-box;
}

/* Hide any items after the first 3 in the collage view (keeps them for lightbox) */
.gallery-collage .hidden-item { display: none; }

/* Basic item styling */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  cursor: pointer;
  background: #f0fdfa;
  border: 1px solid #d9efe8;
  height: 100%;
  display: flex;
  align-items: stretch;
  margin: 0; /* ensure no extra margins cause spacing */
}

/* Hero (first item) spans left column */
.gallery-collage > .gallery-item:nth-child(1) {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

/* Right column stacked items */
.gallery-collage > .gallery-item:nth-child(2) {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.gallery-collage > .gallery-item:nth-child(3) {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

/* Ensure right items align flush with hero (no extra margins or padding) */
.gallery-collage > .gallery-item:nth-child(2),
.gallery-collage > .gallery-item:nth-child(3) {
  margin: 0;
  padding: 0;
}

/* Images */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.03); }

/* Caption overlay */
.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 60%);
  transform: translateY(40%);
  opacity: 0;
  transition: all 0.18s ease;
}
.gallery-item:hover figcaption { transform: translateY(0); opacity: 1; }

/* +N overlay style for the third item when extra images exist */
.more-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  background: rgba(0,0,0,0.40);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.gallery-item:hover .more-overlay { opacity: 1; }
.more-overlay.visible { opacity: 1; pointer-events: auto; }

/* View all button container (centered) with top padding */
.gallery-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 18px; /* added padding above the button */
  padding-top: 8px;
}
.btn-primary {
  background: linear-gradient(90deg,#7fd1c9,#6ec6b9);
  color: #fff;
  border: none;
  padding: 9px 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12,18,18,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.lightbox.open { display: flex; }

/* Lightbox content uses a 3-column layout: left control, image, right control */
.lightbox-content {
  position: relative;
  width: min(1100px, 96%);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.4);
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 12px;
  align-items: center;
}

/* Control wrappers (centers prev/next vertically) */
.lightbox-control {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Image area */
.lightbox-figure {
  margin: 0;
  text-align: center;
  overflow: hidden;
  width: 100%;
}
#lightbox-image {
  max-height: 75vh;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fdfc;
  display: block;
}
#lightbox-caption {
  margin-top: 8px;
  color: #2f6e66;
  font-size: 0.95rem;
  background: #f0fdfa;
  border: 1px solid #e1f3ef;
  padding: 8px;
  border-radius: 8px;
  display: inline-block;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #7fd1c9;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Prev/Next */
.lightbox-prev, .lightbox-next {
  background: linear-gradient(90deg,#7fd1c9,#6ec6b9);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .gallery-collage {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    height: auto;
  }
  .gallery-collage > .gallery-item:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    height: 220px;
  }
  .gallery-collage > .gallery-item:nth-child(2),
  .gallery-collage > .gallery-item:nth-child(3) {
    grid-column: span 1;
    grid-row: auto;
    height: 180px;
  }
  .more-overlay { font-size: 1rem; }
  #lightbox-image { max-height: 60vh; }
}

@media (max-width: 520px) {
  .gallery-collage {
    grid-template-columns: 1fr;
    height: auto;
  }
  .gallery-collage > .gallery-item { height: 200px; }
  .more-overlay { font-size: 0.95rem; }
  .lightbox-content { grid-template-columns: 1fr; padding: 10px; }
  .lightbox-prev, .lightbox-next { display: none; }
  #lightbox-image { max-height: 55vh; }
}