/* Projects Section - Modern Minimalist Design */
.projects-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(17, 24, 39, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(220, 38, 38, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Filter Bar */
.projects-filter-container {
    max-width: 900px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.filter-wrapper {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #9ca3af;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: rgba(220, 38, 38, 0.4);
    color: #fca5a5;
}

.filter-btn.active {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.4);
    color: #fca5a5;
}

.filter-btn i {
    font-size: 0.7rem;
}

.filter-btn .count {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    padding: 0.125rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.search-filter {
    position: relative;
    width: 100%;
    max-width: 240px;
    min-width: 200px;
}

.search-input {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    border-radius: 6px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.4);
    background: transparent;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.75rem;
    pointer-events: none;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Project Cards - Compact & Minimalist (No Border Radius) */
.project-card-modern {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-left: 2px solid rgba(220, 38, 38, 0.5);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: #dc2626;
    transition: height 0.3s ease;
    z-index: 1;
}

.project-card-modern:hover {
    border-color: rgba(220, 38, 38, 0.6);
    background: rgba(0, 0, 0, 0.8);
}

.project-card-modern:hover::before {
    height: 100%;
}

.project-preview {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: #000000;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card-modern:hover .project-image {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card-modern:hover .project-overlay {
    opacity: 1;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000000;
}

.placeholder-image i {
    font-size: 2rem;
    opacity: 0.3;
    color: #dc2626;
}

.placeholder-image::after {
    display: none;
}

.project-quick-actions {
    display: none;
}

.quick-action {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.quick-action:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    transform: scale(1.1);
}

.project-summary {
    padding: 0.875rem;
    position: relative;
    z-index: 10;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-type {
    background: transparent;
    color: #dc2626;
    padding: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-date {
    color: #6b7280;
    font-size: 0.6875rem;
    font-weight: 500;
}

.project-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-brief {
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-stack-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.625rem;
}

.tech-tag {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #9ca3af;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 500;
}

.tech-tag.php { background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.tech-tag.mysql { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.tech-tag.ionic { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.2); color: #67e8f9; }
.tech-tag.unity { background: rgba(156, 163, 175, 0.1); border-color: rgba(156, 163, 175, 0.2); color: #d1d5db; }
.tech-tag.csharp { background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2); color: #d8b4fe; }
.tech-tag.firebase { background: rgba(251, 146, 60, 0.1); border-color: rgba(251, 146, 60, 0.2); color: #fdba74; }
.tech-tag.api { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.2); color: #86efac; }

.project-status {
    display: none;
}

.status-badge {
    display: none;
}

/* Hide status badge in modal */
.modal-badges .status-badge {
    display: none;
}

.status-badge.published {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.unpublished {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.status-badge.unpublished::before {
    display: none;
}

.status-badge.ongoing {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Modern Modal Design */
.project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.project-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-modal-container {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 1100px;
    width: 92%;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.98);
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.project-modal-overlay.active .project-modal-container {
    transform: scale(1);
    opacity: 1;
}

.project-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    background: transparent;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #9ca3af;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.modal-title-section {
    margin-bottom: 0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.modal-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.category-badge {
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.project-modal-content {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 38, 38, 0.3) transparent;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.project-modal-content::-webkit-scrollbar {
    width: 6px;
}

.project-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.project-modal-content::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 10px;
}

.project-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.5);
}

/* Right column wrapper */
.modal-right-column {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-section {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-section-title i {
    color: #dc2626;
    font-size: 0.75rem;
}

.modal-image-viewer {
    margin-bottom: 0;
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.main-image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000000;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 16 / 10;
    height: auto;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.image-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-container:hover .image-navigation {
    opacity: 1;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.nav-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-caption-container {
    display: none;
}

.image-caption {
    color: #d1d5db;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0;
}

.image-index {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.modal-description {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    padding: 0;
    border-radius: 0;
    border: none;
    min-height: auto;
    background: transparent;
}

.modal-tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.modal-tech-item,
.tech-item {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    transition: all 0.2s ease;
    min-width: auto;
    white-space: nowrap;
}


.modal-tech-item i,
.tech-item i {
    font-size: 0.75rem;
    margin-bottom: 0;
    display: inline;
    color: #dc2626;
}

.modal-tech-item span,
.tech-item span {
    font-size: 0.75rem;
    color: #e5e7eb;
    font-weight: 400;
}

/* Hide Key Features section */
.modal-section:has(.modal-features) {
    display: none;
}

.modal-features {
    list-style: none;
    padding: 0;
}

.modal-features li {
    color: #d1d5db;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
}

.modal-features li:last-child {
    border-bottom: none;
}

.modal-features li i {
    color: #22c55e;
    font-size: 0.75rem;
}

.modal-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-link {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #ffffff;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.modal-link:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.5);
}

.modal-link.disabled {
    background: rgba(156, 163, 175, 0.1);
    border-color: rgba(156, 163, 175, 0.2);
    color: #6b7280;
    cursor: not-allowed;
}

.modal-link.disabled:hover {
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-wrapper {
        gap: 1rem;
    }
    
    .filter-tabs {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .filter-btn span:not(.count) {
        display: none;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .project-summary {
        padding: 1rem;
    }
    
    .project-modal-container {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .project-modal-header,
    .project-modal-content {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .modal-links {
        flex-direction: column;
    }
    
    .project-modal-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-image-viewer {
        grid-column: 1;
        grid-row: auto;
    }
    
    .modal-right-column {
        grid-column: 1;
    }
}

@media (max-width: 640px) {
    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-tabs {
        justify-content: center;
        gap: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.7rem;
    }
    
    .search-filter {
        max-width: 100%;
    }
    
    .project-preview {
        height: 150px;
    }
    
    .placeholder-image i {
        font-size: 2rem;
    }
    
    .project-name {
        font-size: 1rem;
    }
    
    .project-brief {
        font-size: 0.8125rem;
    }
    
    .tech-stack-compact {
        gap: 0.375rem;
    }
    
    .tech-tag {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }
}
