/* Gallery Section Styles */
.gallery-section-3 {
  margin: 0 30px;
}

@media (max-width: 1399px) {
  .gallery-section-3 {
    margin: 0 25px;
  }
}

@media (max-width: 1199px) {
  .gallery-section-3 {
    margin: 0 20px;
  }
}

@media (max-width: 470px) {
  .gallery-section-3 {
    margin: 0 16px;
  }
}

.gallery-section-3.gallery-inner {
  margin-top: -15px;
}

.gallery-thumb-3 {
  margin-top: 30px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.gallery-thumb-3::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  content: "";
  background: rgba(243, 159, 95, 0.8);
  border-radius: 10px;
  z-index: 11;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease-in-out;
}

.gallery-thumb-3 img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  -webkit-transition: all 500ms ease;
  transition: all 500ms ease;
}

.gallery-thumb-3 img:first-child {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  -webkit-transform: translateX(50%) scaleX(2);
  transform: translate(50%) scaleX(2);
  opacity: 0;
  -webkit-filter: blur(10px);
  filter: blur(10px);
}

.gallery-thumb-3 .icon {
  color: var(--theme);
  display: inline-block;
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  display: inline-block;
  transition: all 0.4s ease-in-out;
  opacity: 0;
  text-align: center;
  visibility: hidden;
  color: var(--white);
  z-index: 99;
  font-size: 36px;
}

.gallery-thumb-3:hover::before {
  opacity: 1;
  visibility: visible;
}

.gallery-thumb-3:hover img:first-child {
  -webkit-transform: translateX(0) scaleX(1);
  transform: translate(0) scaleX(1);
  opacity: 1;
  -webkit-filter: blur(0);
  filter: blur(0);
}

.gallery-thumb-3:hover img:nth-child(2) {
  -webkit-transform: translateX(-50%) scaleX(2);
  transform: translateX(-50%) scaleX(2);
  opacity: 0;
  -webkit-filter: blur(10px);
  filter: blur(10px);
}

.gallery-thumb-3:hover .icon {
  opacity: 1;
  visibility: visible;
}

/* ── Our Gallery Section ── */
.our-gallery-section {
    background: #ffffff;
    padding: 100px 0;
}

.our-gallery-section .section-title {
    display: block !important;
    float: none !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 0;
}

.our-gallery-section .sec-sub {
    color: #e63946 !important;
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    font-family: Georgia, serif;
    text-transform: none;
    letter-spacing: 0;
    display: block;
    margin-bottom: 12px;
}

.our-gallery-section .tx-title {
    color: #1a1a2e !important;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0;
}

/* ── Gallery Thumb Card ── */
.gallery-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    line-height: 0;
    display: block;
}

img.cover-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
    border-radius: 12px;
}

.gallery-thumb:hover img.cover-img {
    transform: scale(1.07);
}

/* Overlay link */
.gallery-thumb__link-two {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.35s ease;
    border-radius: 12px;
}

.gallery-thumb:hover .gallery-thumb__link-two {
    background: rgba(0, 0, 0, 0.40);
}

/* White circle + icon */
.gallery-plus-icon {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F39F5F;
    font-size: 22px;
    opacity: 0;
    transform: scale(0.65);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-thumb:hover .gallery-plus-icon {
    opacity: 1;
    transform: scale(1);
}

/* ── Gallery Zoom Popup ── */
@keyframes gpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gallery-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
}

.gallery-popup-overlay.active {
    display: flex;
    animation: gpFadeIn 0.28s ease;
}

/* Close button */
.gp-close {
    position: fixed;
    top: 18px;
    right: 24px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 100001;
}

.gp-close:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(90deg);
}

/* Image wrapper — overflow hidden so panning stays clipped */
.gp-image-wrap {
    position: relative;
    width: 82vw;
    max-width: 960px;
    height: 72vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    cursor: grab;
}

.gp-image-wrap.grabbing {
    cursor: grabbing;
}

.gp-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
    transform-origin: center center;
    transition: transform 0.22s ease;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Toolbar: zoom buttons + counter */
.gp-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    padding: 7px 18px;
    backdrop-filter: blur(8px);
}

.gp-zoom-btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    flex-shrink: 0;
}

.gp-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.30);
}

.gp-zoom-reset {
    font-size: 13px;
}

/* Prev / Next navigation arrows */
.gp-prev,
.gp-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s, transform 0.2s;
    z-index: 100001;
    user-select: none;
    padding: 0;
    padding-bottom: 3px;
}

.gp-prev { left: 20px; }
.gp-next { right: 20px; }

.gp-prev:hover,
.gp-next:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.1);
}

.gp-prev.disabled,
.gp-next.disabled {
    opacity: 0.22;
    cursor: default;
    pointer-events: none;
}

/* Loading spinner */
@keyframes gpSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.gp-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: gpSpin 0.7s linear infinite;
    display: none;
    z-index: 2;
}

/* Counter text */
.gp-counter {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.20);
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 991px) {
    .our-gallery-section .tx-title {
        font-size: 32px;
    }

    img.cover-img {
        height: 230px;
    }

    .gp-image-wrap { width: 88vw; height: 65vh; }
    .gp-prev { left: 10px; width: 44px; height: 44px; font-size: 28px; }
    .gp-next { right: 10px; width: 44px; height: 44px; font-size: 28px; }
}

@media (max-width: 576px) {
    .our-gallery-section {
        padding: 80px 0;
    }

    .our-gallery-section .tx-title {
        font-size: 26px;
    }

    img.cover-img {
        height: 190px;
    }

    .gallery-plus-icon {
        width: 46px;
        height: 46px;
        font-size: 17px;
    }

    .gp-image-wrap { width: 96vw; height: 52vh; }
    .gp-toolbar { padding: 6px 12px; gap: 8px; }
    .gp-zoom-btn { width: 30px; height: 30px; font-size: 12px; }
    .gp-prev { left: 6px; width: 38px; height: 38px; font-size: 24px; }
    .gp-next { right: 6px; width: 38px; height: 38px; font-size: 24px; }
}
