/* 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; /* This gives the absolute nav-btns their anchor */
    padding-top: 2rem;
}

/* 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; }

