
/* Projects Portfolio Styles */
.projects-portfolio-container {
    margin: 0 auto;
}

.portfolio-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    border-bottom: 2px solid #f0f0f0;
    padding: 15px 0;
    overflow-x: auto;
    white-space: nowrap;
}

.tab-button {
    background: #ffffff;
    border: 1px solid #458EFF;
    padding: 9px 20px;
    cursor: pointer;
    border-radius: 25px;
    font-weight: 400;
    transition: all 0.3s ease;
    color: #458EFF;
    font-size: 13px;
    flex-shrink: 0;
}

.tab-button:hover {
    transform: translateY(-2px);
}

.tab-button.active {
    background: #458EFF;
    color: white;
    border-color: #458EFF;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.project-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #458effeb;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.view-project {
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 25px;
    background: transparent;
    transition: all 0.3s ease;
}

.project-item:hover .view-project {
    background: white;
    color: #458eff;
}

.project-title {
    padding: 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    background: linear-gradient(to right, #0057B7, #3399FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.no-projects {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
    grid-column: 1 / -1;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #458EFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* View More Button Styles */
.view-more-container {
    text-align: center;
    margin-top: 30px;
}

.view-more-btn {
    color: #ffffff;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6em;
    padding: 8px 40px;
    transition: all 0.5s ease;
    margin-top: 30px;
    background: linear-gradient(to right, #0057B7, #3399FF);
    border: none;
    cursor: pointer;
    border-radius: 500px;
    position: relative;
    overflow: hidden;
}

.view-more-btn:hover {
    background: linear-gradient(to bottom right, #0057B7, #3399FF);
    box-shadow: 0 0 25px 3px rgba(69, 142, 255, 0.5);
}

.view-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .portfolio-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 15px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .portfolio-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 12px;
        min-width: fit-content;
    }
}

/* Mobile Landscape */
@media (max-width: 767px) and (orientation: landscape) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .project-title {
        padding: 15px;
        font-size: 16px;
    }
}

/* Mobile Portrait */
@media (max-width: 767px) and (orientation: portrait) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-tabs {
        gap: 6px;
        margin-bottom: 20px;
        justify-content: flex-start;
        padding: 15px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .portfolio-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        padding: 6px 12px;
        font-size: 11px;
        min-width: fit-content;
        white-space: nowrap;
    }
    
    .project-title {
        padding: 15px;
        font-size: 16px;
    }
    
    .view-more-btn {
        font-size: 14px;
        letter-spacing: 8px;
        padding: 12px 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .portfolio-tabs {
        gap: 4px;
        padding: 15px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
    }
    
    .portfolio-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        padding: 4px 8px;
        font-size: 9px;
        min-width: fit-content;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .view-more-btn {
        font-size: 12px;
        letter-spacing: 4px;
        padding: 10px 16px;
    }
}

/* RTL Support for Arabic and other RTL languages */
[dir="rtl"] .portfolio-tabs {
    direction: rtl;
}

[dir="rtl"] .project-title {
    text-align: center;
}

/* WPML Language Switcher Integration */
.projects-portfolio-container .wpml-ls-statics-shortcode_actions {
    margin-bottom: 20px;
    text-align: center;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tab-button {
        border-width: 2px;
    }
    
    .project-item {
        box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tab-button,
    .project-item,
    .project-image img,
    .project-overlay,
    .view-project,
    .view-more-btn {
        transition: none;
    }
    
    .spinner {
        animation: none;
    }
    
    .project-item:hover {
        transform: none;
    }
}
