/* ===================================
   PORTAFOLIO  Estilos completos
=================================== */

/*  HERO  */
.pf-hero {
    position: relative;
    background: #080A1A url('../img/hero/hero.png') center center / cover no-repeat;
    background-attachment: fixed;
    padding: 160px 0 130px;
    overflow: hidden;
}

.pf-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 7, 25, 0.96) 0%, rgba(8, 12, 40, 0.9) 50%, rgba(5, 10, 35, 0.85) 100%);
    z-index: 1;
}

.pf-hero-grid {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 40px;
    align-items: center;
}

.pf-hero-eyebrow {
    color: #3b82f6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.pf-hero-title {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.pf-hero-accent {
    color: #3b82f6;
}

.pf-hero-desc {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.75;
    max-width: 480px;
}

/* Curva blanca inferior */
.pf-hero-curve {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: #ffffff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: scaleX(1.15);
    z-index: 3;
}

/*  IMAGEN HERO  */
.pf-hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pf-hero-img {
    width: 100%;
    max-width: 640px;
    height: auto;
    object-fit: cover;
}

.pf-hologram-wrap {
    position: relative;
    width: 340px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glow central */
.pf-holo-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.1) 50%, transparent 75%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* Partculas de fondo */
.pf-holo-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: pf-float 6s infinite ease-in-out;
}

.pf-holo-p1 {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.pf-holo-p2 {
    width: 6px;
    height: 6px;
    background: #60a5fa;
    top: 70%;
    right: 20%;
    animation-delay: 2s;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
}

.pf-holo-p3 {
    width: 10px;
    height: 10px;
    background: #93c5fd;
    bottom: 15%;
    left: 25%;
    animation-delay: 4s;
    box-shadow: 0 0 12px rgba(147, 197, 253, 0.8);
}

@keyframes pf-float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.2);
    }
}

/* Escena 3D del cubo */
.pf-cube-scene {
    perspective: 700px;
    perspective-origin: 50% 50%;
    position: relative;
    z-index: 2;
}

.pf-cube {
    width: 160px;
    height: 160px;
    position: relative;
    transform-style: preserve-3d;
    animation: pf-rotate-cube 12s infinite linear;
}

@keyframes pf-rotate-cube {
    0% {
        transform: rotateX(-20deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(-20deg) rotateY(360deg);
    }
}

.pf-cube-face {
    position: absolute;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(100, 170, 255, 0.35);
    backface-visibility: hidden;
}

.pf-face-front {
    background: linear-gradient(135deg, rgba(30, 80, 200, 0.7), rgba(60, 130, 255, 0.5));
    transform: rotateY(0deg) translateZ(80px);
}

.pf-face-back {
    background: linear-gradient(135deg, rgba(20, 60, 160, 0.7), rgba(40, 100, 220, 0.5));
    transform: rotateY(180deg) translateZ(80px);
}

.pf-face-right {
    background: linear-gradient(135deg, rgba(25, 70, 180, 0.7), rgba(50, 120, 240, 0.5));
    transform: rotateY(90deg) translateZ(80px);
}

.pf-face-left {
    background: linear-gradient(135deg, rgba(15, 50, 140, 0.7), rgba(35, 90, 200, 0.5));
    transform: rotateY(-90deg) translateZ(80px);
}

.pf-face-top {
    background: linear-gradient(135deg, rgba(40, 100, 220, 0.8), rgba(80, 160, 255, 0.6));
    transform: rotateX(90deg) translateZ(80px);
}

.pf-face-bottom {
    background: linear-gradient(135deg, rgba(10, 40, 120, 0.7), rgba(25, 70, 180, 0.5));
    transform: rotateX(-90deg) translateZ(80px);
}

/* conos flotantes alrededor del cubo */
.pf-float-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(15, 30, 80, 0.85);
    border: 1px solid rgba(100, 170, 255, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    z-index: 3;
    animation: pf-orbit 8s infinite ease-in-out;
}

.pf-fi-1 {
    top: 8%;
    left: 8%;
    animation-delay: 0s;
}

.pf-fi-2 {
    top: 8%;
    right: 8%;
    animation-delay: 2s;
}

.pf-fi-3 {
    bottom: 8%;
    left: 8%;
    animation-delay: 4s;
}

.pf-fi-4 {
    bottom: 8%;
    right: 8%;
    animation-delay: 6s;
}

@keyframes pf-orbit {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/*  SECCIN DE FILTROS / TABS  */
.pf-filters-section {
    background: #ffffff;
    padding: 36px 0 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pf-filters-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.pf-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pf-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    position: relative;
}

.pf-tab i {
    font-size: 0.85rem;
    opacity: 0.75;
}

.pf-tab:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

.pf-tab.active {
    color: #3b82f6;
    border: 1px solid #3b82f6;
    background: rgba(59, 130, 246, 0.06);
}

/* Buscador: fila propia arriba de los tabs */
.pf-search-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
    position: relative;
    top: -8px;
}

.pf-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #ffffff;
    border-radius: 8px;
    color: #94a3b8;
}

.pf-search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: #334155;
    width: 220px;
}

/* Filtro por tipo: vuelve al lugar del sort dropdown original */
.pf-type-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    position: relative;
    top: -8px;
}

.pf-type-select-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #94a3b8;
}

.pf-type-select {
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #ffffff;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

/*  LISTA DE PROYECTOS  */
.pf-projects-section {
    background: #ffffff;
    padding: 20px 0 80px;
}

.pf-projects-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Card horizontal */
.pf-project-card {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 300px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pf-project-card:hover {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    transform: translateY(-3px);
}

/* Vista previa (izquierda) */
.pf-project-preview {
    background: linear-gradient(140deg, #0d1a3a 0%, #0a1230 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 25px;
    position: relative;
    overflow: hidden;
}

.pf-project-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

/* Vista previa dinámica (Portafolio conectado a base de datos): imagen del proyecto o ícono de respaldo */
.pf-project-preview-img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.pf-project-preview-icon {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.25);
    position: relative;
    z-index: 1;
}

.pf-preview-light {
    background: linear-gradient(140deg, #e8eef8 0%, #dde4f2 100%);
}

.pf-preview-light::before {
    background: radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 65%);
}

/* Mockup dispositivos */
.pf-mockup-wrap {
    position: relative;
    width: 100%;
    max-width: 330px;
    height: 210px;
}

.pf-mockup-tablet {
    position: absolute;
    left: 0;
    top: 10px;
    width: 230px;
    background: #1e293b;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.pf-preview-light .pf-mockup-tablet {
    background: #cbd5e1;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.pf-mockup-screen {
    background: #0f172a;
    border-radius: 6px;
    padding: 10px;
    min-height: 170px;
    overflow: hidden;
}

.pf-screen-light {
    background: #f8fafc;
}

.pf-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pf-sh-light {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.pf-sh-title {
    font-size: 0.6rem;
    font-weight: 700;
    color: #e2e8f0;
}

.pf-sh-dots {
    display: flex;
    gap: 3px;
}

.pf-sh-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.pf-sh-nav {
    display: flex;
    gap: 8px;
    font-size: 0.5rem;
    color: #64748b;
}

/* Stats row */
.pf-screen-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.pf-ss-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    padding: 5px 4px;
    text-align: center;
}

.pf-screen-light .pf-ss-item {
    background: rgba(0, 0, 0, 0.04);
}

.pf-ss-val {
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1.2;
}

.pf-ss-lbl {
    display: block;
    font-size: 0.45rem;
    color: #64748b;
    line-height: 1.2;
}

/* Chart */
.pf-screen-chart {
    margin-top: 4px;
}

.pf-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 50px;
}

.pf-bar {
    flex: 1;
    background: rgba(59, 130, 246, 0.6);
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.pf-bar-green {
    background: rgba(16, 185, 129, 0.6);
}

/* Mockup mvil (solapado) */
.pf-mockup-mobile {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 95px;
    background: #1e293b;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 2;
}

.pf-preview-light .pf-mockup-mobile {
    background: #cbd5e1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.pf-mobile-screen {
    background: #0f172a;
    border-radius: 4px;
    padding: 5px;
    min-height: 130px;
    overflow: hidden;
}

.pf-mob-header {
    font-size: 0.5rem;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 5px;
    border-radius: 3px;
    margin-bottom: 5px;
}

.pf-mob-orders {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 2px;
}

.pf-mob-order {
    font-size: 0.42rem;
    font-weight: 600;
    padding: 3px 5px;
    border-radius: 3px;
}

.pf-mo-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.pf-mo-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.pf-mo-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

/* E-commerce blocks */
.pf-ecom-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 6px;
}

.pf-ecom-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.pf-ecom-prod {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/*  INFO DEL PROYECTO (derecha) */
.pf-project-info {
    padding: 40px 50px 40px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.pf-project-category {
    font-size: 0.72rem;
    font-weight: 800;
    color: #3b82f6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.pf-project-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0A0B1E;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.pf-project-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 480px;
}

/* Mtricas de impacto */
.pf-metrics {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.pf-metric {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pf-metric>i {
    color: #3b82f6;
    font-size: 1rem;
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.pf-metric div {
    display: flex;
    flex-direction: column;
}

.pf-metric strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0A0B1E;
    line-height: 1.1;
}

.pf-metric span {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    max-width: 100px;
}

/* Footer del proyecto: tecnologas + enlace */
.pf-project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    flex-wrap: wrap;
}

.pf-techs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pf-tech-label {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
}

.pf-tech-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-tech-icons img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: grayscale(20%);
    transition: all 0.2s;
    border-radius: 4px;
}

.pf-tech-icons img:hover {
    filter: grayscale(0%);
    transform: scale(1.15);
}

/* Enlace "Ver caso completo" */
.pf-case-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
    transition: gap 0.2s ease;
}

.pf-case-link:hover {
    gap: 10px;
    color: #2563eb;
}

.pf-case-link i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.pf-case-link:hover i {
    transform: translateX(2px);
}

/*  CTA FINAL  */
.pf-cta-section {
    background: #ffffff;
    padding: 0 0 80px;
}

.pf-cta-inner {
    background: linear-gradient(135deg, #0d1637 0%, #0a1230 60%, #0f1a40 100%);
    border-radius: 20px;
    padding: 50px 60px;
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    box-shadow: 0 20px 60px rgba(10, 18, 48, 0.3);
}

.pf-cta-rocket {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 1.8rem;
}

.pf-cta-text {
    flex: 1;
    min-width: 220px;
}

.pf-cta-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 8px;
}

.pf-cta-text h3 strong {
    font-weight: 800;
}

.pf-cta-text p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.pf-cta-buttons {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.pf-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.pf-cta-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.pf-cta-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
    color: #ffffff;
}

.pf-cta-whatsapp {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pf-cta-whatsapp:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.pf-cta-whatsapp i {
    color: #25d366;
    font-size: 1.1rem;
}

/*  RESPONSIVO  */
@media (max-width: 1100px) {
    .pf-project-card {
        grid-template-columns: 340px 1fr;
    }

    .pf-project-info {
        padding: 30px 35px 30px 35px;
    }
}

@media (max-width: 900px) {
    .pf-hero-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .pf-hero-desc {
        margin: 0 auto;
    }

    .pf-hologram-wrap {
        width: 260px;
        height: 260px;
        margin: 0 auto;
    }

    .pf-cube {
        width: 120px;
        height: 120px;
    }

    .pf-cube-face {
        width: 120px;
        height: 120px;
    }

    .pf-face-front {
        transform: rotateY(0deg) translateZ(60px);
    }

    .pf-face-back {
        transform: rotateY(180deg) translateZ(60px);
    }

    .pf-face-right {
        transform: rotateY(90deg) translateZ(60px);
    }

    .pf-face-left {
        transform: rotateY(-90deg) translateZ(60px);
    }

    .pf-face-top {
        transform: rotateX(90deg) translateZ(60px);
    }

    .pf-face-bottom {
        transform: rotateX(-90deg) translateZ(60px);
    }

    .pf-project-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .pf-project-preview {
        height: 240px;
    }

    .pf-project-info {
        padding: 28px 28px;
    }

    .pf-cta-inner {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }

    .pf-cta-rocket {
        margin: 0 auto;
    }

    .pf-cta-buttons {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .pf-tabs {
        gap: 2px;
    }

    .pf-tab span {
        display: none;
    }

    .pf-tab {
        padding: 10px 14px;
    }

    .pf-metrics {
        gap: 16px;
    }

    .pf-metric strong {
        font-size: 1.1rem;
    }

    .pf-project-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .pf-cta-btn {
        width: 100%;
        justify-content: center;
    }
}/*        MODAL DE PROYECTOS                                    */
.pf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 30, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    padding: 20px;
}

.pf-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pf-modal {
    background: #ffffff;
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    /* Alto fijo del 90% para poder hacer scroll interno */
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.98);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.pf-overlay.active .pf-modal {
    transform: translateY(0) scale(1);
}

/* Header del modal fijo */
.pf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 40px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    flex-shrink: 0;
    /* No encoge */
}

.pf-modal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pf-modal-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.pf-modal-category {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pf-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0A0B1E;
    margin: 2px 0 0 0;
}

.pf-modal-close {
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pf-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

/* Cuerpo con scroll */
.pf-modal-body {
    padding: 40px;
    overflow-y: auto;
    flex-grow: 1;
    /* Ocupa el espacio restante */
}

/* Scrollbar estilizado */
.pf-modal-body::-webkit-scrollbar {
    width: 8px;
}

.pf-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.pf-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.pf-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Fila superior: Texto/Mtricas y Captura */
.pf-modal-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
}

.pf-modal-desc {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 24px;
}

.pf-modal-metrics {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pf-modal-metric {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pf-modal-metric i {
    color: #3b82f6;
    font-size: 1.1rem;
    margin-top: 3px;
    width: 20px;
    text-align: center;
}

.pf-modal-metric strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0A0B1E;
    line-height: 1.1;
    display: block;
}

.pf-modal-metric span {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.pf-modal-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Metadatos en cudricula */
.pf-modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    margin-bottom: 40px;
}

.pf-modal-meta-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 1px solid rgba(15, 23, 42, 0.06);
}

.pf-modal-meta-item:last-child {
    border-right: none;
}

.pf-modal-meta-item i {
    color: #3b82f6;
    font-size: 1.2rem;
}

.pf-modal-meta-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
}

.pf-modal-meta-val {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0A0B1E;
}

/* 3 Columnas */
.pf-modal-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.pf-modal-col {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 24px;
}

.pf-modal-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pf-modal-col-header h4 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    color: #0A0B1E;
}

.pf-modal-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-modal-col li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.pf-modal-col li i {
    margin-top: 4px;
    flex-shrink: 0;
}

/* Tecnologas */
.pf-modal-techs-wrap {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.pf-modal-techs-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.pf-modal-techs {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pf-modal-tech-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0A0B1E;
}

.pf-modal-tech-pill img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Footer fijo */
.pf-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 40px;
    background: #f8fafc;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.pf-modal-footer-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pf-modal-footer-icon {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.pf-modal-footer-row strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0A0B1E;
}

.pf-modal-footer-actions {
    display: flex;
    gap: 12px;
}

.pf-modal-btn-primary {
    background: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.pf-modal-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.pf-modal-btn-outline {
    background: #ffffff;
    color: #0A0B1E;
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.pf-modal-btn-outline:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pf-modal-btn-outline i {
    color: #22c55e;
}

/* Responsivo del Modal */
@media (max-width: 1024px) {
    .pf-modal-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-modal-meta-item:nth-child(2) {
        border-right: none;
    }

    .pf-modal-meta-item:nth-child(3),
    .pf-modal-meta-item:nth-child(4) {
        border-top: 1px solid rgba(15, 23, 42, 0.06);
    }
}

@media (max-width: 768px) {
    .pf-modal {
        height: 95vh;
    }

    .pf-modal-header,
    .pf-modal-body,
    .pf-modal-footer {
        padding: 20px;
    }

    .pf-modal-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pf-modal-meta-grid {
        grid-template-columns: 1fr;
    }

    .pf-modal-meta-item {
        border-right: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .pf-modal-meta-item:last-child {
        border-bottom: none;
    }

    .pf-modal-meta-item:nth-child(3),
    .pf-modal-meta-item:nth-child(4) {
        border-top: none;
    }

    .pf-modal-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pf-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .pf-modal-footer-actions {
        flex-direction: column;
    }

    .pf-modal-btn-primary,
    .pf-modal-btn-outline {
        justify-content: center;
    }
}
