/* Campaign Cards Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    
}
.projects-grid a {
    text-decoration: none !important;
}

.project-box {
    position: relative;
    height: 500px;
    perspective: 1500px;
    cursor: pointer;
 
    
}

.project-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    
    
}

.project-box:hover .project-box-inner {
    transform: rotateY(180deg);
    
}

.project-front,
.project-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column; 
    border: 12px solid #FFB90F;
    
}

.project-front {
    background-color: white;
}

.project-back {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: rotateY(180deg);
    justify-content: center;
    padding: 2rem;
    background-image: var(background-image);
}

.project-image {
    width: 100%;
    height: 250px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
   
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 1.5rem;
    padding-bottom: 0;
    
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: black;
    margin-bottom: 1rem;
}

.project-description {
    color: black;
    line-height: 1.6;
    margin-bottom: auto;
    flex-grow: 1;
    font-size: 1.2rem;
}

.project-date {
    font-size: 1.3rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 1rem;
}

.project-date i {
    color: black;
    font-size: 0.9rem;
}

.learn-more-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: white;
    color: black;
    font-weight: 500;
    margin-top: auto;
    border-radius: 30px;
    border: black solid 1px;
    
}

.learn-more-text {
    font-weight: bold;
}

.learn-more-arrow {
    font-size: 1.2rem;
    
}

/* Back side content */


.back-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
    z-index: 2;
}

.back-description {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.4;
    margin-bottom: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-break: break-word;
    padding: 0 0.5rem;
    
}
    
.back-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: black;
    margin-bottom: 1rem;
}
.project-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 225, 54, 0.8);
  z-index: 1;
  
}
@media (max-width: 1200px) {
    .project-box {
        height: 480px;
    }
    
    .project-image {
        height: 220px;
    }
    
    .back-description {
        font-size: clamp(1rem, 2.2vw, 1.2rem);
        -webkit-line-clamp: 7;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .project-box {
        height: 450px;
    }
    
    .project-image {
        height: 200px;
    }
    
    .back-description {
        font-size: clamp(0.9rem, 2vw, 1.1rem);
        line-height: 1.3;
        -webkit-line-clamp: 6;
        padding: 0 0.25rem;
    }
    
    .project-back {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-box {
        height: 420px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .back-description {
        font-size: clamp(0.85rem, 1.8vw, 1rem);
        line-height: 1.25;
        -webkit-line-clamp: 5;
        padding: 0;
    }
    
    .back-label {
        font-size: 1.5rem;
        font-weight: 600;
        color: black;
        margin-bottom: 1rem;
    }
    
    .project-back {
        padding: 1.25rem;
    }
}