/* =========================================
   PORTAFOLIO - ESTILO GLASS
   ========================================= */

.portfolio-wrapper {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('/assets/img/contacto.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 80px 0;
    color: #fff;
}

.portfolio-hero {
    text-align: center;
    margin-bottom: 50px;
}

.portfolio-hero h1 {
    font-size: 3rem;
    text-shadow: 0 0 20px rgba(41, 197, 246, 0.6);
    margin-bottom: 15px;
}

/* --- BARRA DE FILTROS --- */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--c-cyan);
    color: #000;
    border-color: var(--c-cyan);
    box-shadow: 0 0 15px rgba(41, 197, 246, 0.4);
}

/* --- GRID DE PROYECTOS --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* TARJETA DE PROYECTO (Con efecto Hover) */
.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 300px; /* Altura fija */
    cursor: pointer;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* OVERLAY (INFORMACIÓN QUE APARECE AL PASAR MOUSE) */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0; /* Invisible por defecto */
    transition: opacity 0.3s ease;
}

/* Efectos Hover */
.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-card:hover .project-overlay {
    opacity: 1; /* Visible al pasar mouse */
}

/* Textos dentro de la tarjeta */
.project-cat {
    color: var(--c-yellow);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.project-title {
    font-size: 1.4rem;
    margin: 0 0 10px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.project-desc {
    font-size: 0.9rem;
    color: #ddd;
    margin-bottom: 15px;
    
    /* TRUCO PARA CORTAR TEXTO EN 3 LÍNEAS */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Estándar actual (Chrome, Safari, Edge) */
    line-clamp: 3;         /* Estándar futuro (para compatibilidad) */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-project {
    align-self: flex-start;
    font-size: 0.85rem;
    color: var(--c-cyan);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid var(--c-cyan);
    padding-bottom: 2px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .project-card {
        height: 250px;
    }
    /* En móvil mostramos el título siempre un poco */
    .project-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    }
    .project-desc {
        display: none; /* Ocultamos descripción larga en móvil para no tapar foto */
    }
}