/* ==========================================================================
   Project Card Component Styles (HTML & Python)
   Crakdex / ALDEVX - Pro Modern UI
   ========================================================================== */

.project-card-item {
    margin-bottom: 30px;
    display: flex;
}

.pro-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 440px;
    border-radius: 18px;
    padding: 0;
    position: relative;
    background: #121620 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    overflow: hidden;
}

/* 👑 IDENTIDAD PREMIUM */
.pro-card.pro-card-premium {
    border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
}

.pro-card.pro-card-premium:hover {
    transform: translateY(-6px);
    border-color: #f59e0b !important;
    box-shadow: 0 16px 36px -6px rgba(245, 158, 11, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.4);
}

.pro-badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.pro-price-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    color: #fef08a;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* 🎁 IDENTIDAD GRATUITA */
.pro-card.pro-card-free {
    border: 1.5px solid rgba(16, 185, 129, 0.35) !important;
}

.pro-card.pro-card-free:hover {
    transform: translateY(-6px);
    border-color: #10b981 !important;
    box-shadow: 0 16px 36px -6px rgba(16, 185, 129, 0.22), 0 0 0 1px rgba(16, 185, 129, 0.4);
}

.pro-badge-emerald {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.pro-free-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* MINIATURA ANCHO COMPLETO */
.pro-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    width: 100%;
    margin: 0;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    background: #090c13;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pro-card-thumb a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.pro-card-thumb img,
.pro-card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.pro-card:hover .pro-card-thumb img,
.pro-card:hover .pro-card-thumb video {
    transform: scale(1.05);
}

.pro-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 12, 19, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(3px);
}

.pro-card:hover .pro-thumb-overlay {
    opacity: 1;
}

.pro-view-preview {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pro-floating-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.pro-floating-pill.pill-gold {
    background: #f59e0b;
    color: #0b1118;
}

.pro-floating-pill.pill-emerald {
    background: #10b981;
    color: #ffffff;
}

/* CUERPO JUSTIFICADO */
.pro-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.pro-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.pro-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
}

.cat-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.indicator-gold {
    background-color: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.9);
}

.indicator-emerald {
    background-color: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.9);
}

.pro-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 4px 0 8px;
    min-height: 42px;
    max-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pro-card-title a {
    color: #f1f5f9 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pro-card-title a:hover {
    color: var(--main-color-one, #00d285) !important;
}

.pro-card-desc {
    font-size: 12px;
    color: #8892b0;
    line-height: 1.45;
    margin-bottom: 12px;
    min-height: 35px;
    max-height: 35px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PRECIO EN LA PARTE INFERIOR */
.pro-card-pricing {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-bottom: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pro-price-caption {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
}

/* BOTONES JUSTIFICADOS (PIE DE TARJETA) */
.pro-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding-top: 0;
    border-top: none;
}

.pro-card-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-btn-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #94a3b8 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    padding: 0;
}

.pro-btn-icon:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

.pro-btn-icon.btn-fav-action.active,
.pro-btn-icon.btn-fav-action.active i {
    color: #ef4444 !important;
}

.pro-btn-action {
    height: 38px;
    flex: 1 1 0;
    min-width: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 0 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.pro-btn-cart {
    background: #f59e0b !important;
    color: #0b1118 !important;
}

.pro-btn-cart:hover {
    background: #fbbf24 !important;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.pro-btn-code {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}

.pro-btn-code:hover {
    background: #10b981 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pro-btn-live {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

.pro-btn-live:hover {
    background: var(--main-color-one, #00d285) !important;
    color: #0b1118 !important;
    border-color: var(--main-color-one, #00d285) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 210, 133, 0.35);
}

/* Botón Principal Ver Proyecto (Reestructurado) */
.pro-btn-primary {
    background: linear-gradient(135deg, #00d285 0%, #059669 100%) !important;
    color: #0b1118 !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 12px rgba(0, 210, 133, 0.25);
}

.pro-btn-primary:hover {
    background: linear-gradient(135deg, #10e092 0%, #00d285 100%) !important;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 210, 133, 0.4);
}

/* Botón Carrito Solo Ícono (Siempre a la derecha) */
.pro-btn-cart-icon {
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #fbbf24 !important;
    margin-left: auto !important;
}

.pro-btn-cart-icon:hover {
    background: #f59e0b !important;
    color: #0b1118 !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

/* =========================================================
   ADAPTACIÓN 2 COLUMNAS EN MÓVIL (<= 767px)
   Diseño compacto, equilibrado y optimizado para pantallas táctiles
   ========================================================= */
@media (max-width: 767px) {
    .row:has(> .project-card-item),
    #projectsGrid,
    .related-section .row,
    .cross-nav-wrapper .row {
        --bs-gutter-x: 10px !important;
        --bs-gutter-y: 12px !important;
    }
    .project-card-item {
        margin-bottom: 0 !important;
    }
    .pro-card {
        min-height: unset !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
    }
    .pro-card-thumb {
        border-radius: 14px 14px 0 0 !important;
        aspect-ratio: 16 / 10 !important;
    }
    .pro-floating-pill {
        top: 6px !important;
        right: 6px !important;
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
    .pro-card-body {
        padding: 10px 8px 10px 8px !important;
    }
    .pro-meta-row {
        margin-bottom: 3px !important;
    }
    .pro-cat-pill {
        font-size: 9px !important;
        gap: 4px !important;
        max-width: 65%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .pro-meta-row > span.text-white-50 {
        font-size: 9px !important;
    }
    .pro-card-title {
        font-size: 12.5px !important;
        line-height: 1.3 !important;
        min-height: 32px !important;
        max-height: 32px !important;
        margin: 2px 0 4px 0 !important;
    }
    /* Ocultar descripción en 2 columnas móvil para que las cards no sean kilométricas */
    .pro-card-desc {
        display: none !important;
    }
    .pro-card-pricing {
        padding-top: 6px !important;
        margin-bottom: 6px !important;
    }
    .pro-price-caption {
        font-size: 9px !important;
    }
    .pro-price-tag, .pro-free-tag {
        font-size: 10px !important;
        padding: 2px 6px !important;
        border-radius: 6px !important;
    }
    .pro-card-footer {
        gap: 3px !important;
    }
    .pro-card-footer-left {
        gap: 4px !important;
    }
    .pro-btn-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }
    .pro-btn-action {
        height: 28px !important;
        font-size: 10.5px !important;
        padding: 0 6px !important;
        border-radius: 6px !important;
    }
}
