/* Qalereya — yalnız #gallery (maliyyə hesabatı stilinə yaxın, scoped) */

#gallery {
  background: linear-gradient(180deg, #f4f8fb 0%, #fff 50%);
  padding-bottom: 80px;
}

#gallery > h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  color: #0e3f61;
  margin-bottom: 48px !important;
}

#gallery > h2 .addbtn {
  vertical-align: middle;
  margin-left: 10px;
}

#gallery .gallery-category {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 5%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#gallery .gallery-category li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px !important;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(14, 63, 97, 0.12);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

#gallery .gallery-cat-label {
  white-space: nowrap;
  line-height: 1.2;
}

#gallery .gallery-category li::after {
  display: none !important;
}

#gallery .gallery-category li:hover {
  border-color: #187a97;
  transform: translateY(-1px);
}

#gallery .gallery-category li.active {
  background: #0e3f61;
  color: #fff;
  border-color: #0e3f61;
}

#gallery .gallery-cat-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: static;
}

#gallery .gallery-cat-admin a,
#gallery .gallery-cat-admin span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 !important;
  border-radius: 8px;
  background: #f0f2f6;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
}

#gallery .gallery-cat-admin a i {
  color: #4186d6;
  font-size: 12px;
}

#gallery .gallery-cat-admin.category-icon span i {
  color: #f37662;
}

#gallery .gallery-category li.active .gallery-cat-admin a,
#gallery .gallery-category li.active .gallery-cat-admin span {
  background: rgba(255, 255, 255, 0.2);
}

#gallery .gallery-category li.active .gallery-cat-admin a i {
  color: #fff;
}

#gallery .gallery-category li.active .gallery-cat-admin.category-icon span i {
  color: #ffc9c0;
}

#gallery .photos {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5% !important;
}

#gallery .photos .item-photo,
#gallery .photos .gallery-card {
  position: relative;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 28px rgba(14, 63, 97, 0.08);
  border: 1px solid rgba(14, 63, 97, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#gallery .photos .gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(14, 63, 97, 0.14);
}

#gallery .gallery-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

#gallery .gallery-card__media {
  position: relative;
  overflow: hidden;
}

#gallery .gallery-card__media img {
  display: block;
  width: 100% !important;
  height: 260px !important;
  object-fit: cover;
  border-radius: 0 !important;
  transition: transform 0.5s ease;
}

#gallery .gallery-card:hover .gallery-card__media img {
  transform: scale(1.04);
}

#gallery .gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 63, 97, 0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 48px;
  pointer-events: none;
}

#gallery .gallery-card:hover .gallery-card__overlay {
  opacity: 1;
}

#gallery .gallery-card__overlay span {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#gallery .gallery-card__caption {
  padding: 16px 18px;
  background: #fff;
}

#gallery .gallery-card__caption-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 16px;
  font-weight: 600;
  color: #0e3f61;
  line-height: 1.35;
  height: calc(1.35em * 3);
}

/* Köhnə overlay — gizlət */
#gallery .Imgmiddle {
  display: none !important;
}

#gallery .item-photo-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  pointer-events: auto;
}

#gallery .item-photo-icon span i {
  margin: 0 !important;
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#getGallery {
  margin-top: 40px !important;
  padding: 16px 36px !important;
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 15px;
  background: #0e3f61 !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

#getGallery:hover {
  background: #187a97 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 63, 97, 0.2);
}

@media (max-width: 1024px) {
  #gallery .photos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #gallery .photos {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #gallery .gallery-card__media img {
    height: 220px !important;
  }

  #gallery .gallery-category li {
    font-size: 13px !important;
    padding: 8px 16px;
  }
}
