/* =========================================
   PÁGINA PORTAFOLIO — HERO, TABS, SOFTWARE
   ========================================= */

.portfolio-page-hero {
    padding: 8rem 1.5rem 3rem;
    text-align: center;
    position: relative;
}

.portfolio-page-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.portfolio-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.portfolio-back-link:hover {
    color: var(--secondary-glow);
}

.portfolio-page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin: 0.75rem 0 1rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portfolio-page-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 580px;
    margin: 0 auto;
}

/* --- Tabs --- */
.portfolio-tabs-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.portfolio-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.portfolio-tabs-nav::-webkit-scrollbar {
    display: none;
}

.portfolio-tab {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    white-space: nowrap;
}

.portfolio-tab:hover {
    color: var(--text-main);
}

.portfolio-tab.active {
    background: linear-gradient(135deg, rgba(112, 0, 223, 0.9), rgba(0, 212, 255, 0.35));
    color: #fff;
    box-shadow: 0 4px 20px rgba(112, 0, 223, 0.35);
}

.portfolio-tab-panel {
    display: none;
    animation: tabFadeIn 0.35s ease;
}

.portfolio-tab-panel.active {
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.tab-panel-intro h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.tab-panel-intro p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.portfolio-tab-panel .ux-design-process {
    margin-top: 3rem;
}

.portfolio-gallery-grid {
    margin-top: 0;
}

.portfolio-gallery-hint {
    display: none;
}

/* --- Software mockup --- */
.software-showcase {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}

.browser-mockup {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.browser-chrome {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.browser-dots span:first-child { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

.browser-screen {
    padding: 0;
    min-height: 380px;
}

.erp-dashboard {
    display: flex;
    min-height: 380px;
    font-size: 0.75rem;
}

.erp-sidebar {
    width: 140px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.35);
    border-right: 1px solid var(--border-color);
    padding: 1rem 0.75rem;
}

.erp-brand {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
    background: linear-gradient(90deg, #fff, var(--secondary-glow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.erp-nav-item {
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    cursor: default;
}

.erp-nav-item.active {
    background: rgba(112, 0, 223, 0.25);
    color: #fff;
}

.erp-main {
    flex: 1;
    padding: 1rem;
    overflow: hidden;
}

.erp-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.erp-topbar h3 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.erp-topbar span {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.erp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.erp-notif {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(112, 0, 223, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.erp-user {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.erp-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.erp-kpi {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
}

.erp-kpi-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-bottom: 0.25rem;
}

.erp-kpi strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.erp-kpi-trend {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.erp-kpi-trend.up { color: #4ade80; }
.erp-kpi-trend.down { color: #f87171; }

.erp-table-wrap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.erp-table-header {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.75rem;
}

.erp-link {
    color: var(--secondary-glow);
    font-size: 0.65rem;
    font-weight: 400;
}

.erp-table-row {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 0.9fr 0.7fr;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: center;
    font-size: 0.68rem;
}

.erp-table-row.head {
    color: var(--text-muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.erp-table-row .status {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.6rem;
    text-align: center;
    width: fit-content;
}

.status.approved { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.status.pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status.progress { background: rgba(0, 212, 255, 0.15); color: var(--secondary-glow); }

.software-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.software-feature {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.3s;
}

.software-feature:hover {
    border-color: rgba(112, 0, 223, 0.35);
}

.software-feature h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.software-feature p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Tech stack --- */
.tech-stack-section {
    padding: 4rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.tech-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.tech-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.35rem 1.35rem;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.tech-category-card:hover {
    border-color: rgba(112, 0, 223, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(112, 0, 223, 0.12);
}

.tech-category-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--secondary-glow);
    margin-bottom: 1rem;
}

.tech-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: flex-start;
}

.tech-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 72px;
    text-align: center;
}

.tech-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.tech-brand span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.tech-category-card--wide {
    grid-column: span 1;
}

.tech-category-card--span-2 {
    grid-column: span 2;
}

.tech-category-card--span-4 {
    grid-column: span 4;
}

.tech-category-card--electronics {
    grid-column: span 4;
}

.tech-category-card--3d {
    grid-column: span 4;
    background: linear-gradient(135deg, rgba(112, 0, 223, 0.12) 0%, rgba(0, 212, 255, 0.08) 50%, rgba(112, 0, 223, 0.06) 100%);
    border-color: rgba(0, 212, 255, 0.35);
    position: relative;
    overflow: hidden;
}

.tech-category-card--3d::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.tech-3d-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.tech-3d-icon-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 14px;
}

.tech-3d-icon {
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.45));
}

.tech-category-label--3d {
    margin-bottom: 0.35rem;
}

.tech-3d-tagline {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.tech-brands--3d {
    gap: 0.65rem;
    position: relative;
}

.tech-3d-chip {
    display: inline-flex;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    font-size: 0.78rem;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.tech-stack-highlight {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tech-stack-highlight strong {
    color: var(--secondary-glow);
    font-family: var(--font-mono);
    font-weight: 600;
}

.tech-stack-more {
    margin-top: 2.25rem;
    text-align: center;
}

.tech-stack-more-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--secondary-glow);
    margin-bottom: 1rem;
}

.tech-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 720px;
    margin: 0 auto 1rem;
}

.tech-category-note {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.45;
    text-align: center;
}

.tech-stack-footnote {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

.tech-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    margin: 0.15rem 0.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-main);
    white-space: nowrap;
}

/* --- Cases --- */
.cases-section {
    padding: 2rem 1.5rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    transition: border-color 0.3s, transform 0.3s;
}

.case-card:hover {
    border-color: rgba(112, 0, 223, 0.35);
    transform: translateY(-3px);
}

.case-card.featured-case {
    border-color: rgba(112, 0, 223, 0.4);
    background: linear-gradient(145deg, rgba(112, 0, 223, 0.08), rgba(0, 0, 0, 0.2));
}

.case-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    color: var(--secondary-glow);
    margin-bottom: 0.75rem;
}

.case-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.case-card > p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.case-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.case-metric {
    text-align: center;
}

.case-metric strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 0.2rem;
    background: linear-gradient(90deg, #fff, var(--secondary-glow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.case-metric span {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* --- CTA --- */
.portfolio-page-cta {
    padding: 4rem 1.5rem 6rem;
    text-align: center;
}

.portfolio-page-cta .cta-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.portfolio-page-cta h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.portfolio-page-cta p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .software-showcase {
        grid-template-columns: 1fr;
    }

    .software-features {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .software-feature {
        flex: 1 1 calc(50% - 0.625rem);
    }

    .tech-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-category-card--span-2,
    .tech-category-card--span-4,
    .tech-category-card--electronics,
    .tech-category-card--3d {
        grid-column: span 2;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .portfolio-page-hero {
        padding: 7rem 1.25rem 2rem;
    }

    .portfolio-tabs-section {
        padding: 0 1.25rem 3rem;
    }

    .portfolio-tabs-nav {
        justify-content: flex-start;
        width: 100%;
        border-radius: 14px;
        padding: 0.5rem;
    }

    .portfolio-tab {
        padding: 0.65rem 1.1rem;
        font-size: 0.72rem;
    }

    .erp-sidebar {
        display: none;
    }

    .erp-kpis {
        grid-template-columns: 1fr;
    }

    .erp-table-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
    }

    .erp-table-row.head span:nth-child(3),
    .erp-table-row.head span:nth-child(4),
    .erp-table-row span:nth-child(3),
    .erp-table-row span:nth-child(4) {
        display: none;
    }

    .software-features {
        flex-direction: column;
    }

    .software-feature {
        flex: 1 1 100%;
    }

    .tech-category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tech-category-card--span-2,
    .tech-category-card--span-4,
    .tech-category-card--electronics,
    .tech-category-card--3d {
        grid-column: span 1;
    }

    .tech-pills-wrap {
        gap: 0.4rem;
        padding: 0 0.25rem;
    }

    .tech-pill {
        font-size: 0.62rem;
        padding: 0.12rem 0.45rem;
    }

    .tech-category-card--wide .tech-brands {
        justify-content: center;
    }

    .tech-brands {
        justify-content: center;
        gap: 0.85rem 1rem;
    }

    .tech-brand {
        min-width: 64px;
    }

    .tech-brand img {
        width: 32px;
        height: 32px;
    }

    .tech-stack-footnote {
        font-size: 0.8rem;
        padding: 0 0.25rem;
    }

    .case-metrics {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .case-metric {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 0.35rem 0;
    }

    .case-metric strong {
        font-size: 1rem;
    }

    .portfolio-page-cta {
        padding-bottom: 5rem;
    }
}

@media (max-width: 480px) {
    .portfolio-tab {
        padding: 0.6rem 0.85rem;
        font-size: 0.68rem;
    }

    .browser-screen {
        min-height: 320px;
    }

    .erp-dashboard {
        min-height: 320px;
    }
}
