/* ========================================
   GALERÍA DE PROYECTOS - ESTILOS DEL FRONTEND
   ======================================== */

.projects-gallery {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    
    /* Ancho completo - Escapar del contenedor */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.projects-grid {
    display: grid;
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
}

.project-card {
    background: #ffffff;
    min-height: 320px; /* Por defecto para 4+ columnas */
}



.project-image {
    width: 100%;
    height: 250px; /* Altura fija */
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--image-position, center center); /* Posición personalizable */
}

/* Posición personalizable con variable CSS --image-position */

/* Altura mínima dinámica de tarjetas según columnas */
.projects-gallery.columns-1 .project-card {
    min-height: 520px; /* 1 columna - muy alta */
}

.projects-gallery.columns-2 .project-card {
    min-height: 420px; /* 2 columnas - alta */
}

.projects-gallery.columns-3 .project-card {
    min-height: 360px; /* 3 columnas - media */
}

.projects-gallery.columns-4 .project-card,
.projects-gallery.columns-5 .project-card,
.projects-gallery.columns-6 .project-card {
    min-height: 320px; /* 4+ columnas - estándar */
}



/* Efectos hover para botones */
.project-button {
    transition: all 0.3s ease;
}

.project-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}



.project-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.project-image-placeholder span {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.project-title {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.project-button {
    display: inline-block;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Responsive - Tablets grandes */
@media (max-width: 1200px) {
    .projects-gallery {
        padding: 50px 15px !important;
    }
    
    .projects-grid {
        max-width: 100% !important;
        padding: 0 !important;
        gap: 25px !important;
    }
}

/* Responsive - Tablets */
@media (max-width: 900px) {
    .projects-gallery {
        padding: 40px 15px !important;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .project-card {
        min-height: 300px !important;
    }
    
    .project-image {
        height: 200px !important;
        margin-bottom: 15px;
    }
    
    .project-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .project-button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* Responsive - Móviles */
@media (max-width: 768px) {
    .projects-gallery {
        padding: 30px 10px !important;
    }
    
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        max-width: 100% !important;
    }
    
    .project-card {
        min-height: 350px !important;
        text-align: center;
    }
    
    .project-image {
        height: 220px !important;
        margin-bottom: 20px;
    }
    
    .project-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .project-button {
        padding: 12px 24px;
        font-size: 1rem;
        display: block;
        width: fit-content;
        margin: 0 auto;
    }
}

/* Responsive - Móviles pequeños */
@media (max-width: 480px) {
    .projects-gallery {
        padding: 25px 10px !important;
    }
    
    .project-card {
        min-height: 320px !important;
    }
    
    .project-image {
        height: 180px !important;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
