/* ==================== PROJECTS.CSS ==================== */

.projects {
    padding: 80px 0 80px;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    min-height: 100vh;
    margin-top: 70px;
}

.projects-header {
    text-align: center;
    margin-bottom: 80px;
}

.projects-label {
    font-size: 0.85rem;
    letter-spacing: 3px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.projects-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 800;
}

.projects-header p {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Projects Container */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-top: 60px;
}

/* Project Item - Single Card with Unequal Columns */
.project-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
    align-items: stretch;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(31, 182, 232, 0.1);
    transition: all 0.35s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    border: 1px solid rgba(31, 182, 232, 0.1);
}

.project-item:hover {
    box-shadow: 0 20px 60px rgba(31, 182, 232, 0.2);
    transform: translateY(-8px);
}

/* Odd items: Content first (left 2/3), Image second (right 1/3) */
.project-item:nth-child(odd) {
    grid-template-columns: 2fr 1fr;
}

.project-item:nth-child(odd) .project-content {
    order: 1;
}

.project-item:nth-child(odd) .project-image {
    order: 2;
}

/* Even items: Image first (left 1/3), Content second (right 2/3) */
.project-item:nth-child(even) {
    grid-template-columns: 1fr 2fr;
}

.project-item:nth-child(even) .project-image {
    order: 1;
}

.project-item:nth-child(even) .project-content {
    order: 2;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-item:nth-child(1) {
    animation-delay: 0.1s;
}

.project-item:nth-child(2) {
    animation-delay: 0.2s;
}

.project-item:nth-child(3) {
    animation-delay: 0.3s;
}

.project-item:nth-child(4) {
    animation-delay: 0.4s;
}

.project-item:nth-child(5) {
    animation-delay: 0.5s;
}

/* Project Image */
.project-image {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.35s ease;
}

.project-image:hover img {
    filter: brightness(1.05) scale(1.02);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.35s ease;
}

/* Project Content */
.project-content {
    padding: 50px 45px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.35s ease;
}

.project-content:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
}

.project-year {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 12px;
    text-transform: uppercase;
    vertical-align: middle;
}

.project-badges-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.project-badges-wrapper .project-badge {
    margin-right: 0;
    margin-bottom: 0;
    display: inline-block;
}

.project-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 800;
    line-height: 1.2;
}

.project-content > p:first-of-type {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-badge {
    display: inline-block;
    background: rgba(31, 182, 232, 0.1);
    color: var(--primary-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.project-badge:hover {
    background: rgba(31, 182, 232, 0.2);
}

.project-result {
    padding: 15px;
    background: linear-gradient(135deg, rgba(31, 182, 232, 0.08), rgba(142, 60, 247, 0.08));
    border-radius: 10px;
    border-left: 4px solid var(--primary-blue);
    margin-top: auto;
    margin-bottom: 0;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.project-result strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .project-item {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .project-item:nth-child(odd),
    .project-item:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .project-item:nth-child(odd) .project-content,
    .project-item:nth-child(even) .project-content {
        order: 1 !important;
    }

    .project-item:nth-child(odd) .project-image,
    .project-item:nth-child(even) .project-image {
        order: 2 !important;
    }

    .project-image {
        min-height: 300px;
    }

    .project-content {
        padding: 40px 35px;
    }

    .project-content h3 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .projects {
        padding: 100px 0 60px;
    }

    .projects-header h1 {
        font-size: 2.2rem;
    }

    .projects-container {
        gap: 40px;
    }

    .project-item {
        border-radius: 12px;
    }

    .project-image {
        min-height: 250px;
    }

    .project-content {
        padding: 35px 30px;
    }

    .project-content h3 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .project-content > p:first-of-type {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .projects {
        padding: 80px 0 50px;
    }

    .projects-header h1 {
        font-size: 1.8rem;
    }

    .projects-container {
        gap: 30px;
    }

    .project-image {
        min-height: 200px;
    }

    .project-content {
        padding: 25px 20px;
    }

    .project-content h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .project-content > p:first-of-type {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .project-year {
        padding: 5px 12px;
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    .project-badge {
        padding: 5px 10px;
        font-size: 0.7rem;
        margin-right: 6px;
        margin-bottom: 8px;
    }

    .project-result {
        padding: 10px;
        font-size: 0.8rem;
        margin-top: 10px;
    }
}