/**
 * Home Gallery & Social Strip Styles (تصاویر برکت فود)
 * Streamlined, elegant, and compact layout.
 */

:root {
  --bkg-crimson-deep: #3A0404;
  --bkg-crimson-main: #6B0909;
  --bkg-gold-main: #E5A93C;
  --bkg-gold-light: #FFD166;
  --bkg-gold-pale: #FFE2AD;
  --bkg-text-dark: #220303;
  --bkg-text-muted: #665555;
}

/* 1. Section Container */
.bk-gallery-section {
  position: relative;
  padding: 16px 0 65px;
  background: transparent;
  overflow: hidden;
}

.bk-gallery-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 2. Section Header */
.bk-gallery-header {
  text-align: center;
  margin-bottom: 26px;
}

.bk-gallery-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--bkg-text-dark);
  margin: 0 0 10px;
}

.bk-gallery-line {
  width: 55px;
  height: 3px;
  background: #f39c12;
  border-radius: 3px;
  margin: 0 auto;
}

/* 3. Continuous Food Photo Strip (Infinite Ribbon) */
.bk-gallery-ribbon-wrap {
  margin-bottom: 30px;
  background: #FFFFFF;
  border-radius: 22px;
  border: 1px solid rgba(229, 169, 60, 0.25);
  padding: 16px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.bk-gallery-ribbon-track-outer {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.bk-gallery-ribbon-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: bkRibbonScroll 40s linear infinite;
}

.bk-gallery-ribbon-track:hover {
  animation-play-state: paused;
}

@keyframes bkRibbonScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%); /* Continuous scroll for RTL */
  }
}

.bk-gallery-slide {
  width: 250px;
  height: 185px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #FFFFFF;
  border: 1px solid rgba(229, 169, 60, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.28s ease, border-color 0.28s ease;
  outline: none;
}

.bk-gallery-slide:focus-visible {
  box-shadow: 0 0 0 3px var(--bkg-gold-main);
}

.bk-gallery-slide:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #cc0000;
  box-shadow: 0 10px 24px rgba(204, 0, 0, 0.14);
}

.bk-slide-media {
  position: relative;
  width: 100%;
  height: 100%;
}

.bk-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.bk-gallery-slide:hover .bk-slide-img {
  transform: scale(1.08);
}

.bk-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(20, 2, 2, 0.88) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px 14px;
  box-sizing: border-box;
  opacity: 0.95;
  transition: opacity 0.25s ease;
}

.bk-gallery-slide:hover .bk-slide-overlay {
  opacity: 1;
  background: linear-gradient(180deg, rgba(30, 2, 2, 0.2) 0%, rgba(20, 2, 2, 0.94) 100%);
}

.bk-slide-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 8px;
}

.bk-slide-zoom {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #cc0000;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s ease;
}

.bk-slide-zoom svg {
  width: 14px;
  height: 14px;
}

.bk-gallery-slide:hover .bk-slide-zoom {
  opacity: 1;
  transform: scale(1);
}

/* 4. Clean, Natural Social Follow Strip */
.bk-gallery-social-bar {
  background: #FFFFFF;
  border: 1px solid rgba(229, 169, 60, 0.28);
  border-radius: 20px;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.bk-social-text {
  flex: 1;
}

.bk-social-title {
  font-size: 16px;
  font-weight: 700;
  color: #220303;
  margin: 0;
}

.bk-social-handle {
  flex-shrink: 0;
}

.bk-handle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(204, 0, 0, 0.04);
  border: 1px solid rgba(204, 0, 0, 0.22);
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.bk-handle-pill:hover {
  background: rgba(204, 0, 0, 0.08);
  border-color: #cc0000;
  transform: translateY(-2px);
}

.bk-handle-at {
  font-size: 15px;
  font-weight: 800;
  color: var(--bkg-gold-main);
}

.bk-handle-text {
  font-size: 14px;
  font-weight: 800;
  color: #cc0000;
}

.bk-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bk-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #cc0000;
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(204, 0, 0, 0.22);
}

.bk-social-btn:hover {
  background: var(--bkg-gold-main);
  color: #FFFFFF;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 14px rgba(229, 169, 60, 0.35);
}

/* 5. Lightweight Vanilla Lightbox Modal */
.bk-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bk-gallery-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.bk-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 1, 1, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bk-lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 820px;
  width: 100%;
  background: #180202;
  border: 1px solid rgba(229, 169, 60, 0.4);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bk-gallery-lightbox.is-open .bk-lightbox-dialog {
  transform: scale(1);
}

.bk-lightbox-close {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bk-lightbox-close:hover {
  background: var(--bkg-crimson-main);
  border-color: var(--bkg-gold-main);
  transform: rotate(90deg);
}

.bk-lightbox-close svg {
  width: 18px;
  height: 18px;
}

.bk-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(30, 2, 2, 0.75);
  border: 1.5px solid rgba(229, 169, 60, 0.4);
  color: var(--bkg-gold-pale);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.bk-lightbox-nav:hover {
  background: var(--bkg-gold-main);
  color: #2b0202;
  border-color: #FFFFFF;
  transform: translateY(-50%) scale(1.1);
}

.bk-lightbox-nav svg {
  width: 20px;
  height: 20px;
}

.bk-lightbox-prev {
  right: 14px;
}

.bk-lightbox-next {
  left: 14px;
}

.bk-lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.bk-lightbox-img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #000000;
  display: block;
}

.bk-lightbox-caption {
  padding: 14px 22px;
  background: rgba(30, 2, 2, 0.95);
  border-top: 1px solid rgba(229, 169, 60, 0.2);
  text-align: right;
}

.bk-lightbox-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

/* 6. Responsive Breakpoints */
@media (max-width: 768px) {
  .bk-gallery-section {
    padding: 12px 0 50px;
  }

  .bk-gallery-title {
    font-size: 22px;
  }

  .bk-gallery-slide {
    width: 200px;
    height: 155px;
  }

  .bk-gallery-social-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 16px;
    gap: 14px;
  }

  .bk-social-text {
    text-align: center;
  }

  .bk-social-title {
    font-size: 15px;
  }

  .bk-lightbox-nav {
    display: none;
  }
}
