/* ===== PORTFOLIO HERO ===== */
.portfolio-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(123, 47, 247, 0.05), transparent),
                linear-gradient(180deg, #050508 0%, #08080d 100%);
    position: relative;
    padding-top: 100px;
}

.portfolio-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.7);
    z-index: 1;
    pointer-events: none;
}

.portfolio-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.portfolio-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
}

.portfolio-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
    padding: 6rem 0;
    background: var(--dark);
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.1);
    height: 100%;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
    border-color: var(--primary);
}

.portfolio-image-container {
    position: relative;
    width: 100%;
    padding-top: 70%;
    overflow: hidden;
    background: #0a0a0f;
}

.portfolio-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-company {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.portfolio-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-count i {
    color: var(--primary);
}

/* ===== IMAGE MODAL ===== */
#imageModal .modal-content {
    background: var(--dark-light);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
}

#imageModal .modal-header {
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

#imageModal .modal-title {
    color: var(--text);
    font-weight: 700;
    font-size: 1.5rem;
}

#imageModal .modal-body {
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

.image-gallery {
    position: relative;
}

.main-image-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a0f;
    margin-bottom: 1.5rem;
}

.zoom-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.9);
    border: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    z-index: 10;
}

.zoom-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 60vh;
    object-fit: contain;
}

.thumbnails-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
}

.thumbnails-container::-webkit-scrollbar {
    height: 8px;
}

.thumbnails-container::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary);
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary);
    transform: scale(1);
}

/* ===== FULLSCREEN ZOOM ===== */
.zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    overflow: auto;
}

.zoom-modal.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.zoom-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.9);
    border: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    z-index: 10000;
}

.zoom-close:hover {
    background: var(--primary);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

.zoom-content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
}

.zoom-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
    cursor: grab;
}

.zoom-image:active {
    cursor: grabbing;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .portfolio-hero {
        min-height: 50vh;
    }

    .portfolio-section {
        padding: 4rem 0;
    }

    #imageModal .modal-body {
        padding: 1rem;
        max-height: 85vh;
    }

    .main-image {
        max-height: 50vh;
    }

    .thumbnail {
        width: 80px;
        height: 60px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .image-navigation {
        padding: 0 0.5rem;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .zoom-close {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .zoom-content {
        padding: 1rem;
    }
}

/* ===== LOADING ANIMATION ===== */
.portfolio-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }
.portfolio-item:nth-child(7) { animation-delay: 0.7s; }
.portfolio-item:nth-child(8) { animation-delay: 0.8s; }
.portfolio-item:nth-child(9) { animation-delay: 0.9s; }
.portfolio-item:nth-child(n+10) { animation-delay: 1s; }
