/* Portfolio Cloud88 Styles */

.portfolio-cloud88-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter Buttons */
.portfolio-filter {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    padding: 10px 25px;
    margin: 5px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    color: #333;
}

.filter-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.filter-btn.active {
    background: #0095f6;
    border-color: #0095f6;
    color: #fff;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.portfolio-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
    background: #f5f5f5;
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-view {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 30px;
    border: 2px solid #fff;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-view {
    background: #fff;
    color: #333;
}

.portfolio-title {
    margin-top: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    line-height: 1.4;
}

.portfolio-no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* Modal Popup - Instagram Style */
.portfolio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.portfolio-modal.active {
    display: block;
}

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

.portfolio-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.portfolio-modal-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.portfolio-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    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: rotate(90deg);
}

.portfolio-modal-inner {
    display: flex;
    height: 90vh;
    max-height: 800px;
}

.portfolio-modal-left {
    flex: 1.5;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-modal-left img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.portfolio-modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    background: #fff;
}

#modalTitle {
    font-size: 24px;
    font-weight: 700;
    color: #262626;
    margin: 0 0 20px 0;
    line-height: 1.3;
    padding-bottom: 20px;
    border-bottom: 1px solid #efefef;
}

.portfolio-modal-body {
    flex: 1;
    color: #262626;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
    overflow-y: auto;
}

.portfolio-modal-body p {
    margin-bottom: 15px;
}

.portfolio-modal-button {
    display: inline-block;
    background: #0095f6;
    color: #fff;
    text-decoration: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.portfolio-modal-button:hover {
    background: #1877f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 149, 246, 0.3);
}

.portfolio-modal-button[href="#"],
.portfolio-modal-button[href=""] {
    display: none;
}

/* Loading State */
.portfolio-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Load More Button */
.portfolio-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.portfolio-load-more-btn {
    background: #0095f6;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.portfolio-load-more-btn:hover {
    background: #1877f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 149, 246, 0.3);
}

.portfolio-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.portfolio-load-more-btn.loading {
    pointer-events: none;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

.portfolio-load-more-wrapper.hidden {
    display: none;
}

/* Responsive Design */

/* Tablet */
@media screen and (max-width: 992px) {
    .portfolio-modal-inner {
        flex-direction: column;
        max-height: 90vh;
    }
    
    .portfolio-modal-left {
        flex: none;
        height: 50vh;
        max-height: 400px;
    }
    
    .portfolio-modal-right {
        flex: none;
        max-height: 40vh;
    }
    
    .portfolio-modal-content {
        max-width: 95%;
        margin: 2.5vh auto;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .portfolio-cloud88-wrapper {
        padding: 15px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .portfolio-filter {
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 14px;
        margin: 3px;
    }
    
    .portfolio-title {
        font-size: 16px;
    }
    
    .portfolio-modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
    }
    
    .portfolio-modal-inner {
        height: 100vh;
        max-height: 100vh;
    }
    
    .portfolio-modal-left {
        height: 45vh;
        max-height: 45vh;
    }
    
    .portfolio-modal-right {
        padding: 20px;
        max-height: 55vh;
    }
    
    #modalTitle {
        font-size: 20px;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    .portfolio-modal-body {
        font-size: 14px;
    }
    
    .portfolio-modal-button {
        padding: 12px 25px;
        font-size: 14px;
        width: 100%;
    }
    
    .portfolio-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .portfolio-cloud88-wrapper {
        padding: 10px;
    }
    
    .portfolio-grid {
        gap: 20px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .portfolio-modal-left {
        height: 40vh;
        max-height: 40vh;
    }
    
    .portfolio-modal-right {
        padding: 15px;
        max-height: 60vh;
    }
    
    #modalTitle {
        font-size: 18px;
    }
}

/* Scrollbar Styling */
.portfolio-modal-right::-webkit-scrollbar,
.portfolio-modal-body::-webkit-scrollbar {
    width: 6px;
}

.portfolio-modal-right::-webkit-scrollbar-track,
.portfolio-modal-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.portfolio-modal-right::-webkit-scrollbar-thumb,
.portfolio-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.portfolio-modal-right::-webkit-scrollbar-thumb:hover,
.portfolio-modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}
