/* =================================================================
   PROJECTS SECTION - APE TECHNOLOGY (DARK NEUTRAL THEME)
================================================================= */
.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-intro p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.project-card-featured {
    margin-bottom: 60px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: var(--bg-card);
}

.featured-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(18, 18, 18, 1) 20%, rgba(18, 18, 18, 0.8) 60%, transparent); 
    color: var(--text-lightest);
}

.project-info-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.8);
}

.project-info-overlay p {
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.7);
}

.grid-title {
    text-align: center;
    color: var(--text-lightest);
    font-size: 1.6rem;
    margin-bottom: 40px;
}

.projects-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-height: 520px;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out;
}

.projects-grid::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--bg-dark-gray) 0%, transparent 100%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.7s ease-in-out;
}

.projects-grid.expanded::after { opacity: 0; }

/* A CORREÇÃO ESTÁ AQUI */
.projects-grid.expanded { 
    max-height: 3000px; /* Valor aumentado para garantir que todos os 6 cards apareçam no mobile */
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2), 0 0 20px rgba(100, 255, 218, 0.15);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
}

.project-info { padding: 25px; }
.project-info.text-center { text-align: center; }

.project-info h3 {
    font-size: 1.2rem;
    color: var(--text-lightest);
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.project-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 500;
    color: var(--accent-green);
    transition: color 0.3s ease;
}

.project-button:hover { color: var(--accent-blue); }
.project-button i { margin-left: 8px; }

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 992px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .video-wrapper {
        padding-top: 0;
        height: 450px;
    }

    .project-info-overlay { padding: 25px; }
    .project-info-overlay h3 { font-size: 1.4rem; }
    .project-info-overlay p { font-size: 0.9rem; }
    
    .grid-title { font-size: 1.4rem; }
    
    .projects-grid {
        grid-template-columns: 1fr;
        max-height: 800px;
    }
    
    .project-info { padding: 20px; }
}