.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-modal.modal-show {
    opacity: 1;
}

.portfolio-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-modal.modal-show .portfolio-modal-content {
    transform: scale(1) translateY(0);
}

.portfolio-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.portfolio-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.portfolio-modal-image,
.portfolio-modal-video {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    user-select: none;
    transition: transform 0.3s ease;
}

.portfolio-modal-image {
    cursor: zoom-in;
}

.portfolio-modal-image.zoomed {
    cursor: zoom-out;
}

.portfolio-modal-video {
    pointer-events: auto !important;
    cursor: auto !important;
}

.portfolio-modal-video::-webkit-media-controls-panel,
.portfolio-modal-video::-webkit-media-controls {
    display: flex !important;
}

.portfolio-modal-video[controls] {
    -webkit-appearance: media-controls-panel;
    appearance: auto;
}

.portfolio-modal-media {
    position: relative;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    min-height: 400px;
    overflow: hidden;
    cursor: default;
}

.portfolio-modal-media:hover {
    overflow: visible;
}

.gallery-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.gallery-nav-btn:hover {
    background: rgba(244, 160, 35, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 20px rgba(244, 160, 35, 0.4);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-current {
    color: #f4a023;
}

.video-container {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 15px 15px 0 0;
    pointer-events: none;
}

.portfolio-item .video-container video {
    pointer-events: none;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px 15px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 2;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(244, 160, 35, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(244, 160, 35, 0.3);
}

.play-button:hover {
    transform: scale(1.1);
    background: rgba(244, 160, 35, 1);
}

.portfolio-item .video-container:hover .play-button {
    transform: scale(1.2);
}

.portfolio-modal-info {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

.portfolio-modal-title {
    font-size: 2rem;
    margin: 0 0 15px 0;
    color: #333;
    font-weight: 700;
}

.portfolio-modal-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.portfolio-modal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.portfolio-modal-category {
    background: linear-gradient(135deg, #f4a023, #ff6b35);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.portfolio-item {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

