/* =========================================
   PROYECTOS MODULE | STYLE.CSS (FIXED CENTER)
   ========================================= */

/* 1. INTERNAL HERO (Para que el título PORTFOLIO no se rompa aquí) */
.internal-hero {
    position: relative;
    padding: 120px 20px 60px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    z-index: 10;
}

.label-box {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    font-family: "Syncopate", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-blue, #3b82f6);
    background: rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.internal-hero h1 {
    font-family: "Syncopate", sans-serif;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
}

/* 2. GRID SYSTEM (flex en vez de grid: así la última fila incompleta también queda centrada) */
.grid-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;

    /* Espacio abajo para no chocar con el footer */
    padding: 80px 20px 150px 20px;
    min-height: 60vh;
}

/* 3. LA TARJETA (Centrada) */
.project-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Crece/encoge como antes, pero centrado en su fila aunque quede suelta */
    flex: 1 1 320px;
    max-width: 500px;
}

.project-item:hover {
    transform: translateY(-8px);
}

/* 4. IMAGEN / PREVIEW */
.p-image {
    height: 280px;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

/* 5. LOGO INTERNO (flotando, sin tarjeta detrás) */
.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: transparent;
}

.logo-placeholder img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

/* Logo de MIA: algo más pequeño en origen que el resto, lo compensamos */
.logo-placeholder img[alt="MIA" i] {
    width: 80%;
    height: 80%;
}

.project-item:hover .logo-placeholder img {
    transform: scale(1.08) translateY(-4px);
}

/* 6. INFORMACIÓN */
.p-info {
    text-align: center;
    width: 100%;
    padding: 0 10px;
}

.p-info h3 {
    font-family: 'Syncopate', sans-serif !important;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-info span {
    color: #a3a3a3;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    display: block;
}

/* AJUSTE MÓVIL */
@media (max-width: 768px) {
    .grid-showcase {
        padding-bottom: 100px;
    }
    .project-item {
        flex-basis: 100%;
    }
}