/* Live gallery app */

html, body {
  height: 100%;
  margin: 0 !important;
  top: 0 !important;
  margin-top: 0 !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.gallery-page {
  background-color: #000;
  height: 100vh;
  overflow: hidden;
}

.gallery-wrapper {
  width: 100%;
  height: 100vh;
  position: relative;
}

.container {
  display: flex;
  height: 100vh;
  position: relative;
}

/* Back Button */
.back-btn {
  position: sticky;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: background 0.3s, transform 0.3s;
  grid-column: 1 / -1;
  justify-self: start;
}

.site-footer{
    opacity: 0;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

/* Left Panel - Thumbnail Grid */
.thumbnail-grid {
  position: relative;
  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: 100%;
}

.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;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;
}

.main-image {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

/* 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 {
  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%;
    height: 100vh;
  }

  .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: 24px;
    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;
  }

  .social-icon{
    display: none;
  }
  .site-footer{
      opacity: 1;
  }

  .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 {
    width: 100%;
    height: 75vh; 
    max-height: 75vh;
    padding: 20px;
  }

  .back-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 10px;
    left: 10px;
  }

  .social-icons {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    gap: 12px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .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;
  }

  .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: 36px;
    height: 36px;
    font-size: 18px;
    top: 8px;
    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-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 32px;
  }

  .modal-image {
    max-width: 100%;
    max-height: 100%;
  }
}

/* =========================================================
   LARGE SCREENS & ULTRA-WIDE FIX (Proportional Thumbnails)
   ========================================================= */
@media (min-width: 1400px) {
  .thumbnail {
    height: 210px;
  }
}

@media (min-width: 1600px) {
  .thumbnail {
    height: 240px;
  }
}

@media (min-width: 1920px) {
  .thumbnail {
    height: 290px;
  }
}

/* 27-Inch & 32-Inch Monitors */
@media (min-width: 2560px) {
  .thumbnail {
    height: 390px;
    border-radius: 26px;
  }
  .thumbnail-grid {
    gap: 30px;
    padding: 30px 50px 50px 50px;
  }
}

/* 4K Ultra-Wide Monitors */
@media (min-width: 3840px) {
  .thumbnail {
    height: 580px;
    border-radius: 36px;
  }
  .thumbnail-grid {
    gap: 40px;
    padding: 40px 60px 60px 60px;
  }
}