/* Portfolio Section - DCA Web Studio */
.portfolio {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 100%);
    position: relative;
    overflow: hidden;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

/* Filtros */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0 3rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: #ccc;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #fff;
    border-color: #d4af37;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #d4af37;
    color: #0d0d0d;
    border-color: #d4af37;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Grid de Proyectos */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Tarjetas de Proyecto */
.portfolio-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.portfolio-card:nth-child(1) {
    animation-delay: 0.1s;
}

.portfolio-card:nth-child(2) {
    animation-delay: 0.2s;
}

.portfolio-card:nth-child(3) {
    animation-delay: 0.3s;
}

.portfolio-card:nth-child(4) {
    animation-delay: 0.4s;
}

.portfolio-card:nth-child(5) {
    animation-delay: 0.5s;
}

.portfolio-card:nth-child(6) {
    animation-delay: 0.6s;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(212, 175, 55, 0.1);
}

.project-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.project-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-ia {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-private {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.badge-financial {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.badge-demo {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.badge-mvp {
    background: rgba(175, 82, 222, 0.1);
    color: #af52de;
    border: 1px solid rgba(175, 82, 222, 0.3);
}

.badge-education {
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.badge-brand {
    background: rgba(88, 86, 214, 0.1);
    color: #5856d6;
    border: 1px solid rgba(88, 86, 214, 0.3);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
    background: linear-gradient(90deg, #fff, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-subtitle {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.project-content {
    padding: 1.5rem;
}

.project-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #d4af37;
}

.detail-item {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #d4af37;
    font-size: 0.9rem;
}

.detail-value {
    color: #ddd;
    font-size: 0.9rem;
    line-height: 1.5;
}

.detail-item.highlight {
    background: rgba(212, 175, 55, 0.08);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.detail-item.highlight .detail-label {
    color: #ffd700;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-tag {
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #bbb;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #fff;
    transform: translateY(-2px);
}

.tech-ia {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    color: #d4af37;
    border-color: rgba(212, 175, 55, 0.3);
    font-weight: 600;
}

/* Project Actions */
.project-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-demo,
.btn-secondary {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-demo {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #0d0d0d;
}

.btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #d4af37;
    border: 1px solid #d4af37;
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.project-status {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #222);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.8rem;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.close-modal:hover {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.modal-body {
    padding: 3rem 2.5rem 2.5rem;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos adicionales para modales */
.architecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.arch-layer {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #d4af37;
}

.arch-layer.highlight {
    background: rgba(212, 175, 55, 0.1);
    border-left-color: #ffd700;
}

.arch-layer h4 {
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.arch-layer ul {
    padding-left: 1.2rem;
    color: #ddd;
}

.arch-layer li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric {
    text-align: center;
    padding: 1.5rem;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.metric-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: #bbb;
    font-size: 0.9rem;
}

.tech-details {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.tech-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #007acc;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-tooltip {
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 1000;
    border: 1px solid #d4af37;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.tech-tooltip::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #d4af37;
}

/* Responsive */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .portfolio {
        padding: 3rem 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .project-header,
    .project-content {
        padding: 1.25rem;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .project-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn-demo,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .project-status {
        text-align: center;
    }

    .tech-stack {
        gap: 0.4rem;
    }

    .tech-tag {
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }
}