/* -----------------------------
   REAL RENDER GALLERY STYLES — CLEAN & RESPONSIVE
   ----------------------------- */

.rrg-gallery-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

/* SEARCH BAR */
.rrg-search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
  width: 100%;
}

.rrg-search-bar {
  width: 100%;
  max-width: 100%;
  padding: 12px 20px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
}

.rrg-search-bar:focus {
  border-color: #8873c3;
  box-shadow: 0 0 0 2px rgba(136,115,195,0.2);
}

.rrg-search-bar::placeholder {
  color: #6b7280;
}

/* FILTER BUTTONS */
.rrg-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.rrg-filters button {
  background: #8873c3;
  color: #fff;
  border: 1px solid #8873c3;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.rrg-filters button.active,
.rrg-filters button:hover {
  background: #8873c3;
  color: #fff;
}

/* GRID LAYOUT */
.rrg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

/* ITEM CARD */
.rrg-gallery-grid .rrg-item {
  background: #111 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  padding: 0 !important;
  margin: 0 !important;
}

.rrg-gallery-grid .rrg-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}

/* IMAGE */
.rrg-gallery-grid .rrg-item .rrg-image-inner {
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.rrg-gallery-grid .rrg-item .rrg-image-inner img {
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.3s ease;
  margin: 0 !important;
  padding: 0 !important;
}

.rrg-gallery-grid .rrg-item:hover .rrg-image-inner img {
  transform: scale(1.05);
}

/* INFO SECTION */
.rrg-gallery-grid .rrg-item .rrg-info {
  padding: 22px 22px 30px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  background: #8873c3 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
}

.rrg-gallery-grid .rrg-item .rrg-info .rrg-title {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #fff !important;
  line-height: 1.3 !important;
  padding: 0 !important;
}

/* HIDE DESCRIPTION & TAGS */
.rrg-gallery-grid .rrg-item .rrg-info .rrg-description,
.rrg-gallery-grid .rrg-item .rrg-info .rrg-keywords {
  display: none !important;
}

/* -----------------------------
   RESPONSIVE DESIGN
   ----------------------------- */
@media (max-width: 900px) {
  .rrg-gallery-grid .rrg-item .rrg-image-inner img { height: 200px !important; }
  .rrg-gallery-grid .rrg-item .rrg-info { padding: 20px !important; }
}

@media (max-width: 768px) {
  .rrg-gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .rrg-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 15px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .rrg-filters::-webkit-scrollbar {
    height: 4px;
  }

  .rrg-filters::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
  }

  .rrg-filters::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
  }

  .rrg-filters button {
    white-space: nowrap;
    flex-shrink: 0;
    color: #fff !important;
  }

  .rrg-gallery-grid .rrg-item .rrg-image-inner img { height: 180px !important; }
  .rrg-gallery-grid .rrg-item .rrg-info { padding: 18px !important; }

  .rrg-gallery-grid .rrg-item .rrg-info .rrg-title {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 600px) {
  .rrg-gallery-container {
    padding: 0 12px;
    margin: 20px auto;
  }

  .rrg-gallery-grid .rrg-item .rrg-image-inner img { height: 160px !important; }
  .rrg-gallery-grid .rrg-item .rrg-info { padding: 16px !important; }

  .rrg-gallery-grid .rrg-item .rrg-info .rrg-title {
    font-size: 15px !important;
  }

  .rrg-filters {
    gap: 6px;
  }

  .rrg-filters button {
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* -----------------------------
   LIGHTBOX
   ----------------------------- */
#rrg-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 40px 20px;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

.rrg-lightbox-content {
  background: #fff;
  border-radius: 16px;
  max-width: 1200px;
  max-height: 90vh;
  width: 95vw;
  height: auto;
  padding: 0;
  position: relative;
  display: flex;
  box-shadow: 0 25px 80px rgba(0,0,0,0.4);
  overflow: hidden;
}

#rrg-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#rrg-lightbox-close:hover {
  color: #000;
  background: #fff;
  transform: scale(1.1);
}

/* LIGHTBOX IMAGE */
.rrg-lightbox-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  padding: 40px;
  min-height: 500px;
}

#rrg-lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* LIGHTBOX INFO */
.rrg-lightbox-info {
  flex: 0 0 400px;
  padding: 40px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  max-height: 80vh;
}

#rrg-lightbox-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}

.rrg-lightbox-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#rrg-lightbox-caption {
  margin: 0;
  font-size: 16px;
  color: #6b7280;
  line-height: 1.6;
}

.rrg-lightbox-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.rrg-lightbox-keyword {
  background: #f3f4f6;
  color: #374151;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

.rrg-lightbox-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.rrg-lightbox-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}

.rrg-lightbox-download {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  margin-top: auto;
}

.rrg-lightbox-download:hover {
  background: #333;
  transform: translateY(-1px);
}

/* RESPONSIVE LIGHTBOX */
@media (max-width: 968px) {
  .rrg-lightbox-content {
    flex-direction: column;
    max-height: 95vh;
  }

  .rrg-lightbox-image {
    padding: 30px;
    min-height: 300px;
  }

  .rrg-lightbox-info {
    flex: none;
    border-left: none;
    border-top: 1px solid #e5e7eb;
    max-height: 40vh;
  }

  #rrg-lightbox-title {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  #rrg-lightbox {
    padding: 20px 10px;
  }

  .rrg-lightbox-content {
    width: 100vw;
  }

  .rrg-lightbox-image {
    padding: 20px;
  }

  .rrg-lightbox-info {
    padding: 30px 20px;
  }
}
