/* =========================================
   [TAG] 7. PORTFOLIO BENTO GRID (GD-VERSION)
   ========================================= */

.gd-bento-grid {
    display: grid;
    /* minmax(0, 1fr) garantiza que no se desborde de tu alineación */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 300px;
    gap: 20px;
    margin-bottom: 50px;
    width: 100%;
}

.gd-bento-item {
    position: relative; /* OBLIGATORIO para el clic total */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gd-bento-item.gd-tall { grid-row: span 2; }
.gd-bento-item.gd-wide { grid-column: span 2; }

.gd-bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: brightness(0.8);
}

.gd-bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    z-index: 2;
}

.gd-bento-info {
    z-index: 5;
    transition: transform 0.4s ease;
}

.gd-bento-info h3 {
    color: #fff;
    font-size: 1.4rem;
    margin: 5px 0 10px;
    font-weight: 700;
}

.gd-cat {
    color: #0091ea;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* LÓGICA DE CLIC EN TODA EL ÁREA */
.gd-stretched-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: auto;
}

.gd-bento-link {
    text-decoration: none;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* HOVER EFFECTS */
.gd-bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 145, 234, 0.2);
}

.gd-bento-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.6);
}

/* RESPONSIVE (Mantiene alineación en móviles) */
@media (max-width: 1024px) {
    .gd-bento-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .gd-bento-grid { 
        grid-template-columns: 1fr; 
        grid-auto-rows: 280px;
        gap: 15px;
    }
    .gd-bento-item.gd-tall, .gd-bento-item.gd-wide { 
        grid-row: span 1; 
        grid-column: span 1; 
    }
}

/* --- CONTENEDOR DEL BOTÓN --- */
.gd-portfolio-actions {
    display: flex;
    justify-content: center; /* Lo centra perfectamente respecto a la Grid */
    margin-top: 60px;
    padding-bottom: 20px;
}

/* --- BOTÓN PORTAFOLIO ESTILO GLOW --- */
.gd-btn-portfolio {
    --btn-blue: #0091ea;
    --btn-glow: rgba(0, 145, 234, 0.4);
    
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 45px;
    background: var(--btn-blue);
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 10px 25px -5px var(--btn-glow);
    z-index: 1;
}

/* Efecto al pasar el mouse */
.gd-btn-portfolio:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px var(--btn-glow);
    background: #00b0ff; /* Azul más vibrante */
}

/* Icono animado */
.gd-btn-portfolio i {
    font-size: 1rem;
    transition: transform 0.4s ease;
}

.gd-btn-portfolio:hover i {
    transform: translateX(8px);
}

/* Reflejo de luz (Flash) */
.gd-btn-portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: all 0.6s ease;
}

.gd-btn-portfolio:hover::before {
    left: 100%;
}

/* Responsive para el botón */
@media (max-width: 768px) {
    .gd-btn-portfolio {
        padding: 15px 30px;
        font-size: 0.8rem;
        width: 100%; /* En móviles pequeños ocupa el ancho para ser más fácil de tocar */
        justify-content: center;
    }
}


