.section-proyectos {
    background-color: #fdfaf9;
}

.titulo-section {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1e1e1e;
}

.grid-proyectos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bloque-categoria {
    background: #ffffff;
    padding: 25px;
    border-radius: 25px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.categoria-titulo {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-cat);
    margin-bottom: 10px;
}

.categoria-resumen {
    font-size: 15px;
    color: var(--color-cat);
    line-height: 1.4;
}

/* CARD */
.card {
    width: 100%;
    max-width: 320px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gris suave */
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* HOVER */
.card:hover {
    transform: translateY(-6px);
    border-color: var(--color-cat);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* HEADER (TITULO) */
.card-header {
    background: linear-gradient(
        135deg,
        var(--color-cat),
        rgba(0,0,0,0.25)
    );
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0,0,0,0.2)
    );
}

/* TITULO */
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* BODY */
.card-body {
    padding: 18px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* BADGES */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e5e5e5;
}

/* COLORES */
.badge.categoria {
    border-color: var(--color-cat);
    color: var(--color-cat);
}

.badge.intermedio {
    border-color: #facc15;
    color: #facc15;
}

.badge.avanzado {
    border-color: #ef4444;
    color: #ef4444;
}

.badge.principiante {
    border-color: #22c55e;
    color: #22c55e;
}

.badge.publico {
    border-color: #22c55e;
}

.badge.privado {
    border-color: #ef4444;
}

/* FOOTER */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* FECHA */
.fecha {
    font-size: 12px;
    color: #94a3b8;
}

/* BOTON */
.btn-ver {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-size: 13px;
}

.btn-ver::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: #38bdf8;
    transition: width 0.3s ease;
}

.btn-ver:hover::after {
    width: 100%;
}

/* EFECTO LUZ */
.card::before {
    content: "";
    position: absolute;
    top: var(--y);
    left: var(--x);
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(56,189,248,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

/************************************ */

.botones-categoria {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filtro-cat {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    background: #f1f1f1;
    transition: all 0.3s ease;
    border: none;
}

/* COLORES POR CATEGORIA */
.filtro-cat[data-filtro="CRUD"] {
    color: #1f2937;
    border-color: #1f2937;
    background: rgba(31,41,55,0.08);
}

.filtro-cat[data-filtro="Negocio"] {
    color: #0f766e;
    border-color: #0f766e;
    background: rgba(15,118,110,0.08);
}

.filtro-cat[data-filtro="Comunicacion"] {
    color: #2563eb;
    border-color: #2563eb;
    background: rgba(37,99,235,0.08);
}

.filtro-cat[data-filtro="Seguridad"] {
    color: #7c3aed;
    border-color: #7c3aed;
    background: rgba(124,58,237,0.08);
}

.filtro-cat[data-filtro="Servicios"] {
    color: #ca8a04;
    border-color: #ca8a04;
    background: rgba(202,138,4,0.08);
}

.filtro-cat[data-filtro="Administracion"] {
    color: #dc2626;
    border-color: #dc2626;
    background: rgba(220,38,38,0.08);
}

/* HOVER */
.filtro-cat:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

/* ACTIVO */
.filtro-cat.activo {
    background: linear-gradient(135deg, #66FFE4, #5ac8fa);
    color: #000;
    border-color: transparent;
}

/************************************ */

.container-filtros {
    margin-top: 25px;
}

.container-orden {
    display: flex;
    gap: 9px;
    margin-top: 25px;
}

#ordenAsc, #ordenDesc {
    border-radius: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
}

#ordenAsc:hover {
    border-color: #22c55e;
    color: #22c55e;
    background: #ecfdf5;
}

#ordenDesc:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/************************************ */
.empty-state {
    display: none;
    width: 100%;
    padding: 40px 20px;
    margin-top: 20px;
    border-radius: 20px;
    border: 2px dashed #e5e7eb;
    background: linear-gradient(
        135deg,
        rgba(0,0,0,0.02),
        rgba(0,0,0,0.04)
    );
    text-align: center;
}

.empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-content .emoji {
    font-size: 40px;
}

.empty-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.empty-content p {
    font-size: 14px;
    color: #6b7280;
}

/* CONTENEDOR ESTILOS FILTROS LENGUAJES */
.container-filtros-lenguaje {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

/* BOTONES */
.botones-lenguaje {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* BOTON BASE */
.filtro-lenguaje {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 500;

    background: #1f2937;
    color: #fff;

    transition: all 0.3s ease;
}
.filtro-lenguaje {
    position: relative;
}
.filtro-lenguaje.activo::after {
    content: "";
    position: absolute;
    left: 20%;
    bottom: -8px; /* 🔥 separación del botón */
    width: 60%;
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* HOVER */
.filtro-lenguaje:hover {
    transform: translateY(-2px);
}


.filtro-lenguaje.activo {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-bottom: 1px solid purple;
}

/* ICONOS */
.filtro-lenguaje i {
    font-size: 18px;
}
.filtro-lenguaje span {
    font-size: 13px;
}

/* COLORES POR LENGUAJE */
.filtro-lenguaje.activo[data-lenguaje="php"] {
    background: #777BB4;
    color: #fff;
}

.filtro-lenguaje.activo[data-lenguaje="laravel"] {
    background: #FF2D20;
    color: #fff;
}

.filtro-lenguaje.activo[data-lenguaje="python"] {
    background: #3776AB;
    color: #fff;
}

.filtro-lenguaje.activo[data-lenguaje="react"] {
    background: #61DAFB;
    color: #fff;
}

.filtro-lenguaje.activo[data-lenguaje="angular"] {
    background: #DD0031;
    color: #fff;
}

/* ESTILOS MENSAJE NO HAY PROYECTOS EN ESTE LENGUAJE */
.empty-state-lenguaje {
    display: none;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

/* CONTENEDOR */
.empty-content-lenguaje {
    background: linear-gradient(145deg, rgba(59,130,246,0.08), rgba(139,92,246,0.08));
    border: 1px solid rgba(139,92,246,0.2);
    backdrop-filter: blur(12px);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    animation: fadeInUp 0.5s ease;
    position: relative;
    overflow: hidden;
}

/* EFECTO DECORATIVO */
.empty-content-lenguaje::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139,92,246,0.2), transparent);
    top: -50px;
    right: -50px;
    filter: blur(40px);
}

/* ICONO */
.icono-lenguaje {
    font-size: 50px;
    color: #8b5cf6;
    margin-bottom: 15px;
}

/* TITULO */
.titulo-lenguaje {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* DESCRIPCIÓN */
.desc-lenguaje {
    font-size: 15px;
    opacity: 0.7;
    margin-bottom: 20px;
}

/* SUGERENCIA */
.sugerencia-lenguaje {
    font-size: 13px;
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    border-radius: 10px;
    display: inline-block;
}

/* ANIMACIÓN DIFERENTE */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================= */
/* 🔽 RESPONSIVE 🔽 */
/* ========================= */
@media (max-width: 900px) {
    .titulo-section {
        font-size: 28px;
    }
    .categoria-titulo {
        font-size: 17px;
    }
    .categoria-resumen {
        font-size: 14px;
    }
    .card-header h3 {
        font-size: 15px;
    }
    .filtro-lenguaje i {
        font-size: 17px;
    }
    .filtro-lenguaje span {
        font-size: 12px;
    }
    .badge {
        font-size: 11px;
    }
    .fecha {
        font-size: 11.5px;
    }
    .btn-ver {
        font-size: 12.5px;
    }
}

@media (max-width: 768px) {
    .grid-proyectos {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .filtro-cat {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 600px) {
    .titulo-section {
        font-size: 26px;
    }
    .categoria-titulo {
        font-size: 16px;
    }
    .categoria-resumen {
        font-size: 13.5px;
    }
    .card-header h3 {
        font-size: 14px;
    }
    .filtro-lenguaje i {
        font-size: 16px;
    }
    .filtro-lenguaje span {
        display: none;
    }

    .filtro-lenguaje {
        padding: 10px;
    }
    .fecha {
        font-size: 11px;
    }
    .btn-ver {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .categoria-titulo {
        font-size: 15px;
    }
    .categoria-resumen {
        font-size: 13px;
    }
    .card-header h3 {
        font-size: 13.5px;
    }
    .badge {
        font-size: 10px;
    }

    .bloque-categoria {
        padding: 18px;
        border-radius: 18px;
    }

    h3 {
        font-size: 18px;
    }

    .card-title {
        font-size: 14px;
    }

    .empty-state {
        padding: 25px 15px;
    }

    .empty-content .emoji {
        font-size: 32px;
    }

    .empty-content h4 {
        font-size: 16px;
    }

    .fila {
        flex-wrap: wrap;
        gap: 10px;
    }

    #ordenAsc, #ordenDesc {
        flex: 1;
    }
}

@media (max-width: 400px) {
    .titulo-section {
        font-size: 24px;
    }
}

@media (max-width: 360px) {
    .grid-proyectos {
        grid-template-columns: 1fr;
    }
}