/* Modern Projects Section Styles - Based on Reference Images */

/* Section Title */
.projects-section .section-title {
    margin-bottom: 3rem;
}

.projects-section .subtitle {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Filter Buttons */
.project-filters {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn.active, 
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Project Cards - Modern Style */
.project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.project-item {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.project-img {
    position: relative;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(var(--primary-rgb), 0.9), rgba(var(--secondary-rgb), 0.9));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover .project-overlay {
    opacity: 0.95;
}

.project-content {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.project-content h4 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags span {
    background-color: #f8f9fa;
    color: #495057;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.project-content p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.project-links a {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

/* Project Details Modal */
.modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-body {
    padding: 2rem;
}

.project-modal-img {
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.project-modal-img:hover {
    transform: translateY(-5px);
}

.project-modal-img img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.project-modal-img:hover img {
    transform: scale(1.05);
}

.project-description {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.project-features {
    margin-bottom: 2rem;
}

.project-features h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.tech-stack {
    margin-top: 2rem;
}

.tech-stack h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.tech-tag:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.modal-btn:hover::before {
    left: 100%;
}

/* Modal Animation Classes */
.modal.fade .modal-dialog {
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .project-item {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .project-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}

/* Dark Mode Styles */
[data-theme="dark"] .project-card {
    background-color: #2a2d3a;
}

[data-theme="dark"] .project-content h4 {
    color: #e9ecef;
}

[data-theme="dark"] .project-content p {
    color: #adb5bd;
}

[data-theme="dark"] .project-tags span {
    background-color: #343a40;
    color: #e9ecef;
}

[data-theme="dark"] .filter-btn {
    background-color: #343a40;
    border-color: #495057;
    color: #e9ecef;
}

[data-theme="dark"] .project-category {
    background-color: #343a40;
    color: #e9ecef;
}

/* Animation for project items */
.project-item {
    opacity: 0;
    transform: translateY(20px);
}

.project-item.animate {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}