/*--------------------------------------------------------------
# Projects Section
--------------------------------------------------------------*/
.projects {
    background: #f8fafc;
    padding: 60px 0;
}

.project-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    /* Vertical layout for grid */
    height: 100%;
    /* Ensure equal height cards */
}

.project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.project-media {
    flex: 0 0 250px;
    /* Fixed height for media in grid */
    max-width: 100%;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.project-carousel {
    width: 100%;
    height: 100%;
    max-height: 50vh;
    overflow-y: auto;
}

.project-carousel .swiper-slide img {
    width: 100%;
    height: auto;
}

.project-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(45deg, #0563bb, #00a8ff);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(5, 99, 187, 0.3);
    z-index: 10;
}

.project-content {
    flex: 1;
    padding: 25px;
    /* Reduced padding for grid */
    display: flex;
    flex-direction: column;
}

.project-header {
    margin-bottom: 15px;
}

.project-title {
    font-size: 20px;
    /* Smaller title for grid cards */
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    font-family: "Raleway", sans-serif;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit title lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
    /* Fixed height for title to align cards */
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping in smaller cards */
    gap: 12px;
    margin-bottom: 15px;
}

.meta-item {
    font-size: 12px;
    /* Smaller font for meta in grid */
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.meta-item i {
    color: #0563bb;
    font-size: 16px;
}

.project-description {
    font-size: 15px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-description.collapsed {
    max-height: 120px;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.project-description.expanded {
    max-height: 2000px;
    mask-image: none;
    -webkit-mask-image: none;
}

.toggle-desc-btn {
    background: none;
    border: none;
    color: #0563bb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.toggle-desc-btn:hover {
    color: #00a8ff;
}

.toggle-desc-btn i {
    transition: transform 0.3s ease;
}

.toggle-desc-btn.active i {
    transform: rotate(180deg);
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tech-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: #e2e8f0;
    color: #0563bb;
    border-color: #0563bb;
}

.project-footer {
    padding: 15px 25px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(248, 250, 252, 0.5);
}

.view-link {
    font-size: 14px;
    font-weight: 600;
    color: #0563bb;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.view-link:hover {
    gap: 10px;
}