/***********************************************************
 * PROYECTOS.CSS - ESTILO EDITORIAL MASONRY
 ***********************************************************/

/* Reutilización de Hero de Flota */
.hero {
    position: relative;
    height: 80vh; /* Un poco más corto que la home para ir al grano */
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-blue);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Lógica Masonry para el Portafolio */
.masonry-wrapper {
    column-count: 2; /* Dos columnas potentes */
    column-gap: 30px;
    padding: 50px 0;
}

.project-card {
    display: inline-block; /* Evita rotura de tarjeta entre columnas */
    width: 100%;
    margin-bottom: 30px;
    background: var(--white);
    border: 1px solid var(--platinum);
    transition: transform 0.4s ease;
}

.project-img-container {
    position: relative;
    height: auto;
    overflow: hidden;
}

.project-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.project-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-blue);
    color: var(--primary-blue);
    padding: 5px 15px;
    font-family: var(--title-font);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
}

.project-details {
    padding: 30px;
}

.project-details h3 {
    font-family: var(--title-font);
    font-size: 1.4rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.project-details p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

/* Hover */
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .masonry-wrapper {
        column-count: 1; /* Una sola columna en móvil */
    }
    
    .hero {
        height: 60vh;
    }
}

/* ================================================================
   FILTROS DE NAVEGACIÓN - ESTILO EDITORIAL
   ================================================================ */

.filter-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 40px 0 60px;
    padding: 0 20px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--platinum);
    color: var(--primary-blue);
    padding: 12px 28px;
    font-family: var(--title-font); /* Oswald */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 0; /* Estilo cuadrado editorial */
}

/* Estado Activo y Hover */
.filter-btn.active, 
.filter-btn:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(10, 35, 66, 0.1);
}

/* --- LÓGICA DE VISIBILIDAD PARA EL JS --- */

/* Cuando un item se oculta */
.project-card.hide {
    display: none;
    opacity: 0;
}

/* Cuando un item se muestra (con animación de entrada) */
.project-card.show {
    display: inline-block;
    animation: projectFadeIn 0.6s ease forwards;
}

@keyframes projectFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Ajuste responsive para los filtros */
@media (max-width: 768px) {
    .filter-controls {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.7rem;
        flex: 1 1 auto; /* Los botones se ajustan al ancho en móvil */
        min-width: 140px;
    }
}