/* Portfolio Grid Styling */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: var(--bg-alt); /* Deep Blue-Grey */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-item img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-item:hover img {
    transform: scale(1.1);
    opacity: 0.4;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(13, 13, 13, 0.9) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.project-num {
    color: var(--brand-orange); /* #f16622 */
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.project-text {
    font-size: 0.85rem;
    color: var(--text-main); /* #ffffff */
    line-height: 1.4;
}

/* Ensure the Modal Content is Dark */
.dark-modal {
    background-color: #111111 !important; /* Forces dark background over BS default */
    background: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 1.5rem !important;
    color: #ffffff !important;
}

/* Fix for the Modal Body positioning the Nav Buttons */
#projectModal .modal-body {
    position: relative; 
}

/* Nav Buttons Styling & Positioning */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(241, 102, 34, 1);
    color: #ffffff !important;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1055; /* Higher than modal content */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #fff !important; /* */
    box-shadow: 0 0 20px rgba(241, 102, 34, 0.6);
    color: #f16622 !important;
}

/* Adjust button horizontal pull so they overlap the edges slightly */
.prev-btn { left: -25px; }
.next-btn { right: -25px; }

/* Desktop-only: Move buttons further out if preferred */
@media (min-width: 992px) {
    .prev-btn { left: -60px; }
    .next-btn { right: -60px; }
}

/* Mobile: Move buttons inside the modal boundaries */
@media (max-width: 991px) {
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    .nav-btn { width: 40px; height: 40px; }
}

/* Ensure text inside modal is readable */
#projectModal h3, 
#projectModal p, 
#projectModal span {
    color: #ffffff !important;
}

#projectModal .text-muted {
    color: #A9A9A9 !important; /* */
}

/* Shimmer Effect */
.shimmer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Hybrid Animations */
.hybrid-left-exit { opacity: 1; transform: translateX(0); transition: all 0.25s ease-in; }
.hybrid-left-exit-active { opacity: 0; transform: translateX(-30px); }

.hybrid-left-enter { opacity: 0; transform: translateX(30px); }
.hybrid-left-enter-active { opacity: 1; transform: translateX(0); transition: all 0.34s ease-out; }

.hybrid-right-exit { opacity: 1; transform: translateX(0); transition: all 0.25s ease-in; }
.hybrid-right-exit-active { opacity: 0; transform: translateX(30px); }

.hybrid-right-enter { opacity: 0; transform: translateX(-30px); }
.hybrid-right-enter-active { opacity: 1; transform: translateX(0); transition: all 0.34s ease-out; }

/* Section Headers */
.display-title-2 {
    font-size: 1.75rem;
    letter-spacing: 1px;
    margin-top: 2rem;
}

/* Ensure images don't look cramped in the new layout */
.portfolio-item {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .display-title-2 {
        font-size: 1.5rem; /* Shrink headers slightly on phones */
        margin-top: 2.5rem;
    }
}

/* Customizing the Media Container */
#modalMediaContainer video {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
}

/* Audio Player Container */
.audio-player-wrapper {
    background: #1a1a1a;
    border-left: 4px solid var(--brand-orange);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Subtle fix for video height on mobile */
@media (max-width: 576px) {
    #modalMediaContainer video {
        max-height: 250px !important;
    }
}

/* Ensure the modal text doesn't hug the image too closely */
#modalDesc {
  margin-top: 1.5rem;
  color: var(--text-muted); /* Reusing your muted text variable */
  line-height: 1.7;
}




/* Mobile Nav Adjustments */
@media (max-width: 991px) {
    .nav-btn {
      /*  display: none; */
    }
}

/* Update this in ixisbs.css */
@media (min-width: 992px) {
    /* High-specificity selector to stop the jump to 100% */
    div#projectModal img#modalImage.portfolio-modal-img {
        width: 375px !important;
        height: 375px !important;
        max-width: 375px !important;
        max-height: 375px !important;
        min-width: 375px !important; /* Added min-width to anchor it */
        min-height: 375px !important;
        object-fit: cover;
        margin: 0 auto !important;
        display: block !important;
    }
    


    
.modal-image-wrapper {
        width: 375px !important;
        height: 375px !important;
        margin: 0 auto !important; /* Centers the cage */
        overflow: hidden; /* Prevents spills */
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #111; /* Fallback color */
        border-radius: 8px;
    }

    #modalImage.portfolio-modal-img {
        width: 102% !important;
        height: 102% !important;
        object-fit: cover !important; /* Keeps it square regardless of original photo ratio */
    }
    
}

#Websites {
scroll-margin-top:100px !important;
}
#Multimedia {
scroll-margin-top:100px !important;
}
#Video {
scroll-margin-top:100px !important;
}
