.section-title {
    display: flex;
    justify-content: center;
}

.projects-sect {
  padding: 80px 50px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 120px;
  gap: 20px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  box-shadow: 0 2px 12px #0003;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .4s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: white;
  opacity: 0;
  transition: .3s;
  pointer-events: none;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rotated-video video {
    transform: rotate(-90deg) scale(1.2);
    transform-origin: center;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    display: none;
}

.modal video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
}

.modal.show {
    display: flex;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    z-index: 10000;
}

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

/* Mosaic Sizes */

.large {
  grid-column: span 6;
  grid-row: span 4;
}

.wide {
  grid-column: span 6;
  grid-row: span 2;
}

.tall {
  grid-column: span 3;
  grid-row: span 4;
}

.small {
  grid-column: span 3;
  grid-row: span 2;
}

/* Tablet */

@media screen and (max-width: 991px) {

.projects-grid{
    grid-template-columns: repeat(6,1fr);
}

.large,
.wide{
    grid-column: span 6;
}

.tall,
.small{
    grid-column: span 3;
}

}

/* Mobile */

@media screen and (max-width:767px){

.projects-grid{
    grid-template-columns:1fr;
    grid-auto-rows:260px;
}

.large,
.wide,
.tall,
.small{
    grid-column:auto;
    grid-row:auto;
}

}