/* Project Hover and Click Expansion Styles */
.project-item {
    position: relative;
    transition: all 0.4s ease;
    z-index: 1;
    border-radius: 10px;
    overflow: hidden;
    min-height: 300px; /* Ensure minimum height */
}

/* Hover expansion - slight growth */
.project-item.hover-active {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

/* Click expansion - larger growth with details */
.project-item.clicked-active {
    transform: scale(1.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

[data-theme="dark"] .project-item.hover-active,
[data-theme="dark"] .project-item.clicked-active {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Enhance project overlay */
.project-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 0.95;
    transition: all 0.4s ease;
}

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

.project-item.clicked-active .project-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.9) 40%,
        rgba(0, 0, 0, 0.85) 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    opacity: 1;
}

/* Project info styles */
.project-info {
    padding: 20px;
    transform: translateY(30px);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: calc(100% - 40px); /* Full height minus padding */
    justify-content: space-between;
}

.project-item:hover .project-info,
.project-item.hover-active .project-info {
    transform: translateY(0);
}

.project-item.clicked-active .project-info {
    transform: translateY(0);
    padding-bottom: 30px;
}

/* Add description to expanded state */
.project-description {
    height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 10px;
    transition: all 0.4s ease;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-item.clicked-active .project-description {
    height: auto;
    opacity: 1;
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

/* Add technologies to expanded state */
.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.project-item.clicked-active .project-technologies {
    height: auto;
    opacity: 1;
    margin-top: 15px;
}

.project-tech {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.75rem;
    backdrop-filter: blur(5px);
}

/* Improved project link styling */
.project-link {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: white;
    text-align: center;
    margin-top: 15px;
    backdrop-filter: blur(5px);
    text-decoration: none;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.project-link i {
    margin-right: 5px;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-item.clicked-active .project-link {
    display: inline-block;
    width: auto;
    margin-top: 20px;
    padding: 10px 20px;
}
