/* Portfolio */
.section.portfolio {
  background-color: var(--brand-bg);
  padding-bottom: 0;
}

@media (max-width: 575.98px) {
  .section.portfolio {
    padding-bottom: 20px;
  }
}

.portfolio__heading { 
    text-align: center; 
    margin-bottom: 16px; 
    color: #eddfcc; 
}

.portfolio__pretitle {
    text-transform: uppercase;
    font-size: clamp(4rem, 16vw, 250px);
    line-height: clamp(3.5rem, 13vw, 210px);
    white-space: nowrap;
}

.portfolio__subtitle {
    font-size: clamp(2.5rem, 9vw, 136px);
    line-height: clamp(2rem, 7.5vw, 113px);
    white-space: nowrap;
}

.portfolio__image {
    margin-top: -92px;
    position: relative;
    text-align: center;
    z-index: 2;
}

.portfolio__image img {
    max-width: 850px;
}

.portfolio__since{
    color: var(--brand-color);
    justify-content: space-between;
    position: absolute;
    width: 94%;
    top: 50%;
    left: 3%;
}

/* New multi-image carousel styles */
#carousel-container-1 {
    width: 100%;
    height: 865px; /* Match reduced image height */
    overflow: visible; /* Allow image to show if it extends beyond container */
    position: relative;
    min-width: 320px; /* Prevent container from getting too small */
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio__background-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 672px; /* 896px * 0.75 */
    height: 865px; /* 1154px * 0.75 */
    object-fit: contain;
    object-position: center;
    opacity: 0.9;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
    display: block;
}

.portfolio__track {
    display: flex;
    gap: 16px;
    will-change: transform;
    position: relative;
    z-index: 2;
    top: 20%;
}

.portfolio__track .portfolio__image {
    max-height: 200px;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
}

.portfolio__carousel--text {
    color: #eddfcc;
    font-size: 24px;
    line-height: 38px;
}

.portfolio__text {
    color: var(--brand-color);
}

.portfolio__text::after {
    content: '';
    width: 36px;
    height: 42px;
    background-color: #eddfcc;
    mask: url(../images/common/candle.svg) no-repeat center;
    mask-size: contain;
    -webkit-mask: url(../images/common/candle.svg) no-repeat center;
    -webkit-mask-size: contain;
    display: inline-block;
    position: absolute;
    left: calc(50% - 18px);   
}

.portfolio__text p {
    font-size: 33px;
    margin-top: 16px;
}

.portfolio__text--handwritten {
    font-size: 88px;
    line-height: 88px;
}

.portfolio__carousel--text::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url('../images/common/dot.png');
    background-repeat: no-repeat;
    background-size: contain;
    display: inline-block;
    position: absolute;
    top: -40px;
    left: calc(50% - 8px);
}

.portfolio__carousel--text::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url('../images/common/dot.png');
    background-repeat: no-repeat;
    background-size: contain;
    display: inline-block;
    position: absolute;
    bottom: -50px;
    left: calc(50% - 8px);
}

.portfolio__carousel--text span {
    font-size: 56px;
}

.carousel-btn {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicator.active {
    background-color: white;
    transform: scale(1.25);
}

/* Mobile Responsive Styles - Bootstrap 5 md breakpoint (768px) */
@media (max-width: 767.98px) {
  /* Ensure carousel is completely hidden on mobile */
  .portfolio__carousel,
  #carousel-container-1 {
    display: none !important;
  }
  
  /* Mobile video container styling - match services video styling exactly */
  .portfolio__video {
    position: relative;
    width: 100%;
    height: 900px;
    margin: 0 auto;
    overflow: hidden;
  }

  .portfolio__video-container {
    width: 100%;
    height: 100%;
  }

  .portfolio__video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
  }

  @media (max-width: 575.98px) {
    .portfolio__video {
      position: relative;
      width: 100%;
      height: 100%;
      min-height: 532px;
      text-align: center;
      margin: 0 auto;
      overflow: hidden;
      margin-top: 100px;
    }

    .portfolio__video-container {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 100%;
      height: 100%;
      transform: translate(-50%, -50%);
    }

    .portfolio__video-container iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
      border-radius: 12px;
    }
  }
  
  .portfolio__subtitle { 
    display: none;
  }
  
  .portfolio__text p {
    font-size: 1.2rem;
    margin-top: 12px;
  }
  
  .portfolio__text--handwritten {
    font-size: 43px;
    line-height: 48px;
  }
}

/* Tablet and up - hide mobile video, show carousel */
@media (min-width: 768px) {
  .portfolio__video {
    display: none !important;
  }
}