/* ═══════════════════════════════════════════
   PORTFOLIO PROJECTS — BENTO STYLE ENHANCEMENTS
   Extends the base bento styles in pages.css
   assets/css/portfolio-projects.css
═══════════════════════════════════════════ */

/* ── Filter row wrap support for 8 pills ── */
#portfolio-section .bento-filter-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ── Override bento grid for uniform 3-col when filtering ── */
#portfolio-section .bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 380px;
    gap: 24px;
}


/* Initial load layout (will be managed dynamically by JS during filtering) */
#portfolio-section .bento-item {
    grid-column: span 1;
    grid-row: span 1;
}

/* ── Badges wrap (multiple badges in header) ── */
.bento-badges-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.bento-badge-year {
    background: rgba(0,171,162,0.3) !important;
    border-color: rgba(0,171,162,0.4) !important;
}
.bento-badge-year i {
    font-size: 0.65rem;
    margin-right: 2px;
}

/* ── Tech tags row (inside overlay footer) ── */
.bento-tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover .bento-tech-row {
    opacity: 1;
    max-height: 60px;
}
.bento-tech-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}
.bento-tech-tag:hover {
    background: rgba(0,171,162,0.5);
    border-color: rgba(0,171,162,0.6);
    color: #ffffff;
}

/* ── Meta row (industry + CTA text) ── */
.bento-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.12);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}
.bento-card:hover .bento-meta-row {
    opacity: 1;
    max-height: 50px;
}
.bento-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.bento-meta i {
    font-size: 0.7rem;
    color: rgba(0,171,162,0.8);
}
.bento-meta:last-child {
    color: #ffffff;
    font-weight: 700;
    background: rgba(0,171,162,0.25);
    padding: 4px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0,171,162,0.35);
}

/* ── Filter pills icon styling ── */
.bento-pill i {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.bento-pill.active i {
    opacity: 1;
    color: #00ABA2;
}
.bento-pill:hover i {
    opacity: 1;
}

/* ── Make all bento-desc visible on hover (override nth-child) ── */
#portfolio-section .bento-card .bento-desc {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.88rem;
    line-height: 1.55;
}
#portfolio-section .bento-card:hover .bento-desc {
    opacity: 1;
    max-height: 80px;
    margin-top: 10px;
}
/* First card (hero) always show desc */
#portfolio-section .bento-item:nth-child(1) .bento-desc {
    opacity: 1;
    max-height: 80px;
    margin-top: 12px;
    max-width: 85%;
}

/* ── Hover: teal gradient on overlay ── */
#portfolio-section .bento-card:hover .bento-overlay {
    opacity: 1;
    background: linear-gradient(
        to top,
        rgba(0, 171, 162, 0.92) 0%,
        rgba(15, 23, 42, 0.55) 55%,
        rgba(15, 23, 42, 0.15) 100%
    );
}

/* ── Card title size adjustments ── */
#portfolio-section .bento-title {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    margin: 0 0 6px;
}
#portfolio-section .bento-item:nth-child(1) .bento-title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

/* ── Smooth card entrance for filtering ── */
#portfolio-section .bento-item {
    will-change: opacity, transform;
}

/* ═══════════════════════════════════════════
   RESPONSIVE OVERRIDES
═══════════════════════════════════════════ */
@media (max-width: 1200px) {
    #portfolio-section .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 340px;
    }
}

@media (max-width: 768px) {
    #portfolio-section .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 320px;
        gap: 16px;
    }
    #portfolio-section .bento-item:nth-child(n) {
        grid-column: span 1 !important;
    }
    .bento-filter-row {
        width: 100% !important;
        border-radius: 20px !important;
        padding: 10px !important;
    }
    .bento-pill {
        font-size: 0.78rem !important;
        padding: 0 14px !important;
        height: 38px !important;
    }
    .bento-pill i {
        display: none;
    }
    .bento-tech-row {
        display: none;
    }
    .bento-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    #portfolio-section .bento-title {
        font-size: 1.1rem;
    }
    .bento-content {
        padding: 20px !important;
    }
}

@media (max-width: 480px) {
    #portfolio-section .bento-grid {
        grid-auto-rows: 280px;
    }
    .bento-badges-wrap {
        flex-direction: column;
        gap: 6px;
    }
}
