/* Live gallery app */

html, body {
  height: 100%;
  margin: 0 !important;
  top: 0 !important;
  margin-top: 0 !important;
  /* overflow:inherit; */
}


.gallery-page {
  background-color: #000;
  height: 100vh;

}

.gallery-wrapper {
  width: 100%;
  height: 100vh;
   /*overflow-y: hidden; */
  padding-top: 4rem;
  /* padding-top: 8rem; */
}

.container {
  display: flex;
  height: 100vh;
  position: relative;
  margin-top: 1rem;
}

/* Back Button */
.back-btn {
  position: absolute;
  /* top: -30px; */
  top: -3rem;
  left: 20px;
  background: transparent;
  /*border: 2px solid #fff;*/
  border: none;
  color: #fff;
  font-size: 32px;
  width: 50px;
  height: 50px;
  /*border-radius: 8px;*/
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.site-footer{
    opacity: 0;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Left Panel - Thumbnail Grid */
.thumbnail-grid {
  width: 43%;
  background: #000;
  padding: 20px 40px 40px 40px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-content: start;
  height: 100vh; 
}

.thumbnail {
  height: 160px;
  border: 2px solid #fff;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.thumbnail.active {
  border-color: #fff;
  border-width: 3px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Right Panel - Main Display */
.main-display {
  width: 57%;
  background: linear-gradient(to right, #000 0%, #333 50%, #666 100%);
  position: relative;
  display: flex;
  /*z-index: 50px;*/
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overflow-y: none;
  height: 100vh; 
}

.main-image {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  /* filter: grayscale(100%); */
}

/* Social Icons */
.social-icons {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}

.social-icon {
  width: 40px; 
  height: 40px; 
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}


.share {
    color: #9E1010;
    background: #9E1010;
}

.linkedin{
    background: #0077B5;
}

.facebook{
    background: #1877F2;
}

.linkedin:hover{
    background: #1877F2;
    color: #fff;
}

.facebook:hover{
    background: #1877F2;
    color: #fff;
}

.share:hover{
    background: #9E1010;
    color: #fff;
}
/* Live Button + Plus Button Container */
.btn-live {
  position: absolute;
  bottom: 40px;
  right: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  z-index: 10;
}

/* Live Gallery Button */
.live-btn {
  background: #ff4444;
  color: #fff;
  padding: 14px 28px;
  border-radius: 30px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
  cursor: pointer;
}

.live-btn:hover {
  background: #ff3333;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

.live-btn svg {
  width: 20px;
  height: 20px;
}

/* Plus Button */
.plus-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.plus-btn:hover {
  /* transform: rotate(90deg) scale(1.1); */
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-image {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.modal-close:hover {
  transform: scale(1.2);
}

/* Scrollbar Styling */
.thumbnail-grid::-webkit-scrollbar {
  width: 8px;
}

.thumbnail-grid::-webkit-scrollbar-track {
  background: #000;
}

.thumbnail-grid::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.thumbnail-grid::-webkit-scrollbar-thumb:hover {
  background: #777;
}
/* ============================================
   TABLET - 768px to 1024px
   ============================================ */

@media (max-width: 1024px) {
  .container {
    grid-template-columns: 38% 62%;
  }

  .gallery-wrapper{
    padding-top: 2rem;
  }

  .thumbnail-grid {
    width: 38%;
    padding: 15px 20px 15px 20px;
    gap: 15px;
  }

  .main-display {
    width: 62%;
    padding: 30px;
  }

  .back-btn {
    width: 45px;
    height: 45px;
    font-size: 28px;
    top: 15px;
    left: 15px;
  }

  .social-icons {
    right: 25px;
    gap: 15px;
  }

  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }

  .btn-live {
    bottom: 30px;
    right: 25px;
    gap: 12px;
  }

  .live-btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .plus-btn {
    width: 55px;
    height: 55px;
    font-size: 28px;
  }

  .thumbnail {
    height: 140px;
  }
}

/* ============================================
   MOBILE - Up to 767px
   ============================================ */

@media (max-width: 767px) {
  .container {
    flex-direction: column;
    height: 100vh;
  }
  .gallery-wrapper{
    padding-top: 3rem;
  }

  .social-icon{
    display: none;
  }
  .site-footer{
      opacity: 1;
  }

  /* Thumbnail grid at top - scrollable horizontally */
  .thumbnail-grid {
    width: 100%;
    height: auto;
    max-height: 25vh; 
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px;
    gap: 10px;
    grid-template-columns: none; 
    align-items: center;
  }

  .thumbnail {
    min-width: 100px; 
    width: 100px;
    height: 100px; 
    flex-shrink: 0;
    border-radius: 12px;
  }

  /* Main display takes remaining space */
  .main-display {
    width: 100%;
    height: 75vh; 
    max-height: 75vh;
    padding: 20px;
  }

  /* Back button */
  .back-btn {
    width: 35px;
    height: 35px;
    font-size: 24px;
    top: -30px;
    left: 10px;
    /*border-width: 1.5px;*/
    border: none;
  }

  /* Social icons - moved to right side, smaller */
  .social-icons {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    gap: 12px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* Live button and plus button */
  .btn-live {
    bottom: 70px;
    right: 45px;
    gap: 10px;
  }

  .live-btn {
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 25px;
  }

  .live-btn svg {
    width: 16px;
    height: 16px;
  }

  .plus-btn {
    width: 50px;
    height: 50px;
    font-size: 26px;
  }

  /* Horizontal scrollbar for thumbnails */
  .thumbnail-grid::-webkit-scrollbar {
    height: 6px;
    width: auto;
  }

  .thumbnail-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }

  .thumbnail-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }
}

/* ============================================
   SMALL MOBILE - Up to 480px
   ============================================ */

@media (max-width: 480px) {
  .thumbnail-grid {
    max-height: 20vh;
    padding: 10px;
    gap: 8px;
  }

  .thumbnail {
    min-width: 80px;
    width: 80px;
    height: 80px;
    border-radius: 10px;
  }

  .main-display {
    height: 80vh;
    padding: 15px;
  }

  .back-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
    top: -30px;
    left: 8px;
  }

  .social-icons {
    right: 10px;
    gap: 10px;
  }

  .social-icon {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }

  .btn-live {
    bottom: 15px;
    right: 10px;
    gap: 8px;
    margin-bottom: 15px;
  }

  .live-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .live-btn svg {
    width: 14px;
    height: 14px;
  }

  .plus-btn {
    width: 45px;
    height: 45px;
    font-size: 24px;
  }

  /* Modal adjustments for mobile */
  .modal-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 32px;
  }

  .modal-image {
    max-width: 100%;
    max-height: 100%;
  }
}