/* =========================================
   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;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

/* 2. GRID SYSTEM (El cambio está aquí) */
.grid-showcase {
    display: grid;
    /* CAMBIO CLAVE: 'auto-fit' en vez de 'auto-fill' para que ocupe todo el ancho */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    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);
    
    /* Esto centra la tarjeta en el medio de su columna */
    max-width: 500px;
    width: 100%;
    margin: 0 auto; 
}

.project-item:hover {
    transform: translateY(-8px);
}

/* 4. IMAGEN / PREVIEW */
.p-image {
    height: 280px; 
    width: 100%;
    background-color: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    filter: grayscale(100%) contrast(110%);
    transition: all 0.4s ease;
}

.project-item:hover .p-image {
    filter: grayscale(0%) contrast(100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.9);
}

/* 5. LOGO INTERNO */
.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #151515 0%, #000 100%);
}

.logo-placeholder img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    opacity: 0.6;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.project-item:hover .logo-placeholder img {
    transform: scale(1.08);
    opacity: 1;
}

/* 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: #888;
    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 {
        grid-template-columns: 1fr;
        padding-bottom: 100px;
    }
}