/* === FILTER === */
.portfolio-filter {
  text-align: center;
  margin: 20px 0 28px;
}
.portfolio-filter a {
    display: inline-block;
    margin: 0 14px;
    font: 700 14px/1.2 Raleway,sans-serif;
    text-transform: uppercase;
    color: #fff;
    position: relative;
    transition: .25s;
    border: 1px solid #525252;
    border-radius: 10px;
    padding: 15px;
}


.portfolio-filter a.active,
.portfolio-filter a:hover {
  background: #A81C51;
  color: #fff;
  border: none;
}


/* === GRID === */
.portfolio-container {
  margin: 0 auto;
}
.grid-sizer,
.portfolio-item {
  width: calc(25% - 35px);
  margin-bottom: 35px; /* thêm khoảng cách dọc */
}
@media (max-width: 1024px) {
  .grid-sizer,
  .portfolio-item { width: calc(50% - 20px); }
}
@media (max-width: 640px) {
  .grid-sizer,
  .portfolio-item { width: 100%; }
}


/* === FRAME === */
.portfolio-frame {
  position: relative; /* 🔥 để overlay bám theo khung này */
  background: #fff;
  border: 12px solid #fff;
  box-shadow: 0 0 0 7px #000, 0 10px 25px rgba(0,0,0,.35);
  overflow: hidden; /* 🔥 ngăn overlay tràn ra */
}

.portfolio-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .5s ease;
}
.portfolio-frame:hover img {
  transform: scale(1.06);
}

/* === OVERLAY === */
/* Overlay nằm trong khung */
.portfolio-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0; /* giới hạn trong khung */
  background: rgba(231,76,60,.85);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  transition: opacity .35s ease;
}
.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}
.overlay-inner {
  transform: translateY(10px);
  opacity: 0;
  transition: all .35s ease;
}
.portfolio-item:hover .overlay-inner {
  transform: translateY(0);
  opacity: 1;
}

/* === ICONS === */
.icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}
.icons a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: .25s;
}
.icons a:hover {
    background: #fff;
    color: #000!important;
}

/* === TEXT === */
.overlay-inner h3 {
  font: 700 15px/1.2 Raleway,sans-serif;
  text-transform: uppercase;
  margin: 6px 0 4px;
}
.overlay-inner p {
  font: 13px/1.4 Raleway,sans-serif;
  opacity: .95;
}


.portfolio-frame, figure {
    margin: unset !important;
}

/* ==== NỀN GALLERY ==== */
.portfolio-section,
.portfolio-container {
  background-image: url('/wp-content/uploads/2025/11/portfolio-bg.jpg');
  background-repeat: repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  padding: 40px 0;
}
