
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #fff;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

.gallery {
  column-count: 3;
  column-gap: 8px;
}

@media(max-width:1200px){ .gallery { column-count: 3; } }
@media(max-width:800px){ .gallery { column-count: 2; } }
@media(max-width:550px){ .gallery { column-count: 1; } }

.item {
  break-inside: avoid;
  margin-bottom: 8px;
  cursor: pointer;
  /*border: 1px solid;
  border-radius: 20px;
  padding: 5px;*/
}

.card {
  overflow: hidden;
  /*border-radius: 20px;*/
  background: var(--card);
  transition: .35s;
  position: relative;
}

.card:hover {
  /*transform: translateY(-6px);*/
}

.card img {
  width: 100%;
  display: block;
  transition: .5s;
}

.card:hover img {
  /*transform: scale(1.08);*/
}

.info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    opacity: 0;
    transition: 0.3s;
    background: rgb(0 0 0 / 67%);
}

.card:hover .info {
    opacity: 1;
}

.info h2 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 6px;
}

.info p {
  color: #fff;
  font-size: 18px;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 99999;
  display: none;
  flex-direction: column;
  margin: 0!important;
}

.lightbox.active {
  display: flex;
}

.viewer {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* SWIPER OVERRIDES TO MATCH DESIGN */
.swiper {
  width: 72%;
  height: 100%;
  background: #fafafa;
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.swiper-slide img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  cursor: grab;
  user-select: none;
}

.swiper-button-prev, .swiper-button-next {
  /* Hide default Swiper arrows, we use custom ones or keep them styled */
  /* For this design, we will keep custom HTML buttons for consistency */
  display: none; 
}

/* FIXED BUTTON STYLES */
.btn {
    position: absolute;
    top: 15px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #000!important;
    border: none;
    background: white!important;
    box-shadow: 0 8px 25px rgb(0 0 0 / 7%);
    cursor: pointer;
    font-size: 20px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    padding: 0;
}

.btn:hover {
    transform: scale(1.05);
    background: #f9fafb;
}

/* Lightbox Controls */
.close { right: 15px; }
.fullscreen { right: 70px; font-size: 18px; }

/* Custom Nav Buttons mapped to Swiper */
.prev { left: 15px; top: 45%; }
.next { right: 15px; top: 45%; }

/* Fullscreen Close Button (Hidden by default) */
.close-fullscreen {
  top: 20px;
  right: 20px;
  display: none;
  background: rgba(0,0,0,0.5);
  color: white;
  opacity: 0.8;
  z-index: 100;
  position: absolute;
}

.close-fullscreen:hover {
  background: rgba(0,0,0,0.8);
  opacity: 1;
}

/* Show close button only when slide is in fullscreen */
.swiper-slide:fullscreen .close-fullscreen,
.swiper-slide:-webkit-full-screen .close-fullscreen {
  display: flex;
}

.details {
  width: 28%;
  border-left: 1px solid var(--border);
  padding: 50px;
  overflow-y: auto;
  background: #fff;
}

.counter {
  display: inline-block;
  background: #f3f4f6;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 25px;
}

.title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 18px;
}

.desc {
  color: var(--muted);
}

@media (max-width: 767.98px) { 
    .container {
      padding: 60px 20px;
    }
    
    .prev { 
        display:none;
    }
    .next  { 
        display:none;
    }
    
    .counter {
        margin-bottom: 10px;
    }
    .title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .desc {
        font-size: 16px;
    }
}
/* responsive */
@media(max-width:950px){
  .viewer { flex-direction: column; }
  .swiper { width: 100%; min-height: 60vh; }
  .details {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 25px;
    min-height: 25vh;
  }
  .fullscreen { right: 70px; }
}