/* UI/UX Designs Section Styles */
.ui-designs-section {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.ui-designs-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
}

.ui-designs-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.ui-designs-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.ui-designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ui-design-item {
    background: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.ui-design-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ui-design-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--background-secondary);
}

.design-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.ui-design-item:hover .design-image {
    transform: scale(1.05);
}

.ui-design-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.ui-design-item:hover .ui-design-overlay {
    opacity: 1;
}

.design-type-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-design-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-size: 1.25rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.view-design-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ui-design-info {
    padding: 1.5rem;
}

.ui-design-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.ui-design-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}
.ui-design-designer {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    margin-bottom: 1.5rem; /* Add margin below the designer name */
    font-style: italic;
    display: flex;
    align-items: center;
}

.ui-design-designer i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.dark-mode .ui-design-designer {
    color: var(--text-secondary-dark);
}

/* Design Type Specific Styles */
.ui-design-item[data-type="wireframe"] .design-type-badge {
    background: #6b7280;
}

.ui-design-item[data-type="mockup"] .design-type-badge {
    background: var(--primary-color);
}

.ui-design-item[data-type="prototype"] .design-type-badge {
    background: #10b981;
}

/* Dark Mode Support */
.dark-mode .ui-designs-section {
    border-top-color: #374151;
}

.dark-mode .ui-design-item {
    background: var(--card-background-dark);
    border-color: var(--border-color-dark);
}

.dark-mode .ui-design-info h3 {
    color: var(--text-primary-dark);
}

.dark-mode .ui-design-info p {
    color: var(--text-secondary-dark);
}

.dark-mode .ui-designs-description {
    color: var(--text-secondary-dark);
}

.dark-mode .ui-designs-section h2 {
    color: var(--text-primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ui-designs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ui-designs-section {
        margin: 2rem 0;
        padding: 1.5rem 0;
    }
    
    .ui-designs-section h2 {
        font-size: 1.75rem;
    }
    
    .ui-design-info {
        padding: 1.25rem;
    }
    
    .design-type-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .ui-designs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ui-design-item {
        border-radius: 8px;
    }
    
    .ui-design-info h3 {
        font-size: 1.1rem;
    }
    
    .ui-design-info p {
        font-size: 0.9rem;
    }
}

/* Animation for loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ui-design-item {
    animation: fadeInUp 0.6s ease-out;
}

.ui-design-item:nth-child(1) { animation-delay: 0.1s; }
.ui-design-item:nth-child(2) { animation-delay: 0.2s; }
.ui-design-item:nth-child(3) { animation-delay: 0.3s; }
.ui-design-item:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced hover effects */
.ui-design-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    z-index: -1;
}

.ui-design-item:hover::before {
    opacity: 0.05;
}

/* RTL Support */
[dir="rtl"] .ui-designs-section h2::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .design-type-badge {
    left: auto;
    right: 1rem;
}

/* UI/UX Design Viewer Modal Styles */
.design-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.design-viewer-modal.active {
    opacity: 1;
    visibility: visible;
}

.design-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.design-viewer-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.design-viewer-modal.active .design-viewer-container {
    transform: scale(1);
}

.dark-mode .design-viewer-container {
    background: var(--card-background-dark);
}

.design-viewer-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    z-index: 10;
}

.design-viewer-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--primary-color);
    color: white;
}

.design-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.design-viewer-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.design-viewer-nav.prev {
    left: -25px;
}

.design-viewer-nav.next {
    right: -25px;
}

.design-viewer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 12px;
    transition: opacity 0.2s ease-in-out;
}

.design-viewer-image-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-secondary);
    overflow: hidden;
    padding: 1rem;
}

.dark-mode .design-viewer-image-wrapper {
    background: #2d3748;
}

#designViewerImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.design-viewer-info {
    padding: 1.5rem 2rem;
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}

.dark-mode .design-viewer-info {
    background: var(--card-background-dark);
    border-top-color: var(--border-color-dark);
}

#designViewerTitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

#designViewerDescription {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

#designViewerCounter {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--background-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
}

.dark-mode #designViewerTitle {
    color: var(--text-primary-dark);
}

.dark-mode #designViewerDescription,
.dark-mode #designViewerCounter {
    color: var(--text-secondary-dark);
}

.dark-mode #designViewerCounter {
    background: #374151;
}

/* Responsive for Viewer */
@media (max-width: 768px) {
    .design-viewer-container {
        width: 95%;
        height: 85vh;
        max-height: 85vh;
    }
    .design-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .design-viewer-nav.prev { left: 5px; }
    .design-viewer-nav.next { right: 5px; }
    .design-viewer-close {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        top: 5px;
        right: 5px;
        background: rgba(255,255,255,0.8);
    }
    .design-viewer-info {
        padding: 1rem 1.5rem;
    }
    #designViewerTitle { font-size: 1.2rem; }
    #designViewerDescription { font-size: 0.9rem; }
    #designViewerCounter {
        top: 1rem;
        right: 1.5rem;
    }
}

/* Loader and Animation Styles for Design Viewer */
.design-viewer-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    z-index: 15;
}

.dark-mode .design-viewer-loader {
    background: rgba(0, 0, 0, 0.1);
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s ease infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#designViewerImage {
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.design-viewer-info {
    transition: opacity 0.4s ease 0.1s; /* Delay info fade slightly */
}

/* Animation Classes */
@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-50px); opacity: 0; }
}
@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(50px); opacity: 0; }
}
@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-out-left { animation: slideOutLeft 0.5s forwards cubic-bezier(0.5, 0, 0.75, 0); }
.slide-in-right { animation: slideInRight 0.5s forwards cubic-bezier(0.25, 1, 0.5, 1); }
.slide-out-right { animation: slideOutRight 0.5s forwards cubic-bezier(0.5, 0, 0.75, 0); }
.slide-in-left { animation: slideInLeft 0.5s forwards cubic-bezier(0.25, 1, 0.5, 1); }
