﻿.portfolio-gallery {
  width: 502px;
  margin: 0 auto;
  padding: 8px;
  border: none;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}

.portfolio-gallery-stage {
  display: block;
  width: 100%;
  background: #000;
  border: 1px solid #9f1d22;
  cursor: zoom-in;
  animation: portfolioStageGlow 3.4s ease-in-out infinite;
}

.portfolio-gallery-stage-viewport {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
}

.portfolio-gallery-stage-track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  transition: transform 0.32s ease;
  will-change: transform;
}

.portfolio-gallery-stage-image {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  touch-action: pan-y;
}

.portfolio-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  color: #e8e8e8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 20px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.portfolio-gallery-grid-wrap {
  position: relative;
  overflow: visible;
}

.portfolio-gallery-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 78px;
  max-height: calc((78px * 3) + (8px * 2));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 2px 3px 0;
  position: relative;
  z-index: 2;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portfolio-gallery-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@keyframes portfolioStageGlow {
  0%, 100% {
    border-color: rgba(140, 0, 0, 0.75);
    box-shadow: 0 0 8px 2px rgba(159, 29, 34, 0.55), 0 0 22px 5px rgba(200, 0, 0, 0.25);
  }
  50% {
    border-color: rgba(255, 55, 0, 0.95);
    box-shadow: 0 0 22px 6px rgba(255, 30, 0, 0.85), 0 0 48px 14px rgba(200, 0, 0, 0.38);
  }
}

@keyframes portfolioThumbPulse {
  0%, 100% {
    border-color: rgba(140, 0, 0, 0.5);
    box-shadow: inset 0 0 4px 1px rgba(200, 0, 0, 0.2);
  }
  50% {
    border-color: rgba(255, 50, 0, 1);
    box-shadow: inset 0 0 16px 4px rgba(255, 20, 0, 0.7);
  }
}

@keyframes portfolioThumbPulseBright {
  0%, 100% {
    border-color: rgba(255, 60, 0, 0.8);
    box-shadow: inset 0 0 10px 3px rgba(255, 0, 0, 0.6);
  }
  50% {
    border-color: #fff;
    box-shadow: inset 0 0 20px 6px rgba(255, 80, 0, 0.85);
  }
}

.portfolio-gallery-thumb {
  --thumb-pulse-duration: 3.15s;
  --thumb-pulse-delay: 0s;
  display: block;
  width: 100%;
  min-width: 0;
  height: 78px;
  border: 1px solid #9f1d22;
  background: #000;
  padding: 0;
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  line-height: 0;
  font-size: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  animation: portfolioThumbPulse var(--thumb-pulse-duration) ease-in-out infinite;
  animation-delay: var(--thumb-pulse-delay);
}

.portfolio-gallery-thumb:hover,
.portfolio-gallery-thumb:focus {
  outline: none;
  border-color: #9f1d22;
  animation: portfolioThumbPulseBright 0.7s ease-in-out infinite;
}

.portfolio-gallery-thumb.is-active {
  border-color: #9f1d22;
  box-shadow: 0 0 0 1px #9f1d22 inset;
}

.portfolio-gallery-thumb-image {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: cover;
  opacity: 0.65;
  filter: brightness(0.82);
  transform: scale(1);
  transform-origin: center center;
  transition: transform 1.2s ease, filter 0.3s ease, opacity 0.3s ease;
}

.portfolio-gallery-thumb:hover .portfolio-gallery-thumb-image,
.portfolio-gallery-thumb:focus .portfolio-gallery-thumb-image {
  opacity: 1;
  filter: brightness(100%);
  transform: scale(1.18);
  transition: transform 2.5s ease, filter 0.3s ease, opacity 0.22s ease;
}

.portfolio-gallery-thumb.is-active .portfolio-gallery-thumb-image {
  opacity: 1;
  filter: brightness(100%);
}

.portfolio-gallery-error {
  width: 502px;
  margin: 0 auto;
  color: #ddd;
  background: #111;
  border: none;
  padding: 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  text-align: center;
  box-sizing: border-box;
}

.portfolio-gallery-fallback {
  width: 502px;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px;
  background: #000;
  border-radius: 12px;
  box-sizing: border-box;
  height: 960px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 3;
}

.portfolio-gallery-fallback-featured {
  margin: 0 0 10px;
  flex: 0 0 auto;
}

.portfolio-gallery-fallback-featured a {
  display: block;
  height: 360px;
  border: 1px solid #9f1d22;
  background: #000;
  animation: portfolioStageGlow 3.4s ease-in-out infinite;
  overflow: hidden;
}

.portfolio-gallery-fallback-frame {
  display: block;
  width: 100%;
  height: 360px;
  border: 1px solid #9f1d22;
  background: #000;
  box-sizing: border-box;
  animation: portfolioStageGlow 3.4s ease-in-out infinite;
}

.portfolio-gallery-fallback-featured img {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.portfolio-gallery-fallback-caption {
  color: #d6d6d6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 2px 10px;
}

.portfolio-gallery-fallback-grid-wrap {
  flex: none !important;
  height: 420px !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: scroll !important;
  overflow-x: hidden;
  padding: 0 12px 10px 0;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #9f1d22 #111;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #000;
  position: relative;
}

.portfolio-gallery-fallback-grid-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.portfolio-gallery-fallback-grid-wrap::-webkit-scrollbar-track {
  background: #111;
}

.portfolio-gallery-fallback-grid-wrap::-webkit-scrollbar-thumb {
  background: #9f1d22;
  border-radius: 999px;
  border: 2px solid #111;
}

.portfolio-gallery-fallback-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 84px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-content: start;
  background: #000;
}

.portfolio-gallery-fallback-thumb {
  display: block;
  min-width: 0;
  max-width: 100%;
  height: 84px;
  border: 1px solid #9f1d22;
  background: #000;
  padding: 3px;
  overflow: hidden;
  box-sizing: border-box;
  line-height: 0;
  animation: portfolioThumbPulse 3.15s ease-in-out infinite;
}

.portfolio-gallery-fallback-thumb:hover,
.portfolio-gallery-fallback-thumb:focus {
  outline: none;
  animation: portfolioThumbPulseBright 0.7s ease-in-out infinite;
}

.portfolio-gallery-fallback-thumb:focus,
.portfolio-gallery-fallback-thumb:focus-visible {
  border-color: #fff;
  box-shadow: 0 0 16px rgba(255, 70, 0, 0.75);
}

.portfolio-gallery-fallback-thumb img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  filter: brightness(0.84);
  transition: transform 1.2s ease, filter 0.3s ease, opacity 0.3s ease;
}

.portfolio-gallery-fallback-thumb:hover img,
.portfolio-gallery-fallback-thumb:focus img {
  opacity: 1;
  filter: brightness(1);
  transform: scale(1.12);
}

.portfolio-gallery-fallback-thumb:focus img,
.portfolio-gallery-fallback-thumb:focus-visible img {
  opacity: 1;
  filter: brightness(1.04);
}

.portfolio-gallery-fallback-footer {
  flex: 0 0 auto;
  margin-top: 12px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(159, 29, 34, 0.8);
  text-align: center;
  font-family: "Times New Roman", Times, serif;
}

.portfolio-gallery-fallback-contact {
  margin: 0 0 10px;
  color: #fff;
  font-size: 14px;
  font-style: italic;
}

.portfolio-gallery-fallback-contact a,
.portfolio-gallery-fallback-contact a:visited {
  color: #f00;
  text-decoration: none;
}

.portfolio-gallery-fallback-contact a:hover,
.portfolio-gallery-fallback-contact a:focus {
  text-decoration: underline;
}

.portfolio-gallery-fallback-archive {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 220px;
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(159, 29, 34, 0.8);
  border-radius: 14px;
  background: rgba(12, 12, 12, 0.82);
  color: #d9d9d9;
  text-decoration: none;
  box-sizing: border-box;
}

.portfolio-gallery-fallback-archive:hover,
.portfolio-gallery-fallback-archive:focus {
  background: rgba(36, 10, 10, 0.92);
}

.portfolio-gallery-fallback-archive-title,
.portfolio-gallery-fallback-archive-copy {
  display: block;
  font-style: italic;
}

.portfolio-gallery-fallback-archive-title {
  font-size: 13px;
}

.portfolio-gallery-fallback-archive-copy {
  font-size: 12px;
  line-height: 1.3;
}

.portfolio-search-noscript {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(159, 29, 34, 0.65);
  background: rgba(0, 0, 0, 0.82);
  color: #ddd;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.portfolio-search-noscript a,
.portfolio-search-noscript a:visited {
  color: #f33;
  text-decoration: none;
}

.portfolio-search-noscript a:hover,
.portfolio-search-noscript a:focus {
  text-decoration: underline;
}

.div4 {
  overflow: hidden;
}

.ContainerPortfolio {
  overflow: visible;
}

@media (min-width: 821px) {
.portfolio-gallery {
    --picker-space-grow: calc(var(--bauder-extra, 0px) * 0.03);
    --picker-size-grow: calc(var(--bauder-extra, 0px) * 0.38);
    width: min(calc(502px + var(--picker-size-grow)), calc(100% - 16px));
    padding: calc(8px + var(--picker-space-grow));
  }

  .portfolio-gallery-stage-viewport {
    height: calc(360px + (var(--picker-size-grow) * 0.22));
  }

  .portfolio-gallery-grid {
    --thumb-row: calc(78px + (var(--picker-size-grow) * 0.08));
    --thumb-gap: calc(8px + (var(--picker-space-grow) * 0.6));
    gap: var(--thumb-gap);
    grid-auto-rows: var(--thumb-row);
    padding: 0 2px 3px 0;
    max-height: calc((var(--thumb-row) * 3) + (var(--thumb-gap) * 2));
  }

  .portfolio-gallery-thumb {
    height: calc(78px + (var(--picker-size-grow) * 0.08));
  }

  .portfolio-gallery-error {
    width: min(calc(502px + var(--picker-size-grow)), calc(100% - 16px));
  }

  .portfolio-gallery-fallback {
    width: min(calc(502px + var(--picker-size-grow, 0px)), calc(100% - 16px));
    padding: calc(8px + var(--picker-space-grow, 0px));
    height: calc(960px + (var(--picker-space-grow, 0px) * 2.2));
  }

  .portfolio-gallery-fallback-caption {
    padding-top: calc(8px + (var(--picker-space-grow, 0px) * 0.5));
    padding-bottom: calc(10px + (var(--picker-space-grow, 0px) * 0.5));
  }

  .portfolio-gallery-fallback-grid {
    gap: calc(8px + (var(--picker-space-grow, 0px) * 0.5));
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: calc(84px + (var(--picker-size-grow, 0px) * 0.08));
  }

  .portfolio-gallery-fallback-grid-wrap {
    padding-right: calc(12px + (var(--picker-space-grow, 0px) * 0.25));
    padding-bottom: calc(10px + (var(--picker-space-grow, 0px) * 0.2));
  }

  .portfolio-gallery-fallback-thumb {
    height: calc(84px + (var(--picker-size-grow, 0px) * 0.08));
  }
}

.portfolio-lightbox-open {
  overflow: hidden;
}

.portfolio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(0, 0, 0, 0.84);
}

.portfolio-lightbox.is-open {
  display: grid;
  place-items: center;
  padding: 24px;
}

.portfolio-lightbox-shell {
  width: min(1200px, 96vw);
  height: min(92vh, 860px);
  border: 2px solid #2d2d2d;
  border-radius: 14px;
  background: linear-gradient(180deg, #151515 0%, #0b0b0b 100%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.portfolio-lightbox-top {
  height: auto;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: linear-gradient(180deg, #1a1a1a 0%, #131313 100%);
}

.portfolio-lightbox-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.portfolio-lightbox-eyebrow {
  display: none;
}

.portfolio-lightbox-title {
  color: #fff;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62vw;
}

.portfolio-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 2px;
}

.portfolio-lightbox-chip {
  display: none;
}

.portfolio-lightbox-stage-zone {
  display: block;
  flex: 1 1 auto;
  padding: 14px 14px 6px;
  background:
    linear-gradient(180deg, rgba(159, 29, 34, 0.16), rgba(0, 0, 0, 0) 75%),
    #120709;
  min-height: 0;
}

.portfolio-lightbox-stage-wrap {
  position: relative;
  border: 1px solid #181818;
  border-radius: 12px;
  background: #000;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: 100%;
  min-height: 0;
}

.portfolio-lightbox-viewport {
  position: relative;
  width: calc(100% - 4px);
  flex: 1 1 auto;
  height: auto;
  min-height: 260px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  border: none;
  box-sizing: border-box;
  margin: 0 auto;
}

.portfolio-lightbox-viewport.is-pan-enabled {
  cursor: grab;
}

.portfolio-lightbox-viewport.is-panning {
  cursor: grabbing;
  user-select: none;
}

.portfolio-lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  transition: transform 0.32s ease;
  will-change: transform;
}

.portfolio-lightbox-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #000;
  touch-action: pan-y;
}

.portfolio-lightbox-image.is-hidden {
  display: none;
}

.portfolio-lightbox-image.is-animating {
  transition: transform 0.58s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.portfolio-lightbox-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  z-index: 7;
  padding: 10px 14px;
  border-radius: 10px;
  background: none;
  color: #f5f0e8;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  box-sizing: border-box;
}

.portfolio-lightbox-stage-wrap:hover .portfolio-lightbox-caption,
.portfolio-lightbox-stage-wrap:focus-within .portfolio-lightbox-caption {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-lightbox-thumb-strip {
  border-top: 1px solid #232323;
  border-bottom: 1px solid #232323;
  background: #0c0c0c;
  padding: 6px 14px 10px;
  min-height: 0;
  flex: 0 0 auto;
}

.portfolio-lightbox-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portfolio-lightbox-thumbs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.portfolio-lightbox-thumb {
  display: block;
  width: 128px;
  min-width: 128px;
  border: 1px solid #9f1d22;
  border-radius: 8px;
  background: #000;
  padding: 0;
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
  appearance: none;
  -webkit-appearance: none;
}

.portfolio-lightbox-thumb-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: brightness(60%);
  transition: filter 0.2s ease;
}

.portfolio-lightbox-thumb:hover .portfolio-lightbox-thumb-image,
.portfolio-lightbox-thumb:focus .portfolio-lightbox-thumb-image,
.portfolio-lightbox-thumb.is-active .portfolio-lightbox-thumb-image {
  filter: brightness(100%);
}

.portfolio-lightbox-thumb.is-active {
  box-shadow: 0 0 0 1px #9f1d22 inset;
}

.portfolio-lightbox-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #414141;
  background: #101010;
  color: #e7e7e7;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  margin: 1px 0;
  box-sizing: border-box;
}

.portfolio-lightbox-prev,
.portfolio-lightbox-next {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 68px;
  margin-top: -34px;
  border-radius: 10px;
  border: 1px solid #353535;
  background: rgba(16, 16, 16, 0.92);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}

.portfolio-lightbox-prev {
  left: 14px;
}

.portfolio-lightbox-next {
  right: 14px;
}

.portfolio-lightbox-bottom {
  min-height: 48px;
  background: linear-gradient(180deg, #1a1a1a 0%, #101010 100%);
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
  color: #b6b6b6;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portfolio-lightbox-mode {
  border: 1px solid #383838;
  border-radius: 8px;
  padding: 6px 10px;
  background: #121212;
  color: #ddd;
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
}

.portfolio-lightbox-social {
  position: absolute;
  bottom: 6px;
  left: 84%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: none;
}

.portfolio-lightbox-social .portfolio-social-heart,
.portfolio-lightbox-social .portfolio-social-comment-btn {
  color: #fff;
  transform: scale(0.85);
}

.portfolio-lightbox-social .portfolio-social-like-count {
  font-size: 11px;
  margin-right: 14px;
}

.portfolio-lightbox-social .portfolio-social-comment-link {
  color: #ccc;
  font-size: 11px;
}

.portfolio-lightbox-close:focus-visible,
.portfolio-lightbox-prev:focus-visible,
.portfolio-lightbox-next:focus-visible,
.portfolio-lightbox-thumb:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

@media (max-width: 820px) {
  .portfolio-gallery {
    width: 100%;
    max-width: none;
  }

  .portfolio-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-gallery-stage-viewport {
    height: min(56vw, 250px);
  }

  .portfolio-gallery-stage-image {
    object-fit: cover;
  }

  .portfolio-gallery-fallback {
    width: 100%;
    max-width: none;
  }

  .portfolio-gallery-fallback-frame {
    height: min(56vw, 280px);
  }

  .portfolio-gallery-fallback-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Social interaction bar (Instagram-style likes & comments) ===== */

.portfolio-social-zone {
  padding: 0 4px;
  height: 34px;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.portfolio-social-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 4px;
}

.portfolio-social-heart,
.portfolio-social-comment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #e0e0e0;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  transition: transform 0.15s ease;
}

.portfolio-social-heart:hover,
.portfolio-social-comment-btn:hover {
  color: #fff;
  transform: scale(1.1);
}

.portfolio-social-heart:active,
.portfolio-social-comment-btn:active {
  transform: scale(0.9);
}

.portfolio-social-heart .heart-filled {
  display: none;
}

.portfolio-social-heart .heart-outline {
  display: block;
}

.portfolio-social-heart.is-liked .heart-filled {
  display: block;
}

.portfolio-social-heart.is-liked .heart-outline {
  display: none;
}

.portfolio-social-heart.is-liked {
  color: #ed4956;
}

@keyframes portfolioHeartBounce {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.35); }
  30%  { transform: scale(0.9); }
  45%  { transform: scale(1.15); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.portfolio-social-heart.is-animating {
  animation: portfolioHeartBounce 0.5s ease;
}

.portfolio-social-like-count {
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin-left: auto;
  padding: 0;
}

.portfolio-social-comment-link {
  display: inline;
  background: none;
  border: none;
  color: #8e8e8e;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  text-align: left;
}

.portfolio-social-comment-link:hover {
  color: #b0b0b0;
}

/* ===== Comment overlay panel ===== */

.portfolio-comment-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
}

.portfolio-comment-overlay.is-open {
  display: flex;
}

.portfolio-comment-overlay.is-lightbox {
  left: 50%;
  border-radius: 0 12px 12px 0;
}

.portfolio-comment-panel {
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portfolio-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #363636;
  flex: 0 0 auto;
}

.portfolio-comment-title {
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.portfolio-comment-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #414141;
  background: #101010;
  color: #e7e7e7;
  cursor: pointer;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
}

.portfolio-comment-close:hover {
  background: #222;
  color: #fff;
}

.portfolio-comment-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #363636 #1a1a1a;
}

.portfolio-comment-list::-webkit-scrollbar {
  width: 6px;
}

.portfolio-comment-list::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.portfolio-comment-list::-webkit-scrollbar-thumb {
  background: #363636;
  border-radius: 3px;
}

.portfolio-comment-empty {
  color: #8e8e8e;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  text-align: left;
  padding: 12px 0;
}

.portfolio-comment-item {
  padding: 8px 0;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  color: #e0e0e0;
  border-bottom: 1px solid #262626;
}

.portfolio-comment-item:last-child {
  border-bottom: none;
}

.portfolio-comment-item-name {
  font-weight: 600;
  color: #fff;
}

.portfolio-comment-item-name.is-guest {
  color: #8e8e8e;
  font-weight: 400;
}

.portfolio-comment-item-text {
  color: #e0e0e0;
}

.portfolio-comment-item-time {
  color: #6e6e6e;
  font-size: 11px;
  margin-left: 8px;
}

.portfolio-comment-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(54, 54, 54, 0.7);
  flex: 0 0 auto;
  background: rgba(15, 15, 15, 0.4);
}

.portfolio-comment-name-input,
.portfolio-comment-text-input {
  background: none;
  border: none;
  color: #e0e0e0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  padding: 6px 0;
  outline: none;
  border-radius: 0;
}

.portfolio-comment-name-input {
  width: 115px;
  flex: 0 0 auto;
  border-right: 1px solid #363636;
  padding-right: 10px;
}

.portfolio-comment-text-input {
  flex: 1 1 auto;
  min-width: 0;
}

.portfolio-comment-name-input::placeholder,
.portfolio-comment-text-input::placeholder {
  color: #6e6e6e;
}

.portfolio-comment-post-btn {
  background: none;
  border: none;
  color: #0095f6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 2px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.portfolio-comment-post-btn:hover {
  opacity: 0.8;
}

.portfolio-comment-post-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Mobile landscape: side-by-side layout — main image left, thumbnails right */
@media (max-width: 820px) and (orientation: landscape) {
  /* ── JS gallery ── */

  .portfolio-gallery {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    position: relative;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    padding: 0 !important;
    gap: 8px !important;
    overflow: hidden;
    border-radius: 0;
    box-sizing: border-box;
  }

  .portfolio-gallery-stage {
    flex: 1 1 0 !important;
    min-width: 0;
    height: 100% !important;
    overflow: hidden;
    border: 2px solid #9f1d22 !important;
    border-radius: 8px !important;
    box-sizing: border-box;
    animation: portfolioThumbPulse 3.15s ease-in-out infinite !important;
    position: relative;
  }

  .portfolio-gallery-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 6px;
    animation: portfolioThumbPulse 3.15s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
  }

  .portfolio-gallery-stage-viewport {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
  }

  .portfolio-gallery-stage-image {
    object-fit: cover !important;
  }

  /* Caption: mixed case, smaller */
  .portfolio-gallery-caption {
    text-transform: none !important;
    font-size: 10px !important;
    padding: 12px 6px 4px !important;
  }

  /* Likes/comments: lower-right inside image, same line as caption */
  .portfolio-social-zone {
    position: absolute !important;
    bottom: 6px !important;
    right: 220px !important;
    left: auto !important;
    margin: 0 !important;
    padding: 0 10px !important;
    height: auto !important;
    overflow: visible !important;
    background: transparent;
    z-index: 4;
  }

  .portfolio-social-actions {
    gap: 6px !important;
    padding: 0 !important;
  }

  .portfolio-social-heart svg,
  .portfolio-social-comment-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  .portfolio-social-like-count {
    font-size: 8px !important;
  }

  /* Hide "Add a comment" */
  .portfolio-social-comment-link {
    display: none !important;
  }

  /* Comment overlay: cover the large image exactly */
  .portfolio-comment-overlay.is-landscape {
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: 8px;
  }

  /* Right: smaller thumbnail column — no visible scrollbar */
  .portfolio-gallery-grid-wrap {
    flex: 0 0 200px !important;
    width: 200px !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: none !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .portfolio-gallery-grid-wrap::-webkit-scrollbar {
    display: none !important;
  }

  .portfolio-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Rounded corners on all thumbnail borders */
  .portfolio-gallery-grid .portfolio-gallery-thumb {
    border-radius: 6px !important;
    overflow: hidden;
  }

  /* ── Fallback gallery (iframe) ── */

  .portfolio-gallery-fallback {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    gap: 8px !important;
    overflow: hidden;
    box-sizing: border-box;
  }

  .portfolio-gallery-fallback-featured {
    flex: 1 1 0 !important;
    min-width: 0;
    margin: 0 !important;
    height: 100% !important;
  }

  .portfolio-gallery-fallback-frame {
    width: 100% !important;
    height: 100% !important;
    animation: none !important;
    box-shadow: none !important;
    border-radius: 8px !important;
  }

  .portfolio-gallery-fallback-grid-wrap {
    flex: 0 0 200px !important;
    width: 200px !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .portfolio-gallery-fallback-grid-wrap::-webkit-scrollbar {
    display: none !important;
  }

  .portfolio-gallery-fallback-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .portfolio-gallery-fallback-thumb {
    border-radius: 6px !important;
    overflow: hidden;
  }

  .portfolio-gallery-fallback-footer {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .portfolio-gallery-fallback-footer {
    display: none !important;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .portfolio-gallery-stage-viewport {
    height: 55vh;
  }

  .portfolio-gallery-stage-image {
    object-fit: contain;
  }
}
