/* estilos.css */
#app-trabajos {
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#app-trabajos .container {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Grid de tarjetas */
#app-trabajos .cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media(max-width: 1200px){
    #app-trabajos .cards { grid-template-columns: repeat(2,1fr); }
}
@media(max-width: 600px){
    #app-trabajos .cards { grid-template-columns: 1fr; }
}

/* Tarjetas */
#app-trabajos .card {
    background: #181818;
    border-radius: 12px;
    border: 1px solid #222;
    overflow: hidden;
    text-align: center;
    color: #fff;
    transition: 0.3s;
    cursor: pointer;
}

#app-trabajos .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Imagen que ocupa todo el ancho en la parte superior */
#app-trabajos .card-imagen {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #000;
}

#app-trabajos .card-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contenido de la tarjeta */
#app-trabajos .card-contenido {
    padding: 20px;
}

#app-trabajos h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #fff;
}

#app-trabajos p {
    font-size: 14px;
    color: #ccc;
    margin: 5px 0;
}

#app-trabajos .btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    cursor: pointer;
    width: 100%;
    border-radius: 6px;
    transition: 0.3s;
    font-size: 14px;
}

#app-trabajos .btn:hover {
    background: #333;
    border-color: #444;
}

/* Formularios */
#app-trabajos .form-group {
    margin-bottom: 20px;
}

#app-trabajos label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 500;
}

#app-trabajos input[type="text"],
#app-trabajos input[type="email"],
#app-trabajos input[type="tel"],
#app-trabajos input[type="number"],
#app-trabajos select,
#app-trabajos textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #222;
    color: #fff;
    font-size: 14px;
}

#app-trabajos input[type="range"] {
    width: 80%;
    margin-right: 10px;
}

#app-trabajos .valor-habilidad {
    display: inline-block;
    background: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Buscador */
#app-trabajos .buscador {
    margin-bottom: 20px;
}

#app-trabajos .buscador input {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #222;
    color: #fff;
    font-size: 16px;
}

/* Paginación */
#app-trabajos .paginacion {
    margin-top: 30px;
    text-align: center;
}

#app-trabajos .paginacion button {
    margin: 0 5px;
    padding: 8px 12px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

#app-trabajos .paginacion button.active {
    background: #333;
    border-color: #444;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    background-color: #181818;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    color: #fff;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close:hover {
    color: #fff;
}

/* Contenido del modal */
.modal-imagen {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.modal-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 25px;
}

.modal-body h2 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 1.5rem;
}

.modal-body h3 {
    margin: 20px 0 10px 0;
    color: #fff;
    font-size: 1.2rem;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
}

.modal-body p {
    margin: 8px 0;
    color: #ccc;
    line-height: 1.5;
}

.habilidad-item {
    margin: 10px 0;
    background: #222;
    padding: 10px;
    border-radius: 6px;
}

.habilidad-nombre {
    display: inline-block;
    width: 60%;
    font-weight: bold;
    color: #fff;
}

.habilidad-valor {
    display: inline-block;
    width: 35%;
    text-align: right;
    color: #4CAF50;
    font-weight: bold;
}

.habilidad-barra {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.habilidad-barra-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Tabla admin */
#app-trabajos .tabla-admin {
    margin: 20px 0;
    overflow-x: auto;
}

#app-trabajos .wp-list-table {
    background: #181818;
    color: #fff;
    border-collapse: collapse;
    width: 100%;
}

#app-trabajos .wp-list-table th,
#app-trabajos .wp-list-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

#app-trabajos .wp-list-table th {
    background: #222;
    font-weight: bold;
}

#app-trabajos .btn-eliminar {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

#app-trabajos .btn-eliminar:hover {
    background: #c82333;
}
/* Mensajes de éxito y error */
.mensaje-exito {
    background: #4CAF50;
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.mensaje-error {
    background: #f44336;
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* Botones de paginación activos */
.pag-btn {
    margin: 0 5px;
    padding: 8px 12px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.pag-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
}

.pag-btn:hover {
    background: #333;
}

.paginacion-buttons {
    text-align: center;
    margin-top: 30px;
}

/* Estilos para el modal mejorado */
.modal-body h3 {
    margin: 20px 0 15px 0;
    color: #fff;
    font-size: 1.2rem;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 8px;
    display: inline-block;
}

.habilidad-item {
    margin: 12px 0;
    background: #222;
    padding: 12px;
    border-radius: 8px;
}

.habilidad-nombre {
    display: inline-block;
    width: 60%;
    font-weight: bold;
    color: #fff;
}

.habilidad-valor {
    display: inline-block;
    width: 35%;
    text-align: right;
    color: #4CAF50;
    font-weight: bold;
}

.habilidad-barra {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.habilidad-barra-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s;
}